fit_distortion_pointing#

esis.flights.f1.optics.fit_distortion_pointing(instrument=None, num_scene=401, device=None, frame_reference=15, frames=None, path=None, directory=None, drift=None, drift_degree=3, defocus=None, seed=0, relative=True)[source]#

Fit the per-frame payload pointing of the whole flight.

Reproduces the time series stored in _data/distortion_pointing.ecsv: for every frame of esis.flights.f1.data.level_1(), one pitch and yaw offset from the reference model, common to the four channels, is polished with esis.optics.polish() on the mean of their esis.optics.LinearMerit. The optics are otherwise held at the reference fit, with the measured window drift and sector focus applied.

Parameters:
  • instrument (None | Instrument) – The reference model. If None, esis.flights.f1.optics.distortion_fit() is used, idealized.

  • 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.

  • frame_reference (int) – The frame the reference was fit to, from which the drift is measured. With relative, the table is taken relative to it.

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

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

  • directory (None | str | Path) – A directory where the progress of every frame is logged, in pointing.log, or in pointing_<frame>.log when one frame is fit.

  • drift (None | str | Path | QTable) – The per-frame drift of the windows, see measure_window_edges(), or the path of its table. If given, each frame’s grating yaw and pitch are offset per channel so that its windows sit where the edges of that frame were measured, before the pointing is fit; the offsets are recorded in the result.

  • drift_degree (int) – The degree of the polynomial in the frame index that smooths the drift through the flight, see _drift_smooth().

  • defocus (None | str | Path | QTable) – The focus of each sector of the primary through the flight, see fit_defocus_history(), or the path of its table. If given, each frame’s z_primary is applied before the pointing is fit and is not itself fit: the proxy scene cannot tell a defocus from the internal alignment, but the channels can.

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

  • relative (bool) – If the reference frame is among frames, subtract its own offset from every row, so that the table is relative to the reference frame and zero there; see pointing_relative(). A driver that fits one frame per job passes False, so that every row, the reference frame’s included, is the absolute fit, then gathers the rows and takes them relative once.

Return type:

QTable