get_model

sofia_redux.instruments.forcast.getmodel.get_model(header, resolution, filename=None, get_unsmoothed=False, model_dir=None)[source]

Retrieve reference standard model data.

Model files in the data/model_files directory should be named according to the object and date to which they apply, as:

[object]_[YYYYMMDD(HH)]_model.fits

The date may be omitted, if the model applies to all dates. For example, the file generated for Ceres on Jan. 14 2020 should be named:

ceres_20200114_model.fits

The procedure is:

  1. Identify model file by object name and date.

  2. Read model data from file and smooth to expected spectral resolution.

  3. Store in cache and return data array.

Parameters:
headerastropy.io.fits.header.Header

ATRNFILE keyword is written to the provided FITS header, containing the name of the model file used.

resolutionfloat

Spectral resolution to which model data should be smoothed.

filenamestr, optional

Model file to be used. If not provided, a default file will be retrieved from the data/grism/standard_models directory. The file with a matching object name and the closest date will be used.

get_unsmoothedbool, optional

If True, return the unsmoothed model data with original wavelength array in addition to the smoothed array.

model_dirstr, optional

Path to a directory containing model reference FITS files. If not provided, the default set of files packaged with the pipeline will be used.

Returns:
modelnumpy.ndarray

A (2, nw) array containing wavelengths and model data.

unsmoothednumpy.ndarray, optional

A (2, nw) array containing wavelengths and unsmoothed model data, returned only if get_unsmoothed is set.