SOFIAChooser¶
- class sofia_redux.pipeline.sofia.sofia_chooser.SOFIAChooser[source]¶
Bases:
Chooser
Choose SOFIA Redux reduction objects.
Currently, HAWC+, FORCAST, FIFI-LS, FLITECAM, and EXES instruments are fully supported.
Input data that cannot be read as a FITS file by
astropy.io.fits
is ignored. If there is no good data to reduce, a null value (no reduction object) is returned.HAWC data is determined by the value of the INSTRUME keyword. If it is set to ‘HAWC_PLUS’, a HAWCReduction object is instantiated and returned. This reduction object handles all instrument modes for the HAWC DRP pipeline.
FORCAST data has keyword INSTRUME = ‘FORCAST’. Imaging data is determined from the value of the SPECTEL1 and 2 keywords: if the primary filter is not a known grism, then the data is assumed to be imaging. In this case, a FORCASTImagingReduction object is instantiated and returned. Otherwise, a FORCASTSpectroscopyReduction object is returned.
FIFI-LS data has keyword INSTRUME = ‘FIFI-LS’. A FIFILSReduction object is returned for all FIFI-LS data.
FLITECAM data has keyword INSTRUME = ‘FLITECAM’. Imaging and spectroscopy types are distinguished via the INSTCFG keyword, and a FLITECAMImagingReduction or FLITECAMSpectroscopyReduction object is returned, as appropriate.
EXES data has keyword INSTRUME = ‘EXES’. An EXESReduction object is returned for all EXES data.
If input data types do not match, or if no more specific reduction object was found, a generic Reduction object is returned.
Initialize the chooser.
Methods Summary
choose_reduction
([data, config])Choose a reduction object.
get_key_value
(header, key)Get a key value from a header.
Methods Documentation
- choose_reduction(data=None, config=None)[source]¶
Choose a reduction object.
- Parameters:
- datalist of str, optional
Input FITS file paths. If not provided, None will be returned.
- configstr, dict, or ConfigObj, optional
Configuration file or object. May be any type accepted by the
configobj.ConfigObj
constructor. If present, may be used to choose specialized reductions for some instruments.
- Returns:
- Reduction or None
The reduction object appropriate to the input data.
- get_key_value(header, key)[source]¶
Get a key value from a header.
- Parameters:
- header
astropy.io.fits.Header
FITS header.
- keystr
Key to retrieve.
- header
- Returns:
- str
String representation of the value; UNKNOWN if not found.