Astronomy-related packages in Python
AstroPy
This project, by benign design, is gradually swallowing everything else. This can be direct incorporation if the package is mature and compatible enough, or as affiliated or coordinated packages with a looser relationship.
AstroPy in turn is a NumFOCUS sponsored project within that wider ecosystem of open-source scientific programming. Check it out, and please donate some cash if you can afford it – we all benefit.
- Website: astropy.org/
- GitHub: github.com/astropy/astropy
- Tutorials in Jupyter Notebook format (excellent!): learn.astropy.org/ and github.com/astropy/astropy-tutorials
Astroquery
Astroquery is a set of tools for querying astronomical web forms and databases (to quote the website). Broad-ranging and versatile, which inevitably makes it a bit confusing for novices like me, but very valuable.
AstroML
Machine learning and data mining for astronomy.
- Website: astroml.org/
- GitHub: https://github.com/astroML/astroML
- Book to accompany the project: Statistics, Data Mining, and Machine Learning in Astronomy. I have the first edition (2014), which is excellent. An updated edition was released late 2019.
Astroplan
A toolbox for observation planning.
Astral
A relatively small Python module to calculate things like sunrise/sunset and moon phases. This can be done in Astroplan but Astral may be easier if that’s all you need.
pywwt
A python wrapper for the Worldwide Telescope. It runs in Jupyter notebooks or in a Qt window.
- Docs: https://pywwt.readthedocs.io/en/stable/annotations.html
- GitHub: github.com/WorldWideTelescope/pywwt
I haven’t yet got it working in streamlit.
Rebound
Primarily an efficient N-body simulator, but it also does animated displays in Jupyter that are otherwise quite difficult. It has APIs for both C and Python. I like this package!
Links: docs, GitHub. There are lots of non-trivial examples.