Problem with spectra having discontinuous domain
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.
Use the attached file to reproduce the problem. I changed the extension to .json.
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.
@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.
what do you think about split the discontinue spectrum into several continue spectra, in that way nmrium could manage correctly those ROIs