libera_utils.l1a.packet_ordering.out_of_order_positions#
- libera_utils.l1a.packet_ordering.out_of_order_positions(packet_ds: Dataset, packet_time_coordinate: str) ndarray#
Return the
PACKETpositionsiwhereSRC_SEQ_CTRrepeats or steps backward fromitoi + 1.Only steps whose packet times are within
REORDER_WINDOWof each other count, since further apart the counter may have restarted. An axis inSRC_SEQ_CTRorder, asparse_packets_to_l1a_datasetwrites it, has none.- Parameters:
packet_ds (xr.Dataset) – Dataset with
SRC_SEQ_CTRandpacket_time_coordinateon itsPACKETaxis.packet_time_coordinate (str) – Name of the packet time variable.
- Returns:
The positions
i, in ascending order; empty when the axis is inSRC_SEQ_CTRorder.- Return type:
np.ndarray
- Raises:
ValueError – If
packet_dshas noSRC_SEQ_CTRor nopacket_time_coordinatevariable.