grism_prep

grizli.pipeline.auto_script.grism_prep(field_root='j142724+334246', PREP_PATH='../Prep', EXTRACT_PATH='../Extractions', ds9=None, refine_niter=3, gris_ref_filters={'G102': ['F105W', 'F098M', 'F110W', 'F125W', 'F140W', 'F160W', 'F127M', 'F139M', 'F153M', 'F132N', 'F130N', 'F128N', 'F126N', 'F164N', 'F167N'], 'G141': ['F140W', 'F160W', 'F125W', 'F105W', 'F110W', 'F098M', 'F127M', 'F139M', 'F153M', 'F132N', 'F130N', 'F128N', 'F126N', 'F164N', 'F167N'], 'G800L': ['F814W', 'F850LP', 'F606W', 'F435W', 'F775W', 'F555W', 'opt'], 'GR150C': ['F115W', 'F150W', 'F200W', 'F090W', 'CLEAR-F090W', 'CLEAR-F115W', 'CLEAR-F150W', 'CLEAR-F200W', 'F090WN-CLEAR', 'F115WN-CLEAR', 'F150WN-CLEAR', 'F200WN-CLEAR'], 'GR150R': ['F115W', 'F150W', 'F200W', 'F090W', 'CLEAR-F090W', 'CLEAR-F115W', 'CLEAR-F150W', 'CLEAR-F200WF090WN-CLEAR', 'F115WN-CLEAR', 'F150WN-CLEAR', 'F200WN-CLEAR'], 'GRISMC': ['F277W-CLEAR', 'F356W-CLEAR', 'F410M-CLEAR', 'F444W-CLEAR', 'F277W', 'F356W', 'F410M', 'F444W'], 'GRISMR': ['F277W-CLEAR', 'F356W-CLEAR', 'F410M-CLEAR', 'F444W-CLEAR', 'F277W', 'F356W', 'F410M', 'F444W']}, force_ref=None, files=None, split_by_grism=True, refine_poly_order=1, refine_fcontam=0.5, cpu_count=0, mask_mosaic_edges=False, prelim_mag_limit=25, refine_mag_limits=[18, 24], init_coeffs=[1.1, -0.5], grisms_to_process=None, pad=(64, 256), model_kwargs={'compute_size': True}, sep_background_kwargs=None, subtract_median_filter=False, median_filter_size=71, median_filter_central=10, second_pass_filtering=False, box_filter_sn=3, box_filter_width=3, median_mask_sn_threshold=None, median_mask_dilate=8, prelim_model_for_median=False, use_jwst_crds=False)[source]

Contamination model pipeline for grism exposures

Parameters
field_rootstr

Rootname of the associated data, used to define the direct image, catalog filenames

PREP_PATHstr

Relative path to the “Prep” directory containing the grism exposures

EXTRACT_PATHstr

Relative path to the “Extractions” directory where the outputs will be copied

ds9DS9, None

If an open DS9 window, will display contamination model as it’s calcluated

refine_niterint

Number of refinement iterations with the polynomial continuum models

gris_ref_filtersdict

Associated reference images for particular grism elements

force_refstr, None

Explicitly specify the direct image reference. Otherwise will be calculated with field_root, gris_ref_filters.

fileslist, None

Explicit list of grism exposures. Otherwise will be all flt, flc, rate files in the working directory.

split_by_grismbool

Separate models by grism element

refine_poly_orderint

Polynomial order fit to the refined spectra

refine_fcontamfloat

Factor multiplying the contamination model that is added to the variance of and extracted spectrum.

cpu_countint

Multiprocessing, see compute_full_model.

mask_mosaic_edgesbool

Apply a mask where the specified direct image might not contribute to the dispersed image and therefore could have unmodeled first-order contamination spectra

prelim_mag_limitfloat

Faint magnitude limit for sources in the simple contamination model

refine_mag_limits[float, float]

Range of magnitudes for objects in the refined contamination model

init_coeffs[float, float]

Polynomial coefficients for the first simple model

grisms_to_processlist, None

Explicit list of grisms to process, otherwise will do all that are found

pad(int, int)

Zero padding size for spectra that fall off the edge of the detector

model_kwargsdict

Keyword arguments to pass to compute_full_model

sep_background_kwargs=None
subtract_median_filterbool

Row-based median filter for NIRCam grisms

median_filter_sizeint

Median filter size, pixels

median_filter_centralint

Gap in middle of median filter to avoid self-subtraction of lines

second_pass_filteringbool

Two passes of median filter to further remove self subtraction

box_filter_snfloat

S/N threshold for second-pass median filter

box_filter_widthint

Size of spatial filter for second-pass median filter

median_mask_sn_thresholdfloat

S/N threshold for median filter

median_mask_dilateint

Dilation factor for median filter

prelim_model_for_medianbool

Compute a contamination model of bright sources before calculating the median fitler

use_jwst_crdsbool

Use CRDS specwcs files for JWST grism trace configuration

Returns
grpGroupFLT

Group object with information for all separate exposures