Skip to content

Commit

Permalink
ENH: raise warning when no heartbeat messages received in a file
Browse files Browse the repository at this point in the history
  • Loading branch information
genematx committed Sep 12, 2024
1 parent 4dcf196 commit 4be0cee
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tpx3awkward/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ def _ingest_raw_data(data):

# Check if there were no heartbeat messages and adjust for potential SPIDR rollovers
if heartbeat_msb is None:
warnings.warn("No heartbeat messages received; decoded timestamps may be inaccurate.")
head_max = max(ts[:10])
tail_min = min(ts[-10:])
if (head_max > tail_min) and (head_max - tail_min > 2**32):
Expand Down

0 comments on commit 4be0cee

Please sign in to comment.