Skip to content

Commit

Permalink
Fill r1 event type also for old data
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnoe committed Nov 21, 2023
1 parent 17dd75b commit 7593861
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/ctapipe_io_lst/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,9 @@ def fill_trigger_info(self, array_event):
if trigger.event_type == EventType.UNKNOWN:
self.log.warning(f'Event {array_event.index.event_id} has unknown event type, trigger: {trigger_bits:08b}')

if CTAPIPE_0_20:
array_event.r1[tel_id].event_type = trigger.event_type

def tag_flatfield_events(self, array_event):
'''
Use a heuristic based on R1 waveforms to recognize flat field events
Expand Down
3 changes: 1 addition & 2 deletions src/ctapipe_io_lst/tests/test_lsteventsource.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,7 @@ def test_pedestal_events(tmp_path):
assert event.trigger.event_type == EventType.SKY_PEDESTAL
else:
assert event.trigger.event_type != EventType.SKY_PEDESTAL


assert event.r1.tel[1].event_type == event.trigger.event_type


@pytest.mark.parametrize(
Expand Down

0 comments on commit 7593861

Please sign in to comment.