partridgejiang / Kekule.js

A Javascript cheminformatics toolkit.
http://partridgejiang.github.io/Kekule.js
MIT License
251 stars 62 forks source link

Simulated spectra not loading #275

Open cleblond opened 2 years ago

cleblond commented 2 years ago

I have many simulated spectra that are giving error 'JCAMP data table first/last values not match' when attempting to open with the widget.

I've attached an example.

1-bromo-2-2-dichloroethane-HNMR.zip

partridgejiang commented 2 years ago

Hi @cleblond, currently you can set an allowable deviation option before loading JCAMP data to avoid those errors:

Kekule.globalOptions.IO.jcamp.dxDataAllowedSavingErrorRatio = 0.001;
// then the loading process

The original value of that option is quite small and will be adjusted to a larger one for loading in the future releases. Thanks a lot for the feedback.