img_with_flat¶
- grizli.jwst_utils.img_with_flat(input, verbose=True, overwrite=True, apply_photom=True, use_skyflats=True, mask_dq4_fraction=0.25)[source]¶
Apply flat-field and photom corrections if nessary
- Parameters
- inputstr,
HDUList FITS filename of a JWST image or a previously-opened
HDUListwith SIP wcs information stored in the first extension.- verbosebool
Messaging to terminal.
- overwritebool
Overwrite FITS file with updated header keywords.
- apply_photombool
Apply photometric calibration if True and the exposure is not a grism or the
apply_photomparameter is set to False.- use_skyflatsbool
Apply sky flat corrections if True and
CRDS_CONTEXT > MAX_CTX_FOR_SKYFLATS.- mask_dq4_fractionfloat
Add an additional check for the fraction of pixels with the DQ=4 bit set. If the fraction is found to be greater than this value, unset them in the DQ extension.
- inputstr,
- Returns
- output
jwst.datamodels.ImageModel Updated data model
- output