match_det2cube
- jwst.cube_build.cube_internal_cal.match_det2cube(instrument, x, y, sliceno, input_model, transform, acoord, zcoord, crval_along, crval3, cdelt_along, cdelt3, naxis1, naxis2)[source]
Match detector pixels to output plane in local IFU coordinate system.
This routine assumes:
a 1-1 mapping in across slice to slice no, and
the output coordinate systems is local IFU plane.
The user cannot change scaling in across slice dimension Map the corners of the
x, ydetector values to a cube defined by local IFU plane. In the along slice, lambda plane find the percentage area of the detector pixel which it overlaps with in the cube. For each spaxel, record the detector pixels that overlap with it - store flux, percentage overlap, andbeta_distance.Results are obtained from running C code to determine the internal coordinate system of the IFU cubes.
- Parameters:
- xndarray
Detector x pixel values in the slice
- yndarray
Detector y pixel values in the slice
- slicenoint
Slice number
- input_model
IFUImageModel Input calibrated model or file
- transformobj
WCS transform to transform
x, ytoalpha, beta, lambda- acoordndarray
Array of along slice value defining the along slice spatial dimension of the IFU cube
- zcoordndarray
Array of wavelength values defining the wavelength dimension of the IFU cube
- crval_alongfloat
Along slice reference value in the IFU cube
- crval3float
Wavelength reference value in the IFU cube
- cdelt_alongfloat
Along slice reference value in the IFU cube
- cdelt3float
Wavelength sampling in the IFU cube
- naxis1int
Size of axis 1 of the IFU cube
- naxis2int
Size of axis 2 of the IFU cube
- Returns:
- instrument_noint
Integer representing the instrument:
0 = MIRI
1 = NIRSpec
- naxis1, naxis2int
Output axes of IFU cube
- crval_alongfloat
Reference value in along slice dimension
- cdelt_alongfloat
Sampling in along slice dimension
- crval3float
Reference value in wavelength dimension
- cdelt3float
Wavelength sampling
- a1, a2, a3, a4float
Array of corners of pixels holding along slice coordinates
- lam1, lam2, lam3, lam4float
Array of corners of pixels holding wavelength coordinates
- acoordndarray
Array holding slice coordinates of the IFU internal cube
- zcoordndarray
Array holding wavelength coordinates of the IFU internal cube
- ssndarray
Array holding the slice number of each pixel
- pixel_fluxndarray
Array of pixel fluxes
- pixel_errndarray
Array of pixel errors