downsample_hwp_angle¶
- sofia_redux.scan.custom.hawc_plus.frames.hawc_plus_frame_numba_functions.downsample_hwp_angle(hwp_angle, start_indices, valid, window)[source]¶
Return a downsampled HWP angle array.
Downsamples the half-wave-plate angle via convolution with a window kernel.
- Parameters:
- hwp_anglenumpy.ndarray (float)
The HWP angles to downsample of shape (high_res_frames,)
- start_indicesnumpy.ndarray (int)
The indices of marking the start index of the high resolution HWP angle array for each low resolution index. Should be of shape (low_res_frames,).
- validnumpy.ndarray (bool)
A boolean array indicating whether any downsampled value will be valid. Should be of shape (low_res_frames,). Any invalid low-resolution frames will be set to NaN.
- windownumpy.ndarray (float)
The convolution kernel of shape (n_window,). Since no re-weighting is performed, the window should be normalized if applicable.
- Returns:
- low_res_hwpnumpy.ndarray (float)