Open maxnoe opened 4 months ago
Yes, it makes sense to have it in ImageProcessor, since that is generally where you want to avoid invalid pixels, so ok by me.
I tried to implement this today, but ran into some conceptual issues:
selected_gain_channel
is only stored at dl0, not at dl1ImageProcessor
currently works without needing dl0 information, it is purely dl1These are the reasons, why the current InvalidPixelHandler
is somewhat tied to the DL0 → DL1 step and is thus in CameraCalibrator
.
Also: is_valid
is currently a single bool, it should probably be a boolean mask for each pixel, same shape as image itself.
Brought up in a discussion with @aleberti in this issue here: #2331
We added the
InvalidPixelHandler
as last step ofCameraCalibrator
when doing the dl0 → dl1 step.That prevents applying it on input data that does not contain DL0 (e.g. DL1 images loaded with the
HDF5EventSource
or a custom source as is the case for the MAGIC plugin).I think we could move the
InvalidPixelHandler
application from theCameraCalibrator
to theImageProcessor
to enable applying it also on DL1 input.@kosack what do you think?