Astronomical modules and libraries in Python

There are many special astronomical libraries in the Python world, mostly developed in the context of research work in institutes and made available to the community. I am posting some URLs here. The programs are described on the corresponding web pages and can be downloaded there and installed in your own Python environment according to the installation instructions.

The most extensive system is probably astropy:

The astropy package contains key functionality and common tools needed for performing astronomy and astrophysics with Python. It is at the core of the Astropy Project, which aims to enable the community to develop a robust ecosystem of Affiliated Packages covering a broad range of needs for astronomical research, data processing, and data analysis.

Another interesting library is PyAstronomy:

PyAstronomy (PyA) is a collection of astronomy related packages.

The aim of PyAstronomy is to provide a collection of packages, which fulfill a certain standard both in code and documentation quality. In this way, we (the PyA group) want to ensure that PyA packages constitute an enjoyable tool for enhancing the efficiency of our/your work and not another source of painful experiences.

PyA emerged from the work of some people at the Hamburger Sternwarte. It has not been designed to cover some particular field, but we integrated tools, which we found useful during our work. Other people have different needs and also ours are evolving. Therefore, we expect PyA to grow both by our own contributions and, hopefully, contributions from others.

For example, astroplan can be used for planning observations:

astroplan is an open source Python package to help astronomers plan observations.

The goal of astroplan is to make a flexible toolbox for observation planning and scheduling. When complete, the goal is to be easy for Python beginners and new observers to to pick up, but powerful enough for observatories preparing nightly and long-term schedules.


    • Calculate rise/set/meridian transit times, alt/az positions for targets at observatories anywhere on Earth
    • Built-in plotting convenience functions for standard observation planning plots (airmass, parallactic angle, sky maps).
    • Determining observability of sets of targets given an arbitrary set of constraints (i.e., altitude, airmass, moon separation/illumination, etc.).


For spectroscopic purposes the following URLs are of importance:


specutils is a Python package for representing, loading, manipulating, and analyzing astronomical spectroscopic data. The generic data containers and accompanying modules provide a toolbox that the astronomical community can use to build more domain-specific packages.



Baseline Fitting describes baseline & continuum fitting.

Model Fitting describes the general process of model fitting.

Measurements is a toolkit for performing EQW, column, and other measurements…

Units contains the all-important SpectroscopicAxis class that is used to deal with coordinate transformations


linetools is an in-development package for the analysis of 1-D spectra. Its core developers work primarily on UV/optical/IR absorption line research, so most of the functionality is aimed at the identification and analysis of absorption lines. The eventual goal is to provide a set of tools useful for both absorption and emission lines.


iSpec is a tool for the treatment and analysis of stellar spectra. Some of the main functionalities for spectra treatment are the following:

    • Cosmic rays removal
    • Continuum normalization
    • Resolution degradation
    • Radial velocity determination and correction
    • Telluric lines identification
    • Re-sampling


A Spectroscopy and astrophysics Library for Python 3
This Python package is an expanding code base for doing computational astronomy, particularly spectroscopy. It contains both a
Spectrum class for handling spectra as objects (with +, -, *, /, etc… operations defined) and a growing suite of analysis tools.


An overview of python-based programs and libraries for astronomical applications can be found here:

A general introduction to working with astronomical data, including a short introduction to Python, can be downloaded as pdf here:


Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

Du kommentierst mit Deinem Abmelden /  Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s