get_jwst_skyflat

grizli.jwst_utils.get_jwst_skyflat(header, verbose=True, valid_flat=(0.7, 1.4), conf_path=None, download=True, **kwargs)[source]

Get sky flat for JWST instruments

Parameters
headerastropy.io.fits.Header

Primary header

verbosebool

Verbose messaging

valid_flat(float, float)

Range of values to define where the flat is valid to avoid corrections that are too large

conf_pathstr, None

Optional path to search for the skyflat files. If not specified, defaults to os.path.join(GRIZLI_PATH, "CONF", "NircamSkyFlat").

downloadbool

Try to download from the remote bucket with grizli.utils.download_skyflat_file if the specified file not found locally.

Returns
skyfilestr

Filename of the sky flat file

flat_corrarray-like

The flat correction, equal to the original flat divided by the new sky flat, i.e., to take out the former and apply the latter

dqarray-like

DQ array with 1024 where flat outside of valid_flat range

If no flat file is found, returns None for all outputs