Python coding of MULTIPLY’s processing chain Ioannis Binietoglou National Institute for R&D in Optoelectronics, Bucharest, Romania National Observatory of Athens, Athens, Greece
Python coding of MULTIPLY’s processing chain Ioannis Binietoglou National Institute for R&D in Optoelectronics, Bucharest, Romania National Observatory of Athens, Athens, Greece
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania Coding is big part of our work Code is in the heart of research : ▫ Controlling instruments. ▫ Handling, exploring, processing data. ▫ Creating graphs and visualizations.
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania And bad code can be really bad Cost: $193 million Last contact: 23 September 1999 Reason: “The peer review preliminary findings indicate that one team used English units (e.g., inches, feet and pounds) while the other used metric units for a key spacecraft operation.” Mars climate orbiter, NASA
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania … more than once! Cost: $370 million Last contact: 28 March 2016 Reason: “But because the wrong command had been uploaded, the firing caused the spacecraft to accelerate further. The improper command had been uploaded to the satellite weeks earlier without proper testing; JAXA says that it is investigating what happened.” Hitomi Xray telescope, JAXA/NASA
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania Coding is supposed to be an equal citizen
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania Is software was hardware Hardware Software
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania Is software was hardware Hardware Software
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania Is software was hardware Hardware Software
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania Our problems are not new Programmers have met these problems again and again. They can teach us good coding style, advanced programming concepts, but also time management, team interactions and learning practices. (but don’t hire a university graduate to learn these...)
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania Why python Python is a high-level programming language: 1.Easy 2.“Batteries included” 3.Great community 4.General purpose 5.Cross-platform 6.Free
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania For scientific programming Fast arrays and matrices Plots and graphs A lot of libraries and features e.g machine learning, image processing... Syntax similar to MatLab
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania Scientific python stack
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania But is it fast enough?
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania
Let’s start Start “python”.
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania Tutorials (the basis of today’s lectures)
1 st ECARS Summer school, 30 th May 2016, Bucharest, Romania Resources Scientific distribution: Anaconda: Development environments: Spyder: PyCharm: Interactive interpreter: Ipython, Jupyter notebooks: