measure_window_edges#
- esis.flights.f1.optics.measure_window_edges(parameters, instrument=None, num_scene=401, frames=None, frame_reference=15, threshold=0.5, lines=(0, 2), error_max=<Quantity 1. pix>, drift_degree=3, directory=None, path=None, path_drift=None, seed=0)[source]#
Measure the edges of every window at the reference frame, and their drift.
The windows are the image of the field stop, and do not move with the pointing, so the same edge is measured once per frame against a different backdrop of solar structure each time. Each side of each window is fit in each frame as one blurred straight edge, see
esis.optics.measure_edges(), and the median over the frames, with the median width of its blur, places it.The windows do drift, by a few tenths of a pixel through the flight. The drift is read from a different fit: a step fit to every row and column on its own, see
esis.optics.measure_edge_steps()andwindow_drift(). The straight edges place a side better, but structure crossing a side as the pointing drifts moves its straight edge by a few tenths of a pixel from frame to frame, more than the median of the rows’ changes; on the flight the two sides of one window move apart by 0.14–0.39 px rms with the straight edges and 0.06–0.20 px with the steps.Both are referred to the reference frame, which the sky of the reference fit is fit to: the median edges are moved by the drift at that frame, as the later stages smooth it (
_drift_smooth()), and the drift is taken from there. The reference then places its windows where they were at that frame, and the drift is zero there.- Parameters:
parameters (list[DistortionParameters]) – The parameters of every channel, which place the outlines the edges are searched near.
instrument (None | Instrument) – The instrument model, see
fit_distortion_channel().num_scene (int) – The number of samples along each axis of the resampled scene, which sets the grid the channel is linearized on.
frames (None | tuple[int, ...]) – The frames to measure. If
None, every frame whose mean signal exceeds threshold times the median over the flight.frame_reference (int) – The frame the reference is fit to.
threshold (float) – The fraction of the flight’s median signal below which a frame is left out.
lines (tuple[int, ...]) – The indices of the spectral lines whose windows are measured; the middle window of ESIS-I sits on its neighbours and is left out.
error_max (Quantity) – Crossings with a larger formal error are left out.
drift_degree (int) – The degree of the polynomial in the frame index that smooths the drift, see
_drift_smooth().directory (None | str | Path) – The directory the log is written to.
path (None | str | Path) – Where to save the edges, if anywhere.
path_drift (None | str | Path) – Where to save the per-frame drift, if anywhere.
seed (int) – The seed of the samples every channel is linearized on, see
esis.optics.LinearMerit.
- Returns:
The edges at the reference frame, one row per channel, line, side and
row or column, with the median width of the side; and the drift from
the reference frame, one row per channel, frame and side.
- Return type: