sofia_redux.instruments.exes: EXES Data Reduction Algorithms#

The sofia_redux.instruments.exes package contains data reduction algorithms for the EXES instrument. It is designed to be used with the sofia_redux package, so it does not provide its own interfaces or workflows. See the sofia_redux.pipeline documentation for more information on the pipeline interfaces, or the API documentation below for more information on EXES algorithms.

Practical Data Reduction for EXES#

Flat Procedure#

Flat fields for EXES are used to correct for instrumental response, calibrate to physical units, and identify or tune optical distortion parameters.

Reference/API#

sofia_redux.instruments.exes.calibrate Module#

Functions#

calibrate(data, header, flat, variance[, ...])

Calibrate spectral image to physical units.

sofia_redux.instruments.exes.cirrus Module#

Functions#

cirrus(data, header, abeams, bbeams, flat)

Correct nod-off-slit data for residual sky noise.

sofia_redux.instruments.exes.clean Module#

Functions#

clean(data, header, std[, mask, radius, ...])

Correct bad pixels.

sofia_redux.instruments.exes.coadd Module#

Functions#

coadd(data, header, flat, variance[, illum, ...])

Combine individual frames to increase signal-to-noise.

sofia_redux.instruments.exes.correct_row_gains Module#

Functions#

correct_row_gains(data)

Correct odd/even row gain offsets.

sofia_redux.instruments.exes.debounce Module#

Functions#

debounce(data, header, abeams, bbeams, flat)

Correct for optics shifts between nods (bounces).

sofia_redux.instruments.exes.derasterize Module#

Functions#

derasterize(data, header[, dark_data, ...])

Read and recombine a rasterized flat file.

sofia_redux.instruments.exes.derive_tort Module#

Functions#

derive_tort(data, header[, maxiter, fixed, ...])

Derive distortion parameters and identify orders and illuminated regions.

sofia_redux.instruments.exes.despike Module#

Functions#

despike(data, header[, variance, abeams, ...])

Correct outlier pixels due to temporal spikes.

sofia_redux.instruments.exes.diff_arr Module#

Subtract sky frames or nod pairs.

Functions#

diff_arr(data, header, abeams, bbeams, variance)

Subtract sky frames, nod pairs, or a dark frame.

sofia_redux.instruments.exes.get_atran Module#

Functions#

clear_atran_cache()

Clear all data from the atran cache.

get_atran_from_cache(atranfile, resolution)

Retrieves atmospheric transmission data from the atran cache.

store_atran_in_cache(atranfile, resolution, ...)

Store atmospheric transmission data in the atran cache.

get_atran(header, resolution[, filename, ...])

Retrieve reference atmospheric transmission data.

sofia_redux.instruments.exes.get_badpix Module#

Functions#

get_badpix(header[, clip_reference, ...])

Get a bad pixel mask from a reference file.

sofia_redux.instruments.exes.get_resolution Module#

Functions#

get_resolution(header)

Retrieve expected spectral resolving power.

sofia_redux.instruments.exes.lincor Module#

Functions#

lincor(data, header)

Correct raw readout frames for detector nonlinearity.

sofia_redux.instruments.exes.make_template Module#

Functions#

make_template(data, header, weighting_frame)

Make a spectral template for weighting and shifting spectra.

sofia_redux.instruments.exes.makeflat Module#

Functions#

makeflat(cards, header, variance[, robust, ...])

Generate calibrated flat frame; set distortion parameters.

blackbody_pnu(wavenumber, temperature)

Black-body photon function.

bnu(wavenumber, temperature)

Black-body intensity function.

bb_cal_factor(wavenumber, bb_temp, ...)

Calibration factor for EXES blackbody source + flat mirror.

sofia_redux.instruments.exes.mergehdr Module#

Functions#

mergehdr(headers[, reference_header])

Merge input headers.

sofia_redux.instruments.exes.readhdr Module#

Functions#

readhdr(header[, check_header, config_file, ...])

Read and update an EXES FITS header.

sofia_redux.instruments.exes.readraw Module#

Functions#

readraw(data, header[, do_lincor, ...])

Correct for nonlinearity combine individual readouts.

sofia_redux.instruments.exes.spatial_shift Module#

Functions#

spatial_shift(data, header, flat, variance)

Shift spectra for spatial alignment.

sofia_redux.instruments.exes.submean Module#

Functions#

submean(data, header, flat, illum, order_mask)

Subtract residual sky background from nod-on-slit data by removing the mean value at each wavelength.

sofia_redux.instruments.exes.tort Module#

Functions#

tort(data, header[, variance, skew, order, ...])

Correct image for optical distortion.

sofia_redux.instruments.exes.tortcoord Module#

Functions#

tortcoord(header[, skew])

Calculate undistorted image coordinates.

sofia_redux.instruments.exes.utils Module#

Functions#

get_detsec(header_or_str)

Parse the DETSEC keyword in a header or from a string.

check_data_dimensions(**kwargs)

Check the data dimensions and return number of frames.

check_variance_dimensions(variance, nx, ny, nz)

Check variance dimensions for expected shape.

get_reset_dark(header)

Get a reset dark image from a file on disk.

set_elapsed_time(header)

Set the TOTTIME key in the header to the total elapsed time.

parse_central_wavenumber(header)

Parse the central wavenumber from the input header.

sofia_redux.instruments.exes.wavecal Module#

Functions#

wavecal(header[, order])

Generate a wavelength calibration map from the grating equation.