EMIfitter

class jwst.emicorr.emicorr.EMIfitter(all_y, all_n, phasefunc, phases_template, phaselist, dphase_frame)[source]

Bases: object

Convenience class to facilitate chi2, amplitude calculation.

This class precomputes a series of arrays so that the sums in calc_chisq_amplitudes() do not need to be fully recomputed at every possible phase of the EMI signal.

Sums of pixel read values are precomputed over pixels that share the same EMI phase to avoid double sums over pixels and reads later. Sums over the EMI waveform itself are also precomputed at each trial phase offset for the same reason.

Parameters:
all_yndarray

3D array of phased, summed y values, shape (nints, nphases, ngroups).

all_nndarray

2D array of the number of pixels used for the calculation shape (nints, nphases): number of values summed to create all_y at each group.

phasefunccallable

Spline function to compute the waveform as a function of input phase (input phase should be between 0 and 1).

phases_templatendarray

2D array of phases corresponding to all_y[0].

phaselistndarray

1D array of phases at which to pre-compute quantities needed for chi squared, amplitude calculation. ypically uniformly spaced between 0 and 1.

dphase_framefloat

Phase difference between successive integrations.