Catch that asteroid in Python using poliastro!
If you want to know more about poliastro, check out my previous articles on LinkedIn https://www.garudax.id/pulse/per-python-ad-astra-astrodynamics-juan-luis-cano-rodr%C3%ADguez
It fills us with astronomical joy to announce the release of poliastro 0.7.0! 🚀
For the newcomers, poliastro is a pure Python library that allows you to simulate and analyze interplanetary orbits in a Jupyter notebook in an interactive and easy way, used by people from all around the world. Sounds interesting? Read on!
This release is the biggest one since the creation of the project in terms of code changes and new features, and on behalf of the poliastro development team I would like to deeply thank the European Space Agency for the SOCIS grant that made it possible. Besides, I would like to officially welcome Antonio Hidalgo to the team, since in reward for his amazing work during SOCIS he gained write access to the repository. ¡Bienvenido Antonio!
As always, the easiest way to get poliastro in any platform is using conda:
conda install poliastro --channel conda-forge
Release highlights
New NEOS package
As you have been reading in this blog during the summer, Antonio implemented a new poliastro.neos package which reads public asteroid and comet data from NASA JPL and loads it as poliastro Orbit objects. Using it is as simple as
from poliastro.neos import neows
apophis_orbit = neows.orbit_from_name('apophis')
And you can get nice plots like this one:
To know more about how to handle NEOS in poliastro check out the corresponding Jupyter notebook!
Coordinate frame transformations
In this release we took the issue of coordinate frames very seriously, namely because the REST APIs we are using to retrieve the orbits of NEOs use an heliocentric ecliptic frame that is different from ICRS, the standard frame assumed in poliastro.
As a result, we are working hard with the Astropy core devs to properly define ecliptic coordinates and their transformations to other reference frames. You can have a sneak peek of this work by using the new poliastro.frames module:
from astropy.coordinates import (
ICRS, CartesianRepresentation, CartesianDifferential)
from poliastro.neos import neows
from poliastro.frames import HeliocentricEclipticJ2000
florence = neows.orbit_from_name("Florence")
florence_heclip = HeliocentricEclipticJ2000(
x=florence.r[0], y=florence.r[1], z=florence.r[2],
d_x=florence.v[0], d_y=florence.v[1], d_z=florence.v[2],
representation=CartesianRepresentation,
differential_cls=CartesianDifferential,
obstime=EPOCH
)
florence_icrs = florence_heclip.transform_to(ICRS)
This way you can mix orbits expressed in different frames as it is done here!
For details on how this is done, check out the Jupyter notebook that studies the orbit of the Florence asteroid.
And many more!
There were so many changes in this release that describing them in full would take us a while. We recommend interested readers to check the full release notes of poliastro 0.7.0 in the official documentation.
This release arrived just in time to PyConES 2017, the Spanish Python Conference. Our talk on poliastro and NEOS (Spanish) was accepted, so we hope the public will enjoy our little Python library. See you there!
If you use poliastro and are happy with it, please send us a little paragraph to contact@poliastro.space and we will publish it under our Success Stories section!
As a last note, we would like to invite you to our community chat so you can share your impressions on the library, ask questions, or just say "Thank you! 💙"
Per Python ad astra!
---
This is a summary of the original article that can be read here http://blog.poliastro.space/2017/09/15/2017-09-15-poliastro-070-released-ready-pycones/
This is an amazing job. Congrats!