cheminfo-js / spectra-data

Library to deal with spectra (IR, UV, ...), 1D NMR as well as 2D NMR
https://cheminfo-js.github.io/spectra-data
MIT License
4 stars 0 forks source link

Peak picking on some spectra takes a very long time #61

Open lpatiny opened 7 years ago

lpatiny commented 7 years ago

Here is an example of jcamp file test.jdx.zip

The process blocks at the level of https://github.com/cheminfo/nmr-metadata/blob/17a39cfe2e0efb408a64561170139c87aa1135da/src/index.js#L102

andcastillo commented 7 years ago

Yes. There is a problem if you try to optimize too many peaks. Hopefully the Levenberg–Marquardt of Miguel is better than mine and we could optimize much more gaussians in a shorter time. By now, that problems has been solved in the new spectra-data releases by setting optimize to false by default. So, the solution is to update to a higher spectra-data version.

andcastillo commented 7 years ago

@lpatiny @maasencioh

maasencioh commented 7 years ago

@andcastillo this optimization it's related with this issue?

https://github.com/mljs/levenberg-marquardt/issues/4

andcastillo commented 7 years ago

Not really. What I mean is that I'm using my own LM implementation. It is a transcription from a matlab code. Perhaps yours is better, but now, you need to make some improvements in order I can try to use it here. And the reason of the issue is that my parameters has many orders o magnitud of difference(x is 0.01 ppm range and intensity is 100000000), then, global options for them does not work properly.