cheminfo / nmrium

React component to display and process nuclear magnetic resonance (NMR) spectra.
https://docs.nmrium.org
MIT License
55 stars 26 forks source link

Digital filter not applied if no zero filling #319

Closed lpatiny closed 4 years ago

lpatiny commented 4 years ago

If you drag and drop an FID (see attachment) and make the FT directly you get a huge phase problem

image

While if you first make a zero filling and the FT it looks ok

image

The digital filter should be applied when loading the spectrum and I don't know where it is currently applied.

1h.dx.zip

hamed-musallam commented 4 years ago

@lpatiny we apply the Digital Filter when we load the spectrum inside the datum1D contractor. https://github.com/cheminfo/nmr-displayer/blob/25378f7beb680aeb79a555f1769a6cfafcd8c788/src/data/data1d/Datum1D.js#L78-L89

lpatiny commented 4 years ago

@nes-cgn Do you think this is normal to have this wobbling baseline ? Could you try to use this jcamp with and without zero filling maybe with Topspin to check if you have similar results ? In the code it looks like we apply the digitalFilter correctly.

nes-cgn commented 4 years ago

Hello, I took the FID and did an FT without zero filling and without exponential appodisation, result without phasing 1H_after_ft_no_zerofill

nes-cgn commented 4 years ago

Then I did the same with zero filling and with 0.3 Hz linebroadening (see below) 1H_after_ef

nes-cgn commented 4 years ago

The phasing that I need to apply is quite humble 1H_after_ef+pcorr 1H_after_ef+pcorr_par

lpatiny commented 4 years ago

@nes-cgn Could you vertical scale your spectrum because in our case Y axis is really scaled in order to see those defects.

jobo322 commented 4 years ago

I think we should apply the digital filter just before FFT filter because if we apply digital filter before zero filling we will get a wrong behavior

jwist commented 4 years ago

This was mainly an issue with the digital filter. It is now mostly solved for recent files (with grpdly > 0)