An extensible spectroscopic analysis toolkit for astronomy.

If you’re just getting started, see the examples page.

To cite pyspeckit, use….163..291G/abstract and


Supported file types and their formats:

Guides / Getting Started

If you’re already a python user, go straight to the examples page to get a quick start. For simple gaussian fitting, this example is a good starting point.

Classes and API

At the core, PySpecKit runs on a ‘Spectroscopic Object’ class called Spectrum. Therefore everything interesting about PySpecKit can be learned by digging into the properties of this class.

  • spectrum can read a variety of individual spectra types

    • Spectrum The Spectrum class, which is the core of pyspeckit. The __init__ procedure opens a spectrum file.

    • Spectra A group of Spectrum s. Generally for when you have multiple wavelength observations you want to stitch together (e.g., two filterbanks on a heterodyne system, or the red/blue spectra from a multi-band spectrometer like the Double Imaging Spectrograph)

    • ObsBlock An Observation Block - multiple spectra of different objects or different times covering the same wavelength range

  • Cubes is used to deal with data cubes and has functionality similar to GAIA and ds9.

    • Cube A Cube of Spectra. Has features to collapse the cube along the spectral axis and fit spectra to each element of the cube. Is meant to replicate Starlink’s GAIA in some ways, but with less emphasis on speed and much greater emphasis on spectral line fitting.


[edit this page on github]

[edit this page on bitbucket]