Skip to content

Commit

Permalink
Also reset r1 event type in check_pedestals
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnoe committed Nov 21, 2023
1 parent 315f4ca commit 9ac8739
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/ctapipe_io_lst/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1142,15 +1142,19 @@ def check_interleaved_pedestal(self, array_event):
event_id = array_event.index.event_id

if event_id in self.pedestal_ids:
array_event.trigger.event_type = EventType.SKY_PEDESTAL
event_type = EventType.SKY_PEDESTAL
self.log.debug("Event %d is an interleaved pedestal", event_id)

elif array_event.trigger.event_type == EventType.SKY_PEDESTAL:
# wrongly tagged pedestal event must be cosmic, since it would
# have been changed to flatfield by the flatfield tagging if ff
array_event.trigger.event_type = EventType.SUBARRAY
event_type = EventType.SUBARRAY
self.log.debug(
"Event %d is tagged as pedestal but not a known pedestal event",
event_id,
)
else:
return

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

0 comments on commit 9ac8739

Please sign in to comment.