FringeFitter

class jwst.ami.nrm_core.FringeFitter(instrument_data, oversample=3, psf_offset_ff=None, npix='default', weighted=False)[source]

Bases: object

Fit fringes to get interferometric observables for the data.

For the given information on the instrument and mask, calculate the fringe observables (visibilities and closure phases in the image plane. Original Python was by A. Greenbaum & A. Sivaramakrishnan

Parameters:
instrument_dataNIRISS

Information on the mask geometry (namely # holes), instrument, wavelength obs mode.

oversampleint, optional

Model oversampling (also how fine to measure the centering). Default is 3.

psf_offset_fffloat, optional

Subpixel centering of your data, if known. Default is None.

npixint, optional

Number of data pixels to use. Default is to use the shape of the data frame.

weightedbool, optional

If True, use Poisson variance for weighting, otherwise do not apply any weighting. Default is False.

Methods Summary

fit_fringes_all(input_model)

Generate the best model to match the data (centering, scaling, rotation).

fit_fringes_single_integration(slc)

Generate the best model to match a single slice.

Methods Documentation

fit_fringes_all(input_model)[source]

Generate the best model to match the data (centering, scaling, rotation).

Parameters:
input_modelJwstDataModel

DM object for input

Returns:
output_modelAmiOIModel

AMI tables of median observables from LG algorithm fringe fitting in OIFITS format

output_model_multiAmiOIModel

AMI tables of observables for each integration from LG algorithm fringe fitting in OIFITS format

lgfitAmiLgFitModel

AMI cropped data, model, and residual data from LG algorithm fringe fitting

Notes

May allow parallelization by integration (later)

fit_fringes_single_integration(slc)[source]

Generate the best model to match a single slice.

Parameters:
slcint

Index of the iteration to fit (0 to nslc-1).

Returns:
nrmLgModel object

Model with best fit results for the given slice.

Notes

After nrm.fit_image is called, these attributes are stored in nrm object:

  • soln: resulting sin/cos coefficients from least squares fitting

  • fringephase: baseline phases in radians

  • fringeamp: baseline amplitudes (flux normalized)

  • redundant_cps: closure phases in radians

  • redundant_cas: closure amplitudes

  • residual: fit residuals [data - model solution]

  • cond: matrix condition for inversion

  • fringepistons: zero-mean piston opd in radians on each hole (eigenphases)