-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in image extractor handling #293
Comments
Do you use your own config file system, or are you using the ctapipe one? If the ctapipe one (i.e your scipt inherits from self.image_extractor = self.add_component(
ImageExtractor.from_name(
self.image_extractor_type, # where this is some config variable with a string name
parent=self,
subarray=self.event_source.subarray,
)
)
self.calibrate = self.add_component(
CameraCalibrator(parent=self, image_extractor=self.image_extractor)
) It will be configured automatically (setting the "parent" attribute will pass the config from the parent Tool - this is part of traitlets.config). note that the add_component wrapper function is only used in the development version of ctapipe, but isn't there in older version (it allows the configuration to be tracked and validated against what the user requested, so would avoid this bug you have). |
Hi @kosack, |
Thanks for the comment @kosack. @FrancaCassol is right, but we would probably need a new stable release of ctapipe for it. I've been also discussing with @maxnoe, are you guys planning to do a release soon? |
Solved in #297 |
Hi all,
I open this issue for discussion, I will open a separate PR for the fixing. @FrancaCassol, @moralejo and I have been investigating the light collection efficiency derived using muon analysis. It seems that we have found a bug on how the selected image extractor is passed to the analysis chain. At the moment, the image extractor is defined in:
cta-lstchain/lstchain/data/lstchain_standard_config.json
Line 100 in 921c5cc
the script of data analysis calls:
cta-lstchain/lstchain/scripts/lstchain_data_r0_to_dl1.py
Line 67 in 921c5cc
that calls the
LSTCameraCalibrator
cta-lstchain/lstchain/reco/dl0_to_dl1.py
Line 192 in 921c5cc
here we pass the variable
image_extractor
cta-lstchain/lstchain/reco/dl0_to_dl1.py
Line 194 in 921c5cc
but the one
LSTCameraCalibrator
expects isextractor_product
:cta-lstchain/lstchain/calib/camera/calibrator.py
Line 20 in 921c5cc
The fix is just to change
image_extractor
->extractor_product
incta-lstchain/lstchain/reco/dl0_to_dl1.py
Line 194 in 921c5cc
I'm currently running tests, I'll make the PR afterwards. Any opinions?
Consequences:
extractor_product
:NeighborPeakWindowSum
, with its default initialization ( window_shift: 3, window_width: 7). This is specially bad because of time misalignment in neighbor modules (@FrancaCassol can comment further on that).The text was updated successfully, but these errors were encountered: