fit_distortion_channel#

esis.flights.f1.optics.fit_distortion_channel(channel, instrument=None, time=15, num_scene=401, device=None, workers=1, popsize=15, maxiter=80, seed=0, path=None, directory=None)[source]#

Fit one channel of ESIS-I on its own, the first stage of the reference fit.

The channel is fit to the AIA proxy scene of one frame with esis.optics.LinearMerit and esis.optics.fit_distortion(), a seeded capture followed by a local polish, over the nine terms one frame determines (_FREE_ABSOLUTE). Each channel is hours of work, so the channels are fit separately and fit_distortion_reference() combines them.

Requires the ESIS Level-1 data and the AIA synthetic scene (downloaded and cached on first use).

Parameters:
  • channel (int) – The index of the channel.

  • instrument (None | Instrument) – The starting instrument model. If None, the as-built model (esis.flights.f1.optics.as_built()) is used, idealized for raytracing speed, with the field stop of path_field_stop.

  • 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, for example "cuda"; None for the host.

  • workers (int) – The number of processes evaluating the population of the capture.

  • popsize (int) – The population of the capture, per dimension.

  • maxiter (int) – The number of generations of the capture, all of which are run.

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

  • path (None | str | Path) – If given, the fitted parameters are written here as a one-row ECSV table.

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

Return type:

DistortionParameters