Skip to content

A toolbox of various methods for analysing astronomical spectra.

License

Notifications You must be signed in to change notification settings

jsimpson-astro/astra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

astra

The astra package (Astronomical Spectroscopy Tools for Rapid Analysis) is a small library of methods and tools for quick analysis of astronomical spectra, with a particular focus on spectra in time series.

astra is designed to be a simple toolbox of various methods used in spectral analysis, such as cross-correlation, optimal subtraction, and flux resampling. It is intended to be flexible, and easy to use, by having minimal dependencies and/or proprietary objects -- most methods work simiply by using NumPy arrays as spectra inputs and outputs.

astra also intends to make some older methods still used today easy to access and maintain, by providing native, well-documented, and Python-optimised versions that are simple to understand. The first methods ported as such come from the Fortran 77 program molly (e.g. correlate.xcorrelate and fitting.optsub).

Installation

To install astra, you can simply download and install in one line with pip:

pip install https://github.com/jsimpson-astro/astra/archive/main.zip

Overview of available methods

astra is organised into three main sub-modules and two auxiliary sub-modules:

  • correlate - methods for correlation/cross-correlation. Provides xcorrelate, which is a flexible function for performing cross-correlation analysis between a set of observed and template spectra. Masking is supported.

  • fitting - assorted fitting methods, including:

    • optsub: a simple function for performin optimal subtraction between a set of spectra and templates. Masking is supported.
    • linefitmc: a complex function for multiple-line fitting using emcee.
    • rvmc: a function for fitting radial velocities using emcee.
  • integrate - various methods for integrating spectra. Currently provides one operation, with more on the way:

    • ew: computes the equivalent width of one or multiple spectra. Masking is supported.

The two other sub-modules are utils, which contains various functions for performing simple operations on spectra (e.g. averaging, Doppler shifting), and plotting, which provides some general plotting methods for convenient display of results from astra methods.

The molly sub-module is deprecated, and will be removed in a future version.

Acknowledgement

If you find astra useful in your work, please reference this repository (https://github.com/jsimpson-astro/astra) in a footnote.

About

A toolbox of various methods for analysing astronomical spectra.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages