get_flat_from_cache

sofia_redux.instruments.fifi_ls.apply_static_flat.get_flat_from_cache(specfile, spatfile, obsdate)[source]

Retrieves flat data from the flat cache.

Checks to see if the file still exists, can be read, and has not been altered since last time. If the file has changed, it will be deleted from the cache so that it can be re-read.

Parameters:
specfilestr

File path to the spectral flat file

spatfilestr:

File path to the spatial flat file

Returns:
filename, spat_flat, spec_flat, spec_wave, spec_err
filenamestr

Used to update FLATFILE in FITS headers

spat_flatnumpy.ndarray

Spatial flat (nwave, nspaxel, nspexel)

spec_flatnumpy.ndarray

Spectral flat (nwave, nspaxel, nspexel)

spec_wavenumpy.ndarray

Spectral wavelengths (nwave)

spec_errnumpy.ndarray

Error at each wavelength (nwave)