A collection of custom specutils loaders.
The easiest way to install the loaders is to simply download the .py
files containing the loaders to the ~.specutils
folder. (See section on Available Loaders for list of available loaders with their file names.)
Once the loaders are installed in the ~.specutils
directory, the normal specutils reader can be used to load a spectrum.
Example:
from specutils import Spectrum1D
spectrum = Spectrum1D.read("filename.dat", format="devred")
The devred and larionov loaders have the additional parameter force_increasing
, which is False by default. If set to true, the spectrum will be flipped (if necessary) so that the spectral axis is increasing. This is useful for spectra that are stored in decreasing order.
Example:
from specutils import Spectrum1D
spectrum = Spectrum1D.read("filename.dat", format="devred", force_increasing=True)
All loader files are located in the ./src/specloaders
folder.
name | Description | file |
---|---|---|
devred | Load a spectrum from a file produced by my devred program. | devred_loader.py |
larionov | Load a spectrum from a file produced by an IDL program written by Valeri M. Larionov. | larionov_loader.py |
Use this loader to load a spectrum form a file produced by my devred program.
This is basicaly a .dat
file with two columns. The first column is the
wavelength in Angstroms and the second column is the flux in units of
Warning
This loader assumes that the first line of the file is the header. If your file does not contain a header, the first line of the file will be ignored.
Use this loader to load a spectrum from a file produced by an IDL program written by Valeri M. Larionov.
This is basicaly a .dat
file with two columns. The first column is the
wavelength in Angstroms and the second column is the flux in units of