slit_extended_flux_calibration¶
- msaexp.utils.slit_extended_flux_calibration(slit, sens_file=None, prefix='msaexp_sensitivity', version='001', file_template='{prefix}_{grating}_{filter}_{version}.fits', threshold=0, fixed_slit_correction=True, quadrant_correction=True, nrs2_scale_gratings=['PRISM', 'G140M', 'G140H', 'G235M', 'G235H', 'G395M', 'G395H'], **kwargs)[source]¶
Get flux calibration for extended-wavelength extractions
- Parameters
- slit
SlitModel Slitlet data object
- sens_filestr, None
Explicit sensitivity curve filename to use
- prefixstr
Prefix of sensitivity curve filename
- file_templatestr
Template filename of the sensitivity curve to use, generated with
file_template.format(prefix=prefix, filter=filter, grating=grating)- fixed_slit_correctionbool, int
The sensitivity curves were derived from fixed slit observations and then include a transformation from the FS to MSA. If this is True and the
slitis itself from a fixed slit observation, remove that correction to put the sensitivity curve back in the frame of the fixed slits. If an int value is provided > 1, then correct to the FS frame even if theslitcomes from the MSA.- quadrant_correctionbool
Apply quadrant-specific correction if
q[1-4]columns found in the sensitivity table- nrs2_scale_gratingslist
List of gratings where the NRS2 / NRS1 correction will be applied if necessary
- thresholdfloat
Threshold relative to the maximum of a particular grating sensitivivity curve below which to treat as invalid data. If a negative value is provided, just apply the detector-dependent correction rather than the full photometric calibration.
- slit
- Returns
- statusint
0 :
fflatand/orsflatreference files used don’t end inext.fits1 :
sens_filenot found- 2Sensitivity file found and applied to
data,err,var_rnoise, and
var_poissonattributes.
- 2Sensitivity file found and applied to