Skip to content
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

Error message for nr_only flag producing empty dataset #294

Open
jjakob03 opened this issue Feb 20, 2025 · 0 comments
Open

Error message for nr_only flag producing empty dataset #294

jjakob03 opened this issue Feb 20, 2025 · 0 comments

Comments

@jjakob03
Copy link

When using the nr_only flag with not enough events in the root file or using only a part of the file, then the probability is quite high that not a single entry is returned. For example, the context & config could look like this:

st=cutax.contexts.xenonnt_fuse_sim_SR0v1_globalv12(simulation_config='sr0_dev')
st.set_config(
    {
        "path": "root/path/ambe_w_coincidence/",
        "file_name": "sim.root",
        "entry_stop": 20,
        "nr_only": True
    }
)

In this case, fuse dies dramatically with an unhelpful error message somewhere in the chunking:

numba.core.errors.TypingError: Failed in nopython mode pipeline (step: nopython frontend)
No implementation of function Function(<function argsort at 0x1471345ecee0>) found for signature:
 
 >>> argsort(array(int64, 3d, C))
 
There are 2 candidate implementations:
   - Of which 2 did not match due to:
   Overload of function 'argsort': File: numba/core/typing/npydecl.py: Line 368.
     With argument(s): '(array(int64, 3d, C))':
    No match.

During: resolving callee type: Function(<function argsort at 0x1471345ecee0>)
During: typing of call at .../fuse/fuse/common.py (30)


File ".../fuse/fuse/common.py", line 30:
def dynamic_chunking(data, scale, n_min):
    idx_sort = np.argsort(data)
    ^

It would be helpful if an empty array would raise an error suggesting to go for more events or explaining what happened instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant