cheminfo / nmrium

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

Export current spectrum as jcamp if 1D #1898

Closed lpatiny closed 1 year ago

lpatiny commented 1 year ago

If there is one spectrum selected and it is a 1D there could be one more export possibility:

Export current spectrum as JCAMP-DX

There is more or less a good example here but we should take care if it is a FID or a FT file.

https://github.com/cheminfo/convert-to-jcamp/blob/master/src/__tests__/from1DNMRVariables.test.ts#L39-L84

@hamed-musallam Could you try to implement this ?

This will require as dependency convert-to-jcamp

It will use: from1DNMRVariables

targos commented 1 year ago

Do you think it's more intuitive than right click -> export as jcamp directly in the list?

lpatiny commented 1 year ago

I was thinking about it. Maybe we could allow both.

lpatiny commented 1 year ago

Or it is easier to implement we can only have the export as JCAMP-DX with right click on the spectrum