find_spaxel_flux
- jwst.cube_build.cube_lib.find_spaxel_flux(spaxel_iflux, spaxel_flux, spaxel_weight, spaxel_var)[source]
Calculate the final normalized flux and variance for each spaxel.
Normalizes the weighted flux and variance arrays after mapping overlap between the detector array and the sky. Spaxels with no contributing points (where spaxel_iflux == 0) are ignored to prevent division-by-zero errors.
- Parameters:
- spaxel_ifluxnumpy.ndarray
Array containing the counts/number of detector elements contributing to each spaxel.
- spaxel_fluxnumpy.ndarray
Array of weighted cumulative flux values. Modified in-place.
- spaxel_weightnumpy.ndarray
Array of total weights accumulated for each spaxel.Modified in-place.
- spaxel_varnumpy.ndarray
Array of cumulative variance values. Modified in-place.
- Returns:
- spaxel_fluxnumpy.ndarray
Array of weighted cumulative flux values. Modified in-place.
- spaxel_varnumpy.ndarray
Array of cumulative variance values. Modified in-place.