fit_distortion_reference#

esis.flights.f1.optics.fit_distortion_reference(parameters, edges, instrument=None, time=15, num_scene=401, device=None, workers=1, seed=0, path=None, directory=None)[source]#

Fit the reference distortion parameters of ESIS-I from the channels’ own fits.

Reproduces the values stored in _data/distortion_reference.ecsv from the absolute fit of every channel (fit_distortion_channel()), in three stages.

  1. Outline. Each channel’s windows are placed on the window edges measured through the flight with the grating angles and the roll of the field stop (_WINDOW), and the sky is refit with the remaining terms (_SKY), see esis.optics.fit_distortion_outline().

  2. Shared. The primary, the field-stop roll and the payload pointing belong to the instrument (_SHARED); they are set to their mean over the channels and each channel’s own terms (_FREE_SHARED) are polished again.

  3. Internal. The channels are aligned to one another on the sky with esis.optics.align_channels(), in those terms only.

Parameters:
  • parameters (list[DistortionParameters]) – The absolute fit of every channel, see fit_distortion_channel().

  • edges (str | Path | QTable) – The measured edges of the windows at the reference frame, see measure_window_edges(), or the path of their table.

  • instrument (None | Instrument) – The instrument model, see fit_distortion_channel().

  • time (int) – The frame index of the reference frame.

  • num_scene (int) – The number of samples along each axis of the resampled AIA scene.

  • device (None | str) – The device on which to build and apply the regridding weights.

  • workers (int) – The number of processes the channels are fit in side by side.

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

  • path (None | str | Path) – If given, the fitted parameters are written to this path as an ECSV table, in the format of _data/distortion_reference.ecsv.

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

Raises:

ValueError – If parameters does not have one entry per channel.

Return type:

DistortionParameters