strax
strax copied to clipboard
Requesting an empty run as part of a multi_run call with add_run_id_field=False fails
In the somewhat rare use case of
- loading a run that does not return any entry (in my case, caused by usage of the
selection
argument) - together with at least one other run (so
multi_run
is called) - with the argument
add_run_id_field=False
there is an error when trying to fetch the minimum time of an empty array in this line.
I ran into this when trying to load more than 70 runs at the same time with a quite tight selection applied, followed the warning suggesting to do run_id_as_bytes=True
but then decided that I don't want to deal with the byte strings type that it produces and that I don't need the run_id at all.
To reproduce, load any list of run_ids
with len(run_ids)>1
and data_type of your choice with an impossible selection, e.g.
st.get_array(run_ids,'event_info',selection='(s1_area>42)&(s1_area<42)',add_run_id_field=False)
.