Set of class and method to handle wavelength solutions
World Coordinate System class for Spectroscopy
This class is intended to contain methods for all operations regarding WCS for spectroscopy or wavelength solution operations. Starting on the fitting to writing (and reading) from a FITS header.
fit(physical, wavelength, model_name='chebyshev', degree=3)¶
Fits a mathematical model
physical (list) – List of line centers in pixel
wavelength (list) – List of line centers in Angstroms
model_name (str) – Name of the Mathematical model that needs to be created
degree (int) – Degree or order of the mathematical model (usually is some kind of polynomial).
Returns the wavelength solution model if exists.
Read WCS from FITS header
The mathematical model stays as an attribute of the class as model
ccd (CCDData) – with FITS’s wavelength solution.
A list with an array representing the wavelength axis and another representing the intensity (ccd.data).
Read a GSP-specific wavelength solution
ccd (CCDData) –
Write FITS WCS to the header
This method is not implemented, in the current version the equivalent method resides within goodman.pipeline.spectroscopy.wavelength.py
ccd (CCDData) –
model (object) – Instance of astropy.modeling.Model that should be the mathematical representation of the wavelength solution of ccd
Writes a GSP-specific wavelength solution
In an effort to easily write non-linear wavelength solutions into a fits header this method add a set of keywords that describes a pixel to angstrom relationship by means of using the astropy’s modeling tools.
GSP stands for Goodman Spectroscopic Pipeline.
A limited amount of mathematical models are implemented on the read side. So you have to be careful what you write.
ccd (CCDData) – attribute will be modified
model (object) – astropy.modeling.Model instance.