read_respfile¶
- sofia_redux.calibration.pipecal_config.read_respfile(fname, spectel)[source]¶
Read response files.
Response files contain the coefficients of polynomial fits to standard atmospheric models, folded through instrumental response models for a particular instrument and mode, at a range of wavelength band-passes (instrument filters).
The format is assumed to be:
two lines beginning with ‘#’ that contain reference values used for the response fit, e.g.:
# ALTMIN=35.0 ALTMAX=45.0 ALTREF=41.0 # ZAMIN=30.0 ZAMAX=70.0 ZAREF=45.0
one line for each filter containing:
the filter reference wavelength
the filter name
a reference response value
any number of polynomial coefficients, beginning with the constant term
The filter name is matched to the provided
spectel, and the corresponding fit coefficients are returned, along with the reference values.- Parameters:
- fnamestring
Full path name of response file.
- spectelstring
Name of filter used.
- Returns:
- resp_configdictionary
A dictionary with the details of the filter’s response. Keys are: respref, altwvref, altwvrange, zaref, zarange, coeff.
- Raises:
- PipeCalError
If errors are found while reading or parsing the file.