get_best_phase
- jwst.emicorr.emicorr.get_best_phase(phases, chisq)[source]
Fit a parabola to get the phase corresponding to the best chi squared.
- Parameters:
- phasesndarray
1D array of phases. Assumed to be periodic:
phases[0]comes afterphases[-1]- chisqndarray
1D array of chi squared values.
- Returns:
- bestphasefloat
Phase where
chisqis minimized, computed by fitting a parabola to the three points centered on the input phase with the lowestchisq.