Skip to content

Commit

Permalink
Merge pull request #147 from cta-observatory/trigger_type_invalid
Browse files Browse the repository at this point in the history
Set events with both pedestal and calibration trigger bit to EventType.UNKNOWN
  • Loading branch information
maxnoe authored Apr 13, 2022
2 parents 4fadbd6 + 166a78c commit 0b30e97
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ctapipe_io_lst/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class TriggerBits(IntFlag):

PHYSICS = MONO | STEREO
OTHER = CALIBRATION | SINGLE_PE | SOFTWARE | PEDESTAL | SLOW_CONTROL
CALIBRATION_AND_PEDESTAL = PEDESTAL | CALIBRATION


class PixelStatus(IntFlag):
Expand Down Expand Up @@ -629,6 +630,10 @@ def fill_trigger_info(self, array_event):
# for all other we only check if the flag is present
if (trigger_bits & TriggerBits.PHYSICS) and not (trigger_bits & TriggerBits.OTHER):
trigger.event_type = EventType.SUBARRAY
# some rare events have both trigger bits set for calibox and pedestal trigger
# to be safe we set it to unknown
elif (trigger_bits & TriggerBits.CALIBRATION_AND_PEDESTAL) == TriggerBits.CALIBRATION_AND_PEDESTAL:
trigger.event_type = EventType.UNKNOWN
elif trigger_bits & TriggerBits.CALIBRATION:
trigger.event_type = EventType.FLATFIELD
elif trigger_bits & TriggerBits.PEDESTAL:
Expand Down

0 comments on commit 0b30e97

Please sign in to comment.