get_badpix

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

Retrieve bad pixel data.

Badpix files are identified by a configuration file called badpix_default.txt in the data/badpix_files directory. This file must contain 3 columns: end date (YYYYMMDD), channel (b1, b2, or r), and filepath (relative to the data directory).

The procedure is:

  1. Identify badpix file, unless override is provided

  2. Read badpix data from file

  3. Return badpix array

Parameters:
headerfits.Header

FITS header from which to determine badpix file. Will be updated with BDPXFILE keyword.

filenamestr, optional

Direct path to a badpix file (overrides header logic)

Returns:
numpy.ndarray

(n_values, (spexel number, spaxel_number))