This repository was archived by the owner on Jun 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
This repository was archived by the owner on Jun 5, 2024. It is now read-only.
No interactions found -> crash of RawRecordsFromMcChain #385
Copy link
Copy link
Open
Description
Currently, when we use RawRecordsFromMcChain plugin, if there are no interactions found by epix, it will cause a crash with this error:
Traceback (most recent call last):
File "run_wfsim.py", line 120, in <module>
st.make(args.run_id, 'raw_records')
File "/opt/XENONnT/anaconda/envs/XENONnT_development/lib/python3.8/site-packages/strax/context.py", line 1411, in make
for _ in self.get_iter(run_ids[0], targets,
File "/opt/XENONnT/anaconda/envs/XENONnT_development/lib/python3.8/site-packages/strax/context.py", line 1263, in get_iter
components = self.get_components(run_id,
File "/opt/XENONnT/anaconda/envs/XENONnT_development/lib/python3.8/site-packages/strax/context.py", line 1024, in get_components
d.setup()
File "/opt/XENONnT/anaconda/envs/XENONnT_development/lib/python3.8/site-packages/wfsim/strax_interface.py", line 556, in setup
self.get_instructions()
File "/opt/XENONnT/anaconda/envs/XENONnT_development/lib/python3.8/site-packages/wfsim/strax_interface.py", line 809, in get_instructions
self.set_timing()
File "/opt/XENONnT/anaconda/envs/XENONnT_development/lib/python3.8/site-packages/wfsim/strax_interface.py", line 819, in set_timing
% (self.config['entry_stop'], np.min(self.g4id), np.max(self.g4id)))
File "<__array_function__ internals>", line 180, in amin
File "/opt/XENONnT/anaconda/envs/XENONnT_development/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 2916, in amin
return _wrapreduction(a, np.minimum, 'min', axis, None, out,
File "/opt/XENONnT/anaconda/envs/XENONnT_development/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 86, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation minimum which has no identity
This exception must be handled, and it would also make sense to check beforehand if there're any interactions to process or not. As for now, WFSim crashes, and it triggers useless job resubmissions if we use mc_chain.
Metadata
Metadata
Assignees
Labels
No labels