API

Public Step API

jwst.wfss_contam.wfss_contam_step Module

Classes

WfssContamStep([name, parent, config_file, ...])

Perform contamination correction of WFSS spectra.

Complete Developer API

jwst.wfss_contam.disperse Module

Functions

disperse(xs, ys, fluxes, band_wavelengths, ...)

Compute the dispersed image pixel values from the direct image.

jwst.wfss_contam.observations Module

Functions

background_subtract(data[, box_size, ...])

Apply a simple astropy background subtraction.

Classes

Observation(direct_image, segmentation_map, ...)

Define an observation leading to a single grism image.

SimulatedCutout(source_id, name, xstart, ...)

Lightweight container for simulated cutout data and attributes.

jwst.wfss_contam.sens1d Module

Functions

get_photom_data(phot_model, filter_name, ...)

Retrieve wavelength and response data from photom ref file.

create_1d_sens(data_waves, ref_waves, relresps)

Find photometric conversion values based on per-pixel wavelength-dependent response.

jwst.wfss_contam.trace_pdt Module

Pixel dispersion table, which caches the dispersed-pixel offsets for efficient interpolation.

Functions

build_trace_pdt(grism_wcs, order, wmin, ...)

Build a TracePDT for one spectral order by sampling the exact transform on a coarse grid.

get_grism_detector_transform(grism_wcs)

Get the "detector" to "grism_detector" transform, reduced to 2 (x, y) outputs.

Classes

TracePDT(x0_grid, y0_grid, lam_grid, ...[, ...])

Interpolated replacement for the "detector" to "grism_detector" WCS transform.

jwst.wfss_contam.wavefit Module

Fit a spectral shape to a WFSS dispersed source.

Functions

apply_basis_coeffs(simul_cutout, coeffs)

Reconstruct a fitted image as a linear combination of dispersed basis images.

fit_cutout_by_basis_images(observed_cutout, ...)

Fit a linear combination of dispersed basis images to the observed source cutout.

Classes

SpectralFitError

Raise when spectral fitting fails.

jwst.wfss_contam.wfss_contam Module

Top-level module for WFSS contamination correction.

Functions

contam_corr(input_model, waverange, photom, ...)

Correct contamination in WFSS spectral cutouts.