initialize_jwst_image

grizli.jwst_utils.initialize_jwst_image(filename, verbose=True, max_dq_bit=14, orig_keys=['TELESCOP', 'INSTRUME', 'DETECTOR', 'FILTER', 'PUPIL', 'EXP_TYPE', 'GRATING'], oneoverf_correction=True, oneoverf_kwargs={'make_plot': False}, use_skyflats=True, nircam_edge=8)[source]

Make copies of some header keywords to make the headers look like and HST instrument

  1. Apply gain correction [NOT PERFORMED]

  2. Clip DQ bits

  3. Copy header keywords

  4. Apply exposure-level 1/f correction

  5. Apply flat field if necessary

  6. Initalize WCS

Parameters
filenamestr

Filename of the JWST exposure.

verbosebool

Messaging to terminal.

max_dq_bitint

Maximum DQ bit to allow in the clipped DQ array.

orig_keyslist

List of keywords to copy with a prefix of “O” (e.g., “OTELESCOP”).

oneoverf_correctionbool

Apply 1/f correction to the exposure if True.

oneoverf_kwargsdict

Keyword arguments for exposure_oneoverf_correction.

use_skyflatsbool

Apply skyflat correction if True.

nircam_edgeint

Number of pixels to trim from the edges of NIRCam exposures.

Returns
statusbool

True if finished successfully