diff --git a/src/ctapipe_io_lst/__init__.py b/src/ctapipe_io_lst/__init__.py index b77dc64a..ba54bf57 100644 --- a/src/ctapipe_io_lst/__init__.py +++ b/src/ctapipe_io_lst/__init__.py @@ -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 diff --git a/src/ctapipe_io_lst/tests/test_lsteventsource.py b/src/ctapipe_io_lst/tests/test_lsteventsource.py index 63ed6292..337abe07 100644 --- a/src/ctapipe_io_lst/tests/test_lsteventsource.py +++ b/src/ctapipe_io_lst/tests/test_lsteventsource.py @@ -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(