You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when running ctapipe-optimize-event-selection I have the following error:
2025-02-13 09:33:06,171 ERROR [ctapipe.ctapipe-optimize-event-selection] (tool.run): Caught unexpected exception: Error evaluating expression '('multiplicity 4', 'np.count_nonzero(HillasReconstructor_telescopes,axis=1) >= 4')': name 'HillasReconstructor_telescopes' is not defined Traceback (most recent call last): File "/home/blacave/CTLearn/Software/ctapipe/src/ctapipe/core/tool.py", line 439, in run self.start() File "/home/blacave/CTLearn/Software/ctapipe/src/ctapipe/tools/optimize_event_selection.py", line 150, in start events, count, meta = loader.load_preselected_events( File "/home/blacave/CTLearn/Software/ctapipe/src/ctapipe/irf/preprocessing.py", line 227, in load_preselected_events selected = events[self.epp.quality_query.get_table_mask(events)] File "/home/blacave/CTLearn/Software/ctapipe/src/ctapipe/core/qualityquery.py", line 138, in get_table_mask for i, res in enumerate(self.engine(table), start=1): File "/home/blacave/CTLearn/Software/ctapipe/src/ctapipe/core/expression_engine.py", line 44, in __call__ raise ExpressionError( ctapipe.core.expression_engine.ExpressionError: Error evaluating expression '('multiplicity 4', 'np.count_nonzero(HillasReconstructor_telescopes,axis=1) >= 4')': name 'HillasReconstructor_telescopes' is not defined
Hey Bastien,
I think you need to set the quality_criteria trait of the EventQualityQuery Component to make the config system work because its not a direct trait of the EventPreprocessor Component, e.g.:
when running
ctapipe-optimize-event-selection
I have the following error:2025-02-13 09:33:06,171 ERROR [ctapipe.ctapipe-optimize-event-selection] (tool.run): Caught unexpected exception: Error evaluating expression '('multiplicity 4', 'np.count_nonzero(HillasReconstructor_telescopes,axis=1) >= 4')': name 'HillasReconstructor_telescopes' is not defined Traceback (most recent call last): File "/home/blacave/CTLearn/Software/ctapipe/src/ctapipe/core/tool.py", line 439, in run self.start() File "/home/blacave/CTLearn/Software/ctapipe/src/ctapipe/tools/optimize_event_selection.py", line 150, in start events, count, meta = loader.load_preselected_events( File "/home/blacave/CTLearn/Software/ctapipe/src/ctapipe/irf/preprocessing.py", line 227, in load_preselected_events selected = events[self.epp.quality_query.get_table_mask(events)] File "/home/blacave/CTLearn/Software/ctapipe/src/ctapipe/core/qualityquery.py", line 138, in get_table_mask for i, res in enumerate(self.engine(table), start=1): File "/home/blacave/CTLearn/Software/ctapipe/src/ctapipe/core/expression_engine.py", line 44, in __call__ raise ExpressionError( ctapipe.core.expression_engine.ExpressionError: Error evaluating expression '('multiplicity 4', 'np.count_nonzero(HillasReconstructor_telescopes,axis=1) >= 4')': name 'HillasReconstructor_telescopes' is not defined
But in my config I specify
public-conf.txt
The text was updated successfully, but these errors were encountered: