from_irs2
- jwst.ipc.x_irs2.from_irs2(irs2_data, irs2_mask, detector=None)[source]
Extract ‘normal’ pixel data from an IRS2 image.
- Parameters:
- irs2_datandarray
Data in IRS2 format. This can be a slice in the Y direction, but it should include the entire X (last) axis.
- irs2_maskndarray
Boolean mask to extract the “normal” pixels. This is a 1-D array with length equal to the size of the next-to-last axis (for data in DMS orientation) of
irs2_data.- detectorstr or None
For IRS2 data in DMS orientation,
detectorshould be either “NRS1” or “NRS2”; NIRSpec is currently the only instrument supported in this module. The mask will be applied to the rows, and for “NRS2” the mask will first be reversed. For IRS2 data in detector orientation,detectorshould be None (the default), and the mask will be applied to the columns.
- Returns:
- ndarray
The normal pixel data (i.e., without embedded reference pixels).