cta-observatory / ctapipe

Low-level data processing pipeline software for CTAO or similar arrays of Imaging Atmospheric Cherenkov Telescopes
https://ctapipe.readthedocs.org
BSD 3-Clause "New" or "Revised" License
63 stars 267 forks source link

CameraCalibrator warns in case no R1 data is present #2407

Closed maxnoe closed 9 months ago

maxnoe commented 11 months ago

Describe the bug

When running ctapipe-process on DL0 input, the CameraCalibrator throws a warning (python warning, not log message):

ctapipe/camera/calibrator.py:159: UserWarning: Encountered an event with no R1 data. DL0 is unchanged in this circumstance.

However, this is the expected case for almost anything (after all, ctapipe really starts at DL0), there shouldn't be a warning for the expected case.

LukasNickel commented 10 months ago

There are actually booleans defining whether or not the warnings for missing R1/DL0 should be emitted. And for some reason they are set to True if the Calibrator encountered an event without R1/DL0: https://github.com/cta-observatory/ctapipe/blob/b9b2a1a73bf1f8ca6875fd19a00a2acb9f71ded1/ctapipe/calib/camera/calibrator.py#L155-L165

Why would that make any sense? You don't warn when finding an event, but then make sure to emit the warning for the following events?

maxnoe commented 10 months ago

Why would that make any sense? You don't warn when finding an event, but then make sure to emit the warning for the following events?

It's the other way around. The name is misleading. It's only raising the warning for the first event and then not again.