get_response

sofia_redux.instruments.fifi_ls.get_response.get_response(header, filename=None)[source]

Retrieve instrumental response data.

Reponse files are identified by a configuration file called response_default.txt in the data/response_files directory. This file must contain 4 columns: end date (YYYYMMDD), channel (b1, b2, or r), dichroic (105 or 130), and filepath (relative to the data directory).

The procedure is:
  1. Identify response file, unless override is provided.

  2. Read response data from file.

  3. Return response array.

Parameters:
headerfits.Header

FITS header for input data to match. The header will be updated with the RSPNFILE keyword containing the name of the response file used.

filenamestr, optional

Response file to be used. If not provided, a default file will be retrieved from the data/response files directory, matching the date, channel, and dichroic of the input header. If an override file is provided, it should be a FITS image file containing wavelength, response, and error on the response in an array of three rows in the primary extension.

Returns:
numpy.ndarray

(3, nw) array where [0, :] = wavelength, [1, :] = response data, and [2, :] = error.