Python in Astronomy

Video thumbnail (Frame 0) Video thumbnail (Frame 1323) Video thumbnail (Frame 14487) Video thumbnail (Frame 28985) Video thumbnail (Frame 31477) Video thumbnail (Frame 34641) Video thumbnail (Frame 36500) Video thumbnail (Frame 39687) Video thumbnail (Frame 41287) Video thumbnail (Frame 42758) Video thumbnail (Frame 44852) Video thumbnail (Frame 48570)
Video in TIB AV-Portal: Python in Astronomy

Formal Metadata

Python in Astronomy
Title of Series
Part Number
Number of Parts
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license.
Release Date

Content Metadata

Subject Area
Sławomir Piasecki - Python in Astronomy I would like to talk about modern Astronomy where I would give a brief history of Astronomy. I will answer some question: What do we use computers for today in astronomy? Where is Python’s place in today’s science? Is Python is the best language for scientific computation? I would like to give a short introduction into AstroPy module. Finally I would like presents some result of my research where Python was used to create data. ----- For ages people have been watching the sky, and tried to learn something about all those mysterious lights. In ancient times, scientist used mostly their naked eyes to watch what happened in the night sky. Astronomy is one of the oldest fields in science. Everything changed when Galileo invented his lunette. Thanks to thi, we were able to proof Copernicus’ new model of the solar system with the sun in the center. The next big step in Astronomy was using computers. Where there are computers and Astronomy, there is a place for programming. For many years astronomers were mostly using Fortran and C/C++. Both are suited to numeric computation and scientific computing. Since they are structured programming language, that makes them very valuable for science. Over the past decade, Python has started to be used by more and more people in astronomy. But is there a place in Astronomy for Python, as it is not as fast as Fortran or C/C++? In Python there is a module called AstroPy which helps astronomers in their work. MatPlotLib is one of the most popular library use in astronomy. This tool helps created very sophisticated plots and graphs. Finally I would like talk about some research I did using Python. For research, we decided to use AUTO. It is a hybrid of Fortran and Python, to compute bifurcation points in mathematical models. In Python we introduce mathematical model, ODE and initial parameters. Fortran does all the computation.
Data management Arithmetic mean Multiplication sign Green's function Numbering scheme Speech synthesis Field (computer science)
Logical constant Kepler conjecture Execution unit Disk read-and-write head Special unitary group Neuroinformatik Medical imaging Velocity Hypermedia Forest Single-precision floating-point format Physical system Social class Computer font Structural load Electronic mailing list Sound effect Mass Bit Surface of revolution Sequence Digital photography Arithmetic mean Process (computing) Endliche Modelltheorie Modul <Datentyp> Quicksort Astrophysics Spacetime Point (geometry) Slide rule Module (mathematics) Civil engineering Maxima and minima Mass Rule of inference Event horizon Plot (narrative) Surface of revolution Element (mathematics) Number Goodness of fit Internet forum Term (mathematics) Nichtlineares Gleichungssystem Maß <Mathematik> Form (programming) Metre Information Length 1 (number) Symbol table Mathematics Word Error message Software Personal digital assistant Universe (mathematics) Library (computing) Satellite State observer Multiplication sign Plotter Bookmark (World Wide Web) Formal language Analogy Endliche Modelltheorie Data conversion Astrophysics Position operator Area Scripting language Curve Logical constant Data storage device Physicalism Special unitary group Distance Proof theory Velocity 4 (number) Right angle Resultant Ocean current Metre Table (information) Observational study Coordinate system Distance 2 (number) Software testing Maize Summierbarkeit Task (computing) Numerical taxonomy Noise (electronics) Mathematical analysis Letterpress printing Library catalog Number Computer animation Gravitation Object (grammar)
Point (geometry) Frame problem State observer Presentation of a group Table (information) Equaliser (mathematics) Multiplication sign Execution unit Set (mathematics) Angle Coordinate system Sphere Mereology Information technology consulting Metadata 2 (number) Degree (graph theory) Different (Kate Ryan album) Representation (politics) Computer worm Integer Damping Position operator Boolean algebra Decision tree learning Execution unit Logical constant Information Flash memory Coordinate system Transformation (genetics) Variable (mathematics) Cartesian product Distance Computer animation Angle System programming Right angle Table (information)
Point (geometry) Algorithm Multiplication sign Direction (geometry) 3 (number) Branch (computer science) Mathematical analysis Coordinate system Distance Mereology Food energy Neuroinformatik Frequency Degree (graph theory) Velocity Software Representation (politics) Nichtlineares Gleichungssystem Position operator Physical system Family Dependent and independent variables Logical constant Differential (mechanical device) Flash memory Algebraic number Point (geometry) Branch (computer science) Bit Line (geometry) Cartesian product Orbit Number Computer animation Software Personal digital assistant Hybrid computer Bifurcation theory System programming Nichtlineares Gleichungssystem Analytic continuation Object (grammar) Boundary value problem Family
Hamiltonian (quantum mechanics) Functional (mathematics) Flash memory Multiplication sign Hamiltonian (quantum mechanics) Interior (topology) Sheaf (mathematics) Ordinary differential equation Food energy Field (computer science) Orbit Derivation (linguistics) Frequency Computer animation Equations of motion Representation (politics) Object (grammar) Data structure Position operator Physical system Stability theory
Slide rule Functional (mathematics) Sheaf (mathematics) Branch (computer science) Ordinary differential equation Axonometric projection Food energy Medical imaging Velocity Different (Kate Ryan album) Initial value problem Position operator Physical system Information Mapping Flash memory Interior (topology) Variable (mathematics) Evolute Orbit Plot (narrative) Arithmetic mean Frequency Computer animation Bifurcation theory Family Resultant
Point (geometry) Slide rule Presentation of a group Scripting language View (database) Multiplication sign Student's t-test Distance Plot (narrative) Orbit Neuroinformatik Internet forum Software Summierbarkeit Family Scripting language Programming language Wrapper (data mining) Flash memory Evolute Surface of revolution Orbit Data mining Type theory Computer animation Software Symmetry (physics) Time evolution Order (biology) Website Video game Family Routing Gradient descent
Green haven't done back to my ideas from managers and skis come to about 2 bytes and in this in this 1 comes from around and yeah and Amazon Services schemes and I would like to go to be about applied understand I white is this topic well for almost 90 years I was working in from the field in the universities and and during the time of learning ROI was introduced actually that applied the and right now I can do all possible means that much but I'm working in the company and that so that didn't use light on and every every day so I thought it would be nice to manage these 2 topics that and my interests interest in both of the fetus and presented in this this speech so what I would like to
talk about today what would be like for you points overlaying introduction what I would like to just briefly say about dust from so some short history of dust from the with the the point is that for me i quite important I think in and I certainly I always like to briefly describe the the pocket are supplied which is the package should be indicated for SMS and astrophysics and that contains in 1 place most of the important things in the modern models and methods using enough money and in the area would like to talk about out of which is that paper at software mm height on the importance that I was using during my and my research and understanding OK so this starts at 1 with the with the beginning so as you probably know dust is 1 of the oldest sciences and and the 1st observation was actually taken by the naked eye so the Asians socialization like Babylon slide from weeks alright I'm chance that it wasn't just say that I for just 2 check what is happening in the nite sky and do what they are using this information what the words using the moons most for navigation forum creating the symbols calendar as for agricultural for region proposed that just to of manipulate the people of course because once you know where is there sorry kids for example and you can just say people that you have to to pay us more because the guys are very angry and and so that was like the very beginnings of the house from result actually wasn't that much science on but the 1st the 1st civilization that this sort of thing can be deeply about astronomy and giving more important questions like what is that what is exactly happening above our heads why it's so finds moving this way not the other way and what is our and purpose in the universe so the Greek start looking for the sponsors and what they and what the achieved they achieved to estimate the distance between our 2 months and 1 and 2 and they introduce their goes in the curve as a system and that the putin in there in the center of the system and all of the visible object this planets on any of these stars were troubling around the and they also starts to creating today and the 1st 2 astronomical catalogs of the stars and they were able to have fine with the naked eye just so around 2 thousand all the stars that were able to precisely in the the coordinates of the of each of the star and so you could easily and find out in and sometimes what when we were when you would like to all the search for for for the subjects and in the Middle Ages and the Europe was not that much into the science because all the different things that happening here but a lot for us the Islamic Court was supporting tool into the science there very and puts her part of further than in this study has only been improved for them the middle of the observation and they were able to to discover a few galaxies and that's unsupervised well and they also introduced quite a lot of names and terms that don't know they say using astronomical so and but the 1st revolution in astronomy and in my opinion was actually an shows changing way of thinking of of the system of the solar system our so that the corporation in a Polish astronomers he decided to the tries the arts and put in the middle and the sun in In this case all the planets would be as supra and unwilling to around the Sun and there with this small that it was much easier to explain white upon our behavior like a behave right now and that that was just just literally was unable to prove it and the mathematical way or even observation because at that time that there was no and instruments list doing all of its efficiency with the naked eye what have called that came together we invited element and 1 of the 1st observation was looking knowledge was Jupiter and he discovered that there are on the computers a small objects that means that our answer grounded so it was kind of proved that it's possible that from the biggest that objects troubling gasses some smaller objects so that kind of proof and and that Copernicus company for the right and ended around the sun it's possible that all the planets are sequence and medium Cabrera just prove it this and is more than and mathematical ways and yes and do for the next 2 decades what was happening in astronomy was just improving in there and the telescopes and and the method of and all the observations and things that we were able to see deeper and deeper into the universe we were able to discover more objects that we able to create an ad bigger catalogs of their stars that we know it's an on In the photographic was infected from that point I think there are some animals were very fast and that a discovery of new objects because we were not there are only 2 2 following exactly the position of the objects but we were able also to the store and some information about it so as the forest that it's quite easy because the star doesn't move that fast but to with the photograph you were able to detect some new art objects that are passing a very fast and they're are not the brightest star both to it we were able to capture them wonderful so when you have like 1 of several of them for the graphic different nights and you can get some sort of some objects are moving reflect tweaking than you probably found some asteroids that it's just passing by and there's an analyst I think revolution industrial case with computers and of course today we cannot imagine even if and science without computers because we do some and nasty complicated the computational uh we replace the analog photographic by digital photography and yet we were able to withstand the even the telescope to to the space that's why you have only 2 and lots of noise is mandated by the atmosphere and the and we had a good tool that you see even deeper and discover very rare objects in the sky and so when we have a computer so we need also programming languages and they must not only the most important of programming languages ports on and see C + + why those 2 is because what they were made treat tool and to do something with the computation of very fast they`re very powerful and because so they're quite long already in use we have a lot of libraries and and a lot of software or these written it's someone so many software necessary written in Fortran C C + suppose that there is no in a sense trying to rewrite it in by tomorrow and other modern languages and this is just sort take it too too much time and OK so arousal as some of the most widely choose applied on so well let's just to show you there some results of the form that I sent to the and summer community and
1 of the 1st question I ask them is just what it used to buy time so I think that it's it's not really a huge surprise that the choosing because this is a huge community can easily get an answer they they have problems and and there is quite a lot of models that they can use it and they love it because young they get tools to create the plot and before there was some software but right now we're quite common they can actually customize as they want and as they wish and that's why they put a lot of it but what they are using for the bite on so yeah 1 of the 1st thing that today most most answers were answer was that drawing the plots they really didn't use it for the using some every single element scripts for from that for maintain some every day world the forests on a simple scripts that are using just for for the current work of course the using also for and that analysis of the observation and I heard also that some of the telescopes are controlled by the software written in and light what are the favorite mn package is there would be no surprises in Mumbai survive model the and drawing the plots and mouth and ossified and the other the next to a single electrical load about this is just the buckets as I mentioned in the beginning of concentrating all or most of the important matters in astronomy and astrophysics in 1 place and but I would like not to talk about all of them because then would even more much more time all like just to show you a few of them and just slightly described so what for they can be used and why they introduce them to justify the soul of 1st thing would units in physics and monks and money and you cannot tell and describe any events without uh without units you cannot say that someone is working with the 5 you knowledge he's walking 5 kilometres or was walking 5 minutes or with a speed of 5 minutes of 5 meters per 2nd or whatever so you need to use just to finish their and just go through 40 described the effect so supplied with fuel imports there's some modular units saying you can get most of them are important the units in an cost of Physics and Astronomy like metres kilometres so to should kilograms so on and so on so once you could use centimeters seeded object protein of course and winning of meat so I was thinking that it would be nice to show how is it work if we would just have a simple pruning task to so let's say that we would like to know how much time do you need to cover a distance of 15 km if you're moving 5 meters per 2nd so let's introduce that this task and if we call it would get the obvious which is quantity and and with the quantity would have the information of the value and of course all these big to what we can do with with subject well we can easily convert tool and value 2 meters school and the others distance land area course and apply and divided and so on and so on and so let's introduce also the velocity of the city as they say would be 5 meters per 2nd and the other in the upper science so if you want to know how much time do you need it you have to justify the distance by velocity and the result of this equation would be young free kilometres multiplied by by 2nd divided by media kind of weird silly unified for them for a time and unfortunately also pay have a problem which simplifies the units so if we have this kind of problems we have to admit a bit harder than just going to compose and where there is of course the correct answer which would be free thousand seconds which is 15 minutes OK so if we know how to define the distance I would like to talk about the distance in Australia and we are using few meters minus the test so we know how to how far it would be 5 kilometres away from human less Laura 5 minus its and but in astronomical images are not always that useful I mean we can use it for nearby objects like satellites like and but not that not much farther than in the mean is that in the years following is like 300 80 thousand kilometres away in the farthest away around for 100 and 5 thousand kilometres so you can see it's already kind of difficult to repeat this this number and this is not that far away and actually just nothing so if we would like to see the distance between our taxonomy you can see inside 150 millions kilometres away numerous if I would like to repeat the number here I would have some problems with that and because the astronomers like simple things they just introduced and a new union would be astronomically which is that from the definition of the stuff between art and science with this with this value can very easily and described the distance between planets and from from the sun or from each other and and it's just much easier status is like 5 are some economies instead of yeah a huge number of different and but this this class it's not good to be true we would like to travel in inside our galaxy right because while the rest of the nearest star are always like always far away from from us and then we need a new rule in you all you need with UV light years which could be also kind of confusing because from the very 1st point of no 1 knows what is it it could be like the of time but actually it's this task that highlights need to cover doing 1 of a 1 year which is yeah around 63 thousand astronomical units and but to the light years are very nice for galaxy inside the galaxy with we know already that there are other that axis we would like to travel the world galaxies need to another and another and you need of of the distance and we can use the process in which a from fusion would be like the . 26 so that ideas and with this you we can start to talk about to the get distance to galaxies was as school that close supernova and so OK so I would like to show you why so simple using the semantic units as you can see on the left side we have a planet planets in the solar system artists of course with 1 and get just easier stated Neptune is pretty astronomical units away from some yeah I know if it was is for billions and on the right side we have been fueled the nearest stars and the light years so you can remember 1 light year is 3 . 26 and not 663 63 thousand and astronomy community so yeah for the Proxima Centauri we need travel like 4 years with the speed of light to get there the OK enough only in and physics you also some constants and this coincides also with introduced to justify and i would like just to briefly show you the 2 of them 1 would be quite important direction of gravitational constant uh so was a college you get the value of good Arab all of this value of course you get the use because we are operating with the units and there some references where where you can find the actual diffusion of of and the 2nd concerns that I think it's kind of important in a strong will be solar masses and as you can see that the value is very very very high and and the sentence number actually really huge on any in the universe is actually the average size of the of the sun so and if we discover any any star and we we are able to determine that the mass of the star we will use the use of the mass of the sun OK there and the next thing
would be table it's set and scrutinized the subclasses using for us so because we can start to in dual quite honestly computational with but to introduce the table we need to free and freed equality and lists of things here would be the integer float and and Singh right so this is the way how we can we can introduce a table and a we can add the names of each of of the least we can add some extra metadata tool to the objects and see if we will call it good information about the land and how does it to the table looks like and and what we can do with the table where we came from the beginning just as today there was no new needs to 1 of the table right so let's set the unit and if will call it again will have the information needed for a 2nd to close this with the units of uh of seconds so now we can start to multiply and divide it with consultants from competition the roles and not only columns it's kind of a lot of things to to do with what there I think it's a worth to have that 5 minutes and just check it would for what you could use it for OK
and in astronomy you cannot do any observation if you don't have any coordinate systems you have to have some like the later part we spent an our we have we have in astronomy would have a different set coordinates depends on the on the telescope so that was created so what we don't know all day and all of the all the coordinates are and this this very cold in this very carry presentations and the only difference between them is the starting point of the of continent that the angles and here you have several ways of introducing and the coordinates and thanks to today supply coordinates so we have hero and 1 of the 1 of the coordinate system that we can describe the using their time which would be like 42 minutes and 5 foot and for the 2nd and the 2nd variable will be of 41 and 41 days and 12 minutes and and so on and so what we can do as I mentioned what we can do with this variable is emission would have a different kind of coordinate systems so 1st of all we can start to convert into a different representation and we can convert it to the cart assume that representation and get all the way on the value of the x y and z we can also convert just very call representation we can also convert tools and all the galactic all the time coordinate system here what I was using its a galactic and galactic coordinates just described and position of the galaxies and in a sky and what we
can also do we can also add that a distance after the objects and then when we call it and the characters representation will go to the value of N and the value of the response and the couple looks to the the couple looks are made for some specific times and 1 of the most popular time in Florida there 2 thousand years so we have tool represent that represents the position of the and of the object at the time that you would be able to do was very visible at the time of 2 thousand and thanks this weekend later transformed to all the books and check it and what's time and not uh and we can check that did the position of object was completely different like for example here 50 years ago so if we're just print the course itself to system 1 and up above 2 thousand and the 2nd in uh and you can see that in the position of the object was slightly slightly different
OK so I doubt all this is the part of the work I was doing OK 1 was an In the field of astronomy and the the software is a hybrid of Fortran and Python forthcoming do unfortunately most of the work he's doing the computation and is using just for and communicate between the user and and the 4th so with that with that package should we are able to rule on do no competition on periodic periodic orbits are the solution of the equation that I repeat you can sometimes which would be easier to say that if we have the orbit and some object is spinning around it and the period of the would be the 1 that after some time of the indulgent with him exactly the same position with the same value of the velocity in the same direction so thanks to this new software we are able to check how their system is changing when we increase for example 1 of the value and this case let's say that energy so once we add a little bit more energy to the objects that try of of that object would change and that's a bit software have us to find this changes and put it as a as a kind of family of all the of the periodic orbits and in some points so we can have several solutions for for the same and therefore the same and starting points and these points are called frication points so that it would be looks like fair if we represents an in home from obvious as a slight as a as a line the political this would be just adding some branches people to the last that this is this not in so
in my work who we choose 1 of the Hamiltonian which describe the energy of the system and buying giving their position and the and the speed of the objects on the left side of the things I choose adjustable upon section how could it orbits looks like so it's good to represent 1 1 periodic orbits and the is and what the weather today and the oppose showing that in this field we have in this place is we have carried orbit periodic there are not stable so after some time they can be they can't lose the stability and there will be no the more critical orbits and in this position where we have some kind of structures and obvious would stable and to even after thousands of years will be still pretty orbits and nothing would change on the right side we have the representation on the on the coordinates of of the value of energy in a
OK so where there is a place for quite some time to end it by John is used as a nation just to only communicated with the word for high so what we have to do 1st so we have to move on and to find a function which would be and the equation of motion for the Hamiltonian and it is described over here so we have to take out a derivative of each of the 4
of variables and the return the value to belong to the from from the function we also have to describe their or it's this 1st orbit that we are starting from so we have to to give some in initial conditions and just start compute you only get and the whole the whole of an orbit with the positions and velocities and if we have this information could start the end of competition and we get
some as some results so the results of this competition was getting at this uh uh this plot which shows that the mn which represents the family of the obvious that we are able to find an FIL here also which each 1 or pretty garbage and as you can see this is kind of evolution of of this 1 the and here the green stable and the obvious to the reader operate 1 are unstable and the schools are just showing like if we let the slides and this energy holiday or we expect in the system here we have a cultic could orbits which are unstable and here we have the stable 1 and this is just the the sections which follow exactly the same as if you we have a slightly different value of energy and yes so what I would like to do in my work on we were like looking for finding the branches but not in the fossil fuel and the flat 2 and images only to created the free and freely and maps of all the branches so we were starting to look at London's mean and branch over here
and it's a representing over here and we start to see how how the objects like as you can see this example of institution all of the symmetrical and critical repeats that can be seen over here we have 1 symmetry so 1 and and going from 1 point to another we can see how that what we should see how the obvious might change during the devolution of of the orbit and so we knew it that in this point a view from patient points from which we will get more out of solution so we could follow and those solutions and check how and how did orbits where looks like so if we go to the next slide we can see that after a be frication points so we use the symmetry is the 1st thing that were not using and the 2nd thing is that just after the frication points we have only few orbits that are stable and all of them are unstable was was also quite interesting that we have 2 different points but to actually they are kind of the common endeavor in this family and evolution of this funding and to yeah so that the dead so what we get from the from the Oslo from the packages and yeah that would be kind of all from from my talk so for the summary and what what I would like to say is just that Python is a start to be more and more popular and non-strongly mostly forums and teaching the students as a 1st step programming languages and the really love it for for draws of the and you know if if you're thinking that it's in the piconet could be I'm not just some revolution in astronomy it's most using those of problems for existing software has to be easier to communicate with and we've already existing software instead of wrote in new 1 because it's not the fastest Fortran or C + + so all the labels of thanks to and colleagues of mine at the look on their own on my presentation give me some corrections and that will be all
k is is due to the we have exhausted you Christians but but bigger for presentation and those short Introduction to Astronomy can you please explain what's behind the policy like understand like year is the path in the eigenface expand was a positive parsec is and a distance of us from it you need to know that seen as a are except for a value of so you have to be an you have to be that far away from the 3rd so you can see the distance from and not an entire art as a 1 arcsec value so this is kind of food and therefore the definition it's kind of difficult you you have to explain and but you something like that it was In December yeah um so I notice you're wearing and this STX next T-shirt i.e. working with sperm still at your current employer no knowledge what I've been 1 of the friends of mine trying to give us some more work but in the end it didn't want so and the work at the time I'm just working as a in August and weather-related really nice stuff and do you think a solution just sites known by of these type of things and when paroles order and extend the use of life that means astronauts thank you feel like acceleration in the descent and it's used mainly as a wrapper for other photon of suppressed last and have you heard about you know uses with site on my what they do use sci-fi and not by for some simple a simple scripts that they can be fair in our they could use in different languages but and by doing this you can read what much faster so as far as I know and what I was doing this work was just you know like simple computations that I just knew for the next day or whatever that's that's what I can say would be doomed movements using 2 routes linking the thank