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

Find a way to specify the reference in the spectrum #29

Closed lpatiny closed 7 years ago

lpatiny commented 7 years ago

In the peak picking view and compare we should be able to shift the spectrum

andcastillo commented 7 years ago

there is a function SD.shift(value) that shift the given spectrum in the x axis. You can also shift in the y axis with SD.yShift(value). @lpatiny does it works? Perhaps we just need to keep the value inside to revert the action.

lpatiny commented 7 years ago

I never tried this function but it looks like it could solve our problems. @stropitek do you think we could click with the tracking mode on a spectrum and have the value of this peak that is editable ?

Concerning storing the shift I think it would be important in the case of jcamp generation. @andcastillo do you know how to store this correctly in the jcamp without having to invent a parameter ? But yes this shift should be kept somewhere in SD in order to be able to write the jcamp. SD should also deal with reference for 2D spectra.

andcastillo commented 7 years ago

there is a parameter OFFSET added by bruker to shift in thge x dimension. And it does what you need.