measure_channel_shifts#
- esis.optics.measure_channel_shifts(linears, frames, sky, wavelengths, anchor=1, num_tile=6, mask_windows=True, axis=('sky_x', 'sky_y'), fraction_valid=0.95)[source]#
Measure every channel’s tile shifts against the anchor on the sky.
Each channel’s frame is read onto the sky grid through its linearized system at every wavelength, inside the window that wavelength illuminates, and cross-correlated tile by tile with the anchor’s. This is the measurement step of
align_channels(), on its own so that the same numbers can be taken frame by frame through a flight.- Parameters:
linears (list) – The linearized system of each channel, see
optika.systems.SequentialSystem.linearize(), with a field stop.frames (list[ndarray]) – Each channel’s frame as a plain
[y, x]array.sky (AbstractCartesian2dVectorArray) – The sky grid, see
sky_grid().wavelengths (dict[str, Quantity]) – The lines to measure at, by name.
anchor (int) – The channel the others are measured against.
num_tile (int) – The number of tiles along each axis of the sky grid.
mask_windows (bool) – Whether to read each frame only inside the line’s window, see
window_mask().fraction_valid (float) – The fraction of a tile which must be inside both windows for its shift to be measured, see
measure_shifts().
- Returns:
For every channel but the anchor, one
ShiftFieldper line, insky-grid samples; and the anchor’s detector pixels per sky sample along
each axis of the sky at each line, which converts them to pixels.
- Return type: