disperse_grism_object¶
- grizli.utils_numba.disperse.disperse_grism_object(flam, segm, seg_id, idxl, yfrac, ysens, modelf, x0, shd, sh_thumb, shg)[source]¶
Compute a dispersed 2D spectrum
- Parameters
- flamarray-like
Direct image thumbnail
- segmarray-like
Segmentation image
- seg_idint, float
Source ID. The dispersed spectrum is computed for pixels in
flam
wheresegm == seg_id
.- idxlarray-like (int)
Flattened indices of the trace in the 2D cutout
- yfracarray-like (float)
Fraction of the flux of the “bottom” pixel along the beam
- ysensarray-like (float)
Sensitivity or spectrum along the trace
- modelfarray-like (float)
Flattened dispersed spectrum. The dispersed spectrum is added in-place to this array
- x0int, int
Reference pixel where the trace is defined
- shdint, int
Shape of the thumbnail array
- sh_thumbint, int
half-size of the thumbnail cutout to consider (this is generally
x0
)- shgint, int
Shape of the unflattened 2D spectrum
- Returns
- statusbool
True if the function is executed successfully. The dispersed spectrum itself is added to
modelf