Sphinx logo

Spylot – Spectrum Plotter

This application is a spectrum plotting/interactive analysis tool based on Traits. It is essentially a GUI wrapper and interface around a collection of astropysics.spec.Spectrum objects.

It can be run as part of a python script or interactively in ipython by generating astropysics.gui.spylot.Spylot objects or calling the astropysics.gui.spylot.spylot_specs() function as detailed below. A command-line script ‘spylot’ is also installed when you install astropysics. The command-line tool takes the name of the spectrum file to display and the following options:

-h, --help show help message and exit
-t TYPE, --type=TYPE
 file format of spectra: “wcs”, “deimos”, or “astropysics”(default)
-e EXT, --extension=EXT
 Fits extension number
 File to save Spylot configuration to
class astropysics.gui.spylot.Spylot(specs, **traits)

This class represents the spylot application state.

Parameters:specs (astropysics.spec.Spectrum) – The spectra/um to be analyzed as a sequence or a single object.

kwargs are passed in as additional traits.

defaultlines = 'galaxy'

This class attribute sets the default line lists to use - ‘galaxy’ or ‘stellar’

astropysics.gui.spylot.spylot_specs(specs, block=False, newapp=False)

Generates a Spylot instance containing the supplied sequence of spectra and displays it.

  • specs (astropysics.spec.Spectrum) – The spectra/um to be analyzed as a sequence or a single object.
  • block (boolean) – If True, this function will block all execution until the spylot GUI is closed. Otherwise, it will return if in a multi-threaded environment.
  • newapp (boolean) – If True, a GUI application instance will be created. If one already exist (e.g. interactive mode of ipython), this should be left False.

the astropysics.gui.spylot.Spylot instance

Previous topic

GUI applications

Next topic

Spectarget – MOS Targeting

This Page