libera_utils.l1a.packet_ordering.check_packet_order#

libera_utils.l1a.packet_ordering.check_packet_order(packet_ds: Dataset, packet_time_coordinate: str) → None#

Warn where packet time steps backward along the PACKET axis.

Along an axis in SRC_SEQ_CTR order, a backward packet-time step is where packet time disagrees with the counter. This emits a UserWarning and logs a warning with the number of such steps, the largest, and the first one’s counters and times. Nothing is raised for it, and the dataset is not changed.

Parameters:
  • packet_ds (xr.Dataset) – Dataset with SRC_SEQ_CTR and packet_time_coordinate on its PACKET axis.

  • packet_time_coordinate (str) – Name of the packet time variable.

Raises:

ValueError – If packet_ds has no SRC_SEQ_CTR or no packet_time_coordinate variable.