Observations (taurex.spectrum
)¶
Base¶
Contains the basic definition of an observed spectrum for TauRex 3
-
class
BaseSpectrum
(name)[source]¶ Bases:
taurex.log.logger.Logger
,taurex.data.fittable.Fittable
,taurex.output.writeable.Writeable
Abstract class
A base class where spectrums are loaded (or later created). This is used to either plot against the forward model or passed into the optimizer to be used to fit the forward model
- Parameters
name (str) – Name to be used in logging
-
property
binEdges
¶ Requires Implementation
Should return the bin edges of the wavenumber grid
- Raises
NotImplementedError –
-
property
binWidths
¶ Requires Implementation
Should return the widths of each bin in the wavenumber grid
- Raises
NotImplementedError –
-
property
derivedParameters
¶
-
property
errorBar
¶ Requires Implementation
Should return the error. Must be the same shape as
spectrum()
- Raises
NotImplementedError –
-
property
fittingParameters
¶
-
property
rawData
¶ Requires Implementation
Should return the raw data set.
- Raises
NotImplementedError –
-
property
spectrum
¶ Requires Implementation
Should return the observed spectrum.
- Raises
NotImplementedError –
-
property
wavelengthGrid
¶ Requires Implementation
Should return the wavelength grid of the spectrum in microns. This does not need to necessarily match the shape of
spectrum()
- Raises
NotImplementedError –
-
property
wavenumberGrid
¶ Wavenumber grid in cm-1
- Returns
wngrid
- Return type
array
Array¶
-
class
ArraySpectrum
(spectrum=None)[source]¶ Bases:
taurex.data.spectrum.spectrum.BaseSpectrum
Loads an observed spectrum from an array and computes bin edges and bin widths. Spectrum shape(nbins, 3-4) with 3-4 columns with ordering:
wavelength (um)
spectral data
error
(optional) bin width
If no bin width is present then they are computed.
- Parameters
filename (string) – Path to observed spectrum file.
-
property
binEdges
¶ Bin edges
-
property
binWidths
¶ bin widths
-
property
errorBar
¶ Error bars for the spectrum
-
property
rawData
¶ Data read from file
-
property
spectrum
¶ The spectrum itself
-
property
wavelengthGrid
¶ Wavelength grid in microns
-
property
wavenumberGrid
¶ Wavenumber grid in cm-1
Observed¶
-
class
ObservedSpectrum
(filename=None)[source]¶ Bases:
taurex.data.spectrum.array.ArraySpectrum
Loads an observed spectrum from a text file and computes bin edges and bin widths. Spectrum must be 3-4 columns with ordering:
wavelength
spectral data
error
(optional) bin width
If no bin width is present then they are computed.
- Parameters
filename (string) – Path to observed spectrum file.
Iraclis¶
-
class
IraclisSpectrum
(filename=None)[source]¶ Bases:
taurex.data.spectrum.array.ArraySpectrum
Loads an observation from Iraclis pickle data
- Parameters
filename (string) – Path to observed spectrum file.
Taurex¶
-
class
TaurexSpectrum
(filename=None)[source]¶ Bases:
taurex.data.spectrum.array.ArraySpectrum
Observation is a taurex spectrum from a HDF5 file
An instrument function must have been used for this to work
- Parameters
filename (string) – Path to taurex spectrum HDF5 output.
Lightcurves¶
Module dealing with observed lightcurves
-
class
ObservedLightCurve
(filename=None)[source]¶ Bases:
taurex.data.spectrum.spectrum.BaseSpectrum
Loads an observed lightcurve from a pickle file.
- Parameters
filename (str) – Path to pickle file containing lightcurve data
-
property
binEdges
¶ Returns bin edges for wavelength grid
- Returns
out
- Return type
array
-
property
binWidths
¶ Widths for each bin in wavelength grid
- Returns
out
- Return type
array
-
property
errorBar
¶ Like
spectrum()
except its the error at each point in the lightcurve spectrum- Returns
err – Error at each point in lightcurve spectrum
- Return type
array
-
property
rawData
¶ Raw lightcurve data read from file
- Returns
lc_data
- Return type
array
-
property
spectrum
¶ Returns Light curve spectrum. The lightcurve spectrum comes in the form of multiple lightcurves stuck together into one long spectrum. The number of lightcurves is equal to the number of bins in
wavelengthGrid()
.- Returns
spectrum
- Return type
array
-
property
wavelengthGrid
¶ Returns wavelength grid in microns
- Returns
wlgrid
- Return type
array