define_aperture
- jwst.extract_1d.extract.define_aperture(input_model, slit, extract_params, exp_type)[source]
Define an extraction aperture from input parameters.
- Parameters:
- input_modelDataModel
The input science model containing metadata information.
- slitDataModel or None
One slit from a MultiSlitModel (or similar), or None. The spectral image and WCS information will be retrieved from
slit
unlessslit
is None. In that case, they will be retrieved frominput_model
.- extract_paramsdict
Extraction parameters, as created by
get_extraction_parameters
.- exp_typestr
Exposure type for the input data.
- Returns:
- rafloat
A representative RA value for the source centered in the aperture.
- decfloat
A representative Dec value for the source centered in the aperture.
- wavelengthndarray of float
The 1D wavelength array, matching the dispersion dimension of the input spectral image, corresponding to the aperture. May contain NaNs for invalid dispersion elements.
- profilendarray of float
A 2D image containing pixel weights for the extraction aperture, matching the dimensions of the input spectral image. Values are between 0.0 (pixel not included in the extraction aperture) and 1.0 (pixel fully included in the aperture).
- bg_profilendarray of float or None
If background regions are specified in
extract_params['bkg_coeff']
, andextract_params['subtract_background']
is True, thenbg_profile
is a 2D image containing pixel weights for background regions, to be fit during extraction. Otherwise,bg_profile
is None.- nod_profilendarray of float or None
For optimal extraction, if nod subtraction was performed, a second spatial profile is generated, modeling the negative source in the slit. This second spatial profile is returned in
nod_profile
if generated. Otherwise,nod_profile
is None.- limitstuple of float
Index limit values for the aperture, returned as (lower_limit, upper_limit, left_limit, right_limit). Upper/lower limits are along the cross-dispersion axis. Left/right limits are along the dispersion axis. All limits are inclusive and start at zero index value.