fit_distortion_outline#

esis.optics.fit_distortion_outline(merit, edges, window, sky, bounds, num_pass=2, clip=3.0, maxfev_window=400, maxfev_sky=1500, log=None)[source]#

Place the windows on the measured edges, then re-polish the sky terms.

Alternates a Nelder-Mead fit of the window terms to the edge residual with a polish of the sky terms against the merit, num_pass times. The window terms are those that move the image of the field stop on the sensor but not the sky’s registration within it, which the merit cannot see; the sky terms are the rest.

Parameters:
  • merit – The esis.optics.LinearMerit of the channel, whose parameters are the starting point.

  • edges (QTable) – The measured crossings of this channel’s windows, see measure_edges().

  • window (tuple[str, ...]) – The names of the fields fit to the edges.

  • sky (tuple[str, ...]) – The names of the fields polished against the merit.

  • bounds (tuple[DistortionParameters, DistortionParameters]) – The lower and upper bounds of every field.

  • num_pass (int) – The number of alternations.

  • clip (float) – The clip of outline_residual().

  • maxfev_window (int) – The evaluation budget of every window fit.

  • maxfev_sky (int) – The evaluation budget of every sky polish.

  • log – A callable that records progress.

Return type:

DistortionParameters