calc_chisq_amplitudes

jwst.emicorr.emicorr.calc_chisq_amplitudes(emifitter, ints=None, phases=None)[source]

Compute chi2 and amplitudes of EMI waveform at phase(s).

This routine has the math from the write-up in it; see that for the definitions and derivations.

Parameters:
emifitterEMIfitter

Convenience object containing all the parameters and intermediate arrays needed to compute the best amplitude and the corresponding chi squared value at one or more input phases.

intslist of int or None

Integration(s) to combine for computing amplitude and chi squared. If None, use all integrations.

phaseslist of float or None

Phase(s) at which to compute the amplitude and best chi squared. If None, use all phases in emifitter.phaselist.

Returns:
chisqlist of float

Best chi squared value for each phase used. Will be the same length as phases (or emifitter.phaselist, if phases is None).

amplitudeslist of float

Best-fit amplitudes for each phase used. Will be the same length as phases (or emifitter.phaselist, if phases is None).