get_atran#
- sofia_redux.instruments.fifi_ls.get_atran.get_atran(header, resolution=None, atran_file=None, get_unsmoothed=False, atran_dir=None, use_ecmwf=True, ecmwf_dir=None, ozone_model=39, interpolated=True)[source]#
Retrieve reference atmospheric transmission data.
ATRAN files in the data/atran_files directory should be named according to description in https://doi.org/10.18419/DARUS-5705:
atran_sdc_[alt]K_[za]deg_[wv]pwv_[ozone]deg_2nlayer_[wmin]-[wmax]mum_bt.fits
“[ozone]deg” denotes the Ozone column model (9, 30, 39, 43, or 59); “2nlayer” (currently fixed) denotes the number of atmospheric layers used in ATRAN. The FIFI-LS files have a wavelength range of 40 to 300 microns.
Two selection modes are available via the
interpolatedparameter:interpolated=True(default): Loads the four ATRAN files that bracket the observed ZA and WV values and linearly interpolates between them.interpolated=False: Selects the single ATRAN file with the nearest matching ZA, altitude, and WV values.
In both modes, if
atran_fileis provided it is used directly and the selection logic is skipped entirely.- Parameters:
- headerfits.Header
ATRNFILE keyword is written to the provided FITS header, containing the name of the ATRAN file used.
- resolutionfloat, optional
Spectral resolution to which ATRAN data should be smoothed.
- atran_filestr, optional
Exact path to an ATRAN file to use directly. If provided, the normal file selection and interpolation are skipped. If the file is not found, a warning is issued and automatic selection is used as fallback.
- get_unsmoothedbool, optional
If True, return the unsmoothed atran data in addition to the smoothed.
- atran_dirstr, optional
Path to a directory containing ATRAN reference FITS files. If not provided, files will be downloaded from the SOFIA Astronomy Dataverse (https://darus.uni-stuttgart.de/dataverse/irs-sofia-ad).
- use_ecmwfbool, optional
Whether to get water vapor from ECMWF data. If False, WVZ_OBS from the header is used. If WVZ_OBS is missing, ECMWF is applied automatically with a warning.
- ecmwf_dirstr, optional
Directory containing ECMWF data files, required if use_ecmwf is True.
- ozone_modelint, optional
Ozone column model in degrees. Currently fixed at 39, which is the only model available via DaRUS. Default is 39.
- interpolatedbool, optional
If True (default), linearly interpolate between the four ATRAN files bracketing the observed ZA and WV. If False, use the single nearest-matching file.
- Returns:
- numpy.ndarray or tuple of numpy.ndarray
A (2, nw) array of [wavelengths, smoothed transmission]. If
get_unsmoothedis True, returns a tuple(smoothed_array, unsmoothed_array).