LineInfo

class sofia_redux.spectroscopy.wave_calibration.LineInfo[source]

Bases: object

Attributes Summary

offset

Methods Summary

readlinelist(filename)

Read a Spextool line list

xguess(wavelength, xranges, orders)

Determine guess positions for lines of a given order

Attributes Documentation

offset

Methods Documentation

readlinelist(filename)[source]

Read a Spextool line list

Parameters:
filenamestr

A Spextool line nlist with | delimited columns of the order number, wavelengths, ids, fit windows, fit types, and number of fit terms.

Returns:
pandas.DataFrame
Columns are:
orderint

Order number

wavelengthfloat

Wavelength in microns

speciesstr

Line IDs

windowfloat

Fit window in microns

typestr

Fitting model. ‘G’ = Gaussian, ‘L’ = Lorentzian

ntermsint

Number of terms in the fit. 3=basic, 4=basic+constant, 5=basic+line

xguess(wavelength, xranges, orders)[source]

Determine guess positions for lines of a given order

Updates the table with:

xguess -> x positions of lines in xspec (float) xwindow -> The fit window in units of pixels (int)

Parameters:
wavelengthnumpy.ndarray

(norders, nwave) of float array of wavelengths in microns for each order.

xrangesnumpy.ndarray

(norders, 2) of int array of column numbers where the orders are completely on the array. xranges[:, 0] = lower limit, and xranges[:, 1] = upper limit.

ordersnumpy.ndarray

(norders,) array of int giving the order numbers.