Python AstroLib¶
The aim of this project is to bundle a number of helpful rather small-scale routines. This comprises porting the well-known “IDL Astronomy User’s Library” (AstroLib) to Python. As the corresponding IDL code has been in use for decades now, it is “tested by application”. Therefore, we try to stay as close as possible to the IDL implementation. Furthermore, helpful routines will be added.
Note
This is not an attempt to port the entire IDL library at once. We do what we need! Help is appreciated.
Available functionality¶
Below, you find a list of available functionality roughly sorted by category.
General algorithms¶
- Calculate a Keplerian (two body) orbit
- Magnitude conversions
- S-Index and RHK
- Atomic number and elemental symbols
- Elemental abundances
- X-ray luminosity / rotation period relations
- Converting between effective temperature and stellar color
- Stellar ages
- Spectral type vs. Teff and luminosity
- Roche potential
- SysRem
General data analysis¶
Spectral routines¶
- Wavelength conversion (air and vacuum)
- Barycentric velocity correction
- Planck’s radiation law
- Cross-correlation
- Doppler shifting a spectrum
- Broadening mechanisms and routines
- Deredden flux vector (unred)
- Convert damping constant into line width
- Flux-photon conversion
- Read/write 1d spectrum from/to fits file
- Photometric filter transmission curves
Coordinates, time, and observation tools¶
- Julian/calendar date and heliocentric correction
- Decimal representation of year
- Aitoff projection
- Position of the Sun
- Nutation
- Aberration
- Observed and apparent altitude
- Horizontal coordinates
- Lunar phase and position
- Convert azimuth into cardinal point
- Name twilight given solar altitude
- Get angular distance from RA and DEC
- Calculate the position angle
- Calculate the airmass
- Observatory locations
- Conversion between sexagesimal and decimal coordinate representation
- Apply proper motion
- Galactic space velocity (UVW)
- Parallactic angle
- Solar direct flux
Transit and planet routines¶
Statistics¶
Resource based helpers¶
- Evolutionary tracks (Baraffe et al. 98)
- Access the “NASA Exoplanet Archive”
- Access the exoplanet.eu data base
- Access the exoplanets.org data base
- The SWEET-Cat catalog
- Access to Kurucz atmospheric models
- First ionization potential
- A Modern Mean Stellar Color and Effective Temperature Sequence for O9V-Y0V Dwarf Stars
- Library of stellar spectra
License note¶
The “IDL Astronomy User’s Library” is released in “public domain”. That means that nobody holds the copyright and, thus, nobody has the right to sublicense it (not even the authors). As we remain as close as possible in code and ship the documentation mainly as is, it would be quite cumbersome to actually assign copyright to parts written by us. Therefore, code which was directly ported from the IDL Astronomy User’s Library is released in public domain and is marked by a note in the respective documentation saying:
This function was ported from the IDL Astronomy User's Library.
All other code not carrying this note (may include fresh implementations of functionality already provided by the IDL Astronomy User’s Library, newly introduced functions, etc.) is released under the MIT license.