nmrium icon indicating copy to clipboard operation
nmrium copied to clipboard

Save read part as JCAMP-DX and reload does not work

Open lpatiny opened this issue 8 months ago • 3 comments

If you load this spectrum:

1h.jdx.zip

And save it has JCAMP-DX real part.

Reloading it thinks it is a FID and not a processed spectrunm.

Image

lpatiny avatar Apr 25 '25 07:04 lpatiny

In the current state of nmrium, it load a processed spectrum, there are two aspect of possible bugs:

  1. the x axis looks inverted for the generated jcamp.
  2. the icon looks as a FID, possibly isFID true in the info of the generated jcamp (to be checked)

https://github.com/user-attachments/assets/d6b3dd82-4336-494f-85ab-d8d15cd4dead

jobo322 avatar May 13 '25 05:05 jobo322

Can you detail the reasons ?

If the fix should be done in the NMRium project you should explain how to do. It it is in dependencies you can make a PR to fix the issues.

lpatiny avatar May 13 '25 06:05 lpatiny

When nmrium processes FID data, only the info object is modified. Including the meta object in the JCAMP generation causes confusion, as it contains unmodified metadata from the original source. A quick solution is to exclude the meta from the information that we pass to the function spectrum1DToJcampdx

jobo322 avatar May 13 '25 16:05 jobo322