disperse
- jwst.wfss_contam.disperse.disperse(xs, ys, fluxes, source_ids_per_pixel, order, wmin, wmax, sens_waves, sens_resp, direct_image_wcs, grism_wcs, naxis, oversample_factor=2)[source]
Compute the dispersed image pixel values from the direct image.
- Parameters:
- xsndarray
Flat array of X coordinates of pixels in the direct image
- ysndarray
Flat array of Y coordinates of pixels in the direct image
- fluxesndarray
Fluxes of the pixels in the direct image corresponding to xs, ys. These should have units of MJy/sr.
- source_ids_per_pixelint array
Source IDs of the input pixels in the segmentation map
- orderint
Spectral order number
- wminfloat
Minimum wavelength for dispersed spectra
- wmaxfloat
Maximum wavelength for dispersed spectra
- sens_wavesfloat array
Wavelength array from photom reference file. Expected unit is micron.
- sens_respfloat array
Response (flux calibration) array from photom reference file. Expected units are (micron) * (MJy / sr) / (ADU/s).
- direct_image_wcsWCS object
WCS object for the direct image and segmentation map
- grism_wcsWCS object
WCS object for the grism image
- naxistuple
Dimensions of the grism image (naxis[0], naxis[1])
- oversample_factorint, optional
Factor by which to oversample the wavelength grid
- Returns:
- outputs_by_sourcedict
Dictionary containing dispersed images and bounds for each source ID in the specified spectral order.