to_irs2
- jwst.ipc.x_irs2.to_irs2(irs2_data, norm_data, irs2_mask, detector=None)[source]
Copy ‘normal’ pixel data into an IRS2 image.
- Parameters:
- irs2_datandarray
Data in IRS2 format. This will be modified in-place.
- norm_datandarray
The normal data, for example previously extracted from
irs2_databut then modified in some way. This will be copied back intoirs2_datain the correct locations, as specified byirs2_mask.- irs2_maskndarray
Boolean mask (1-D) identifying the locations of the “normal” pixels within
irs2_data. The length is equal to the size of the next-to-last axis (for data in DMS orientation) ofirs2_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.