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
The code assumed and the unit tests made it so that the StereoTrigger works only when tels_with_trigger is a python list,
however the event source implementations provide a np.ndarray with dtype uint16.
To Reproduce
Try processing a prod3 or prod6 divergent pointing file where there might be single LSTs with the stereo trigger set to simulate the LST hardware stereo trigger:
❯ ctapipe-process -i dataset://gamma_divergent_LaPalma_baseline_20Zd_180Az_prod3_test.simtel.gz \
-o /tmp/divergent.dl1.h5 \
--progress --overwrite \
--SimTelEventSource.focal_length_choice=EQUIVALENT \
--SoftwareTrigger.min_telescopes_of_type="[('type', '*', 0), ('type', 'LST*', 2)]"
/home/mnoethe/.local/conda/envs/cta-dev/lib/python3.9/site-packages/traitlets/traitlets.py:2930: FutureWarning: --SoftwareTrigger.min_telescopes_of_type=[('type', '*', 0), ('type', 'LST*', 2)] for containers is deprecated in traitlets 5.0. You can pass `--SoftwareTrigger.min_telescopes_of_type item` ... multiple times to add items to a list.
warn(
2023-05-08 12:08:24,527 WARNING [ctapipe.core.telescope_component] (telescope_component.attach_subarray): TelescopeParameter type argument 'SST_1M_*' did not match any known telescope types
SimTelEventSource: 1ev [00:02, 2.17s/ev]
2023-05-08 12:08:26,718 ERROR [ctapipe.ctapipe-process] (tool.run): Caught unexpected exception: 'numpy.ndarray' object has no attribute 'remove'
Traceback (most recent call last):
File "/home/mnoethe/Uni/CTA/ctapipe/ctapipe/core/tool.py", line 426, in run
self.start()
File "/home/mnoethe/Uni/CTA/ctapipe/ctapipe/tools/process.py", line 305, in start
if not self.software_trigger(event):
File "/home/mnoethe/Uni/CTA/ctapipe/ctapipe/instrument/trigger.py", line 99, in __call__
event.trigger.tels_with_trigger.remove(tel_id)
AttributeError: 'numpy.ndarray' object has no attribute 'remove'
Expected behavior
Single LSTs are removed, events with less than 2 telescopes are completely discarded.
Supporting information
Additional context
This is needed for the prod6 divergent processing, since due to an error in the simtel configuration, the LST hardware stereo trigger was not actually already included in the simulation.
The text was updated successfully, but these errors were encountered:
Can you explain how single LST events got through here? Looking at the code, if a numpy array was given, it looks like i should simply raise an exception since np.array.remove() doesn't exist. Maybe I'm missing something. Or is it just that we never had it find an event that needed to be skipped since the stereo trigger was properly simualted?
Describe the bug
The code assumed and the unit tests made it so that the
StereoTrigger
works only whentels_with_trigger
is a python list,however the event source implementations provide a
np.ndarray
with dtypeuint16
.To Reproduce
Try processing a prod3 or prod6 divergent pointing file where there might be single LSTs with the stereo trigger set to simulate the LST hardware stereo trigger:
Expected behavior
Single LSTs are removed, events with less than 2 telescopes are completely discarded.
Supporting information
Additional context
This is needed for the prod6 divergent processing, since due to an error in the simtel configuration, the LST hardware stereo trigger was not actually already included in the simulation.
The text was updated successfully, but these errors were encountered: