measure_field_stop#
- esis.flights.f1.optics.measure_field_stop(reference, pointing, instrument=None, num_scene=401, frames=None, threshold=0.5, line=2, trim=0.12, directory=None, path=None, path_sides=None, seed=0)[source]#
Measure the shape of the field stop from its image in every channel.
Each channel images the same field stop, so each measures its shape through its own grating and sensor. In each channel, at the frame the pointing table is referenced to:
The current outline of the stop is mapped to the sensor at one line, and every side of the window, the diagonals too, is measured in every frame by
esis.optics.measure_polygon_edges(), moved back by the frame’s drift of the windows, and the median taken over the flight at each point along the side.The points are carried to the plane of the field stop, in its own frame, by
_field_stop_maps(), and a straight line fit to each side gives its offset along the outward normal of the current side and its tilt against it.What each channel’s own placement can do to its image of the stop is taken out: a rotation, fit to the tilts of its sides, and a translation and a scale, fit to their offsets. These are fit together with one shape for every channel, the tilt and offset of each side that no rotation, translation or scale can make, so that a side a channel did not measure does not bias what is taken out.
The vertices of the new stop are where the sides of that shape meet, grown by the mean of the channels’ scales. The rotation is left to the roll of the field stop, which the outline stage fits. The spread of the channels about the shape, kept in the metadata, is what says whether they agree.
- Parameters:
reference (DistortionParameters) – The reference parameters of every channel.
pointing (QTable) – The pointing table, whose
drift_xanddrift_ymove the windows of each frame back to the reference frame.instrument (None | Instrument) – The instrument model, see
fit_distortion_reference(). Its field stop is the one measured against.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.threshold (float) – The fraction of the flight’s median signal below which a frame is left out.
line (int) – The index of the line whose windows are measured: O V, the brightest, whose window lies whole on the sensor in every channel.
trim (float) – The fraction of each side left out at either end, see
esis.optics.measure_polygon_edges().directory (None | str | Path) – The directory the log is written to.
path (None | str | Path) – Where to save the vertices, if anywhere.
path_sides (None | str | Path) – Where to save every channel’s offsets and tilts, if anywhere.
seed (int) – The seed of the samples every channel is linearized on, see
esis.optics.LinearMerit.
- Returns:
The vertices of the measured stop, in mm in its own frame, and the
offset and tilt of every side as each channel measured it, before and
after its rotation, translation and scale are taken out.
- Raises:
ValueError – If no channel measured some side of the stop.
- Return type: