Skip to content

Commit

Permalink
Fix issue with drive report and bending model tables not having the s…
Browse files Browse the repository at this point in the history
…ame length
  • Loading branch information
maxnoe committed Mar 9, 2022
1 parent 9fc45e0 commit 986f283
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ctapipe_io_lst/pointing.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ def _read_drive_report(path):
corrections = PointingSource._read_bending_model_corrections(bending_path)

# according to an email by Armand Fiasson, the timestamps are guaranteed to be equal
# but it might happen that one report has more rows than the other due to different
# times when they are synced to fefs during the night
if len(corrections) != len(data):
raise IOError('Pointing report and bending model correction lengths differ')
n_common = min(len(corrections), len(data))
corrections = corrections[:n_common]
data = data[:n_common]

if np.any(data['unix_time'] != corrections['unix_time']):
raise IOError('Drive report and corrections timestamps differ')
Expand Down

0 comments on commit 986f283

Please sign in to comment.