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

_mass2tof returns negative time of flight values for extremely low masses #68

Open
alex-l-kong opened this issue Dec 11, 2023 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@alex-l-kong
Copy link
Contributor

Describe the bug

Certain users have started to specify panels with mass ranges 15 or lower. However, the _mass2tof function will return a negative time of flight value for these.

Because we convert the returned TOF array of _mass2tof to np.uint16, this causes the final range passed into the corresponding _extract_bin.pyx function to be incorrect, because any negative values get wrapped around to 65536 + (negative TOF value). Additionally, these TOF ranges will be incredibly large, and if it is part of a lowest-highest TOF range specification, it will cause memory issues.

Expected behavior

We'll need to discuss further, I'm not sure what the explanation of a negative TOF value should be.

To Reproduce

Run the function as is, and specify a mass in the provided panel with "Stop" equal to 15 or lower.

@alex-l-kong alex-l-kong added bug Something isn't working help wanted Extra attention is needed labels Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant