fit_defocus_history#

esis.flights.f1.optics.fit_defocus_history(reference, num_scene=401, instrument=None, frames=None, frame_reference=15, drift=None, drift_degree=3, degree=2, anchor=1, path=None, directory=None, seed=0)[source]#

Measure the focus of each sector of the primary through the flight.

Each channel views the Sun through its own sector of the primary, so a defocus moves its image along its own dispersion while the windows stay put (_defocus_pattern()). In every frame the channels’ skies are measured against the anchor’s (esis.optics.measure_channel_shifts()), with the windows placed by that frame’s drift as the pointing stage places them, and the focus of every sector is solved from the shifts through the model’s pattern: four unknowns, the anchor’s included, from six measured components. A polynomial in the frame index, zero at the reference frame, is fit through each sector’s history. The mean over the sectors is the defocus of the primary as a whole.

Parameters:
  • reference (str | Path | DistortionParameters) – The reference parameters, or the path of their table.

  • num_scene (int) – The number of samples along each axis of the resampled AIA scene, whose extent sets the sky grid.

  • instrument (None | Instrument) – The base model. If None, the idealized as-built model.

  • frames (None | tuple[int, ...]) – The frames to measure. If None, every frame.

  • frame_reference (int) – The frame the reference was fit to, where the defocus is zero by definition; the fit is made relative to it.

  • drift (None | str | Path | QTable) – The per-frame drift of the windows, see measure_window_edges().

  • drift_degree (int) – The smoothing of the drift, see fit_distortion_pointing().

  • degree (int) – The degree of the polynomial in the frame index fit through each sector’s per-frame focus.

  • anchor (int) – The channel the others are measured against.

  • path (None | str | Path) – If given, the history is written here as an ECSV table with the per-frame and the fitted defocus.

  • directory (None | str | Path) – A directory where the progress is logged.

  • seed (int) – The seed of the samples every channel is linearized on, see esis.optics.LinearMerit.

Return type:

QTable