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

Problem with spectra having discontinuous domain #2820

Open
andcastillo opened this issue Jan 11, 2024 · 3 comments
Open

Problem with spectra having discontinuous domain #2820

andcastillo opened this issue Jan 11, 2024 · 3 comments

Comments

@andcastillo
Copy link

I have some spectra in .nmrium format with discontinuous x. When I full zoom out, it fill the gap with some points around the hole. If you zoom in around the zone, it shows the right flat zone.

case1
case2
toview.json

Use the attached file to reproduce the problem. I changed the extension to .json.

@lpatiny
Copy link
Member

lpatiny commented Jan 11, 2024

Indeed currently NMRium expect to have a constant deltaX because we are reducing the number of points in order to increase display speed.
So we need to discuss if this is an important feature and how to implement it.

@lpatiny
Copy link
Member

lpatiny commented Jan 11, 2024

@andcastillo The culprit is likely https://github.com/mljs/spectra-processing/blob/14c0ddeecb8af069f98db44a54465c9f05edf5a2/src/xy/xyReduce.ts#L26 because we don't expect deltaX to change.

If you are able to improve the code without slowing it down you are welcome to make a PR.

andcastillo added a commit to andcastillo/nmrium that referenced this issue Jan 12, 2024
@jobo322
Copy link
Member

jobo322 commented Jan 19, 2024

what do you think about split the discontinue spectrum into several continue spectra, in that way nmrium could manage correctly those ROIs

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

3 participants