make_mask
- jwst.ipc.x_irs2.make_mask(input_model, n=None, r=None)[source]
Create a mask to extract ‘normal’ pixels.
This is used by
from_irs2()andto_irs2().- Parameters:
- input_model
JwstDataModelor ndarray Either the input science data model or the data array from the input data model. This is used for getting the IRS2 parameters and the length of the longer image axis.
- nint or None
If not None, this value will be used for the
nrs_normalparameter. Ifnis None, the value will be obtained from the metadata forinput_model; if this fails (e.g., ifinput_modelis actually an ndarray), a default value of 16 will be used. None is the default.- rint or None
If not None, this value will be used for the
nrs_referenceparameter. See also the description forn. None is the default.
- input_model
- Returns:
- irs2_maskndarray
Boolean index mask (1-D) with length equal to the last axis of the science data shape.