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 as Jcamp #1415

Closed hamed-musallam closed 1 year ago

michelgravel commented 1 year ago

That would be a nice feature! It would allow to process an FID from a proprietary format, then save as JCAMP and use it on any platform, such as cheminfo or c6h6.

lpatiny commented 1 year ago

@jobo322 I guess saving the data as JCAMP-DX will also be managed by nmr-load-save ?

We will need to provide options for this feature:

We we save FID that was processed we should ideally be able to reload it (like PH0, PH1 for example)

jobo322 commented 1 year ago

@lpatiny, currently, we have the possibility to write an NMR jcamp file, it was tested in m-nova and topspin, I will add this possibility in nmr-load-save. in order to be able of reloading an FID processed in nmrium, we should apply a processing script that would check for PH0-1 in the file and LB too. it is not implemented yet. are you thinking to implement this in nmr-load-save?, I think we could add filters, so nmrium could apply those filters after the importation.

michelgravel commented 1 year ago

nmr-load-save is what I had in mind. Thank you!

lpatiny commented 1 year ago

@jobo322 It is a good idea to add the filters and apply them automatically but probably too early. We will keep this for later when we will have a simple way to edit the filters.

jobo322 commented 1 year ago

@michelgravel here is the function in nmr-load-save to create a jcamp file.

michelgravel commented 1 year ago

I don't see the option to save as jcamp under 'Export As' in nmrium. Am I missing something?

jobo322 commented 1 year ago

Hello @michelgravel you can access by right click over the spectrum: exportAsJcamp

michelgravel commented 1 year ago

Thank you! I was not aware of the right-click function. However, when I import the jcamp spectrum into c6h6.org I noticed the ppm scale is wrong and the spectrum display right-to-left instead of left-to-right. Is that an nmrium problem or a c6h6 problem?

jobo322 commented 1 year ago

Hello @michelgravel, thank you for the advertisement. I reopen this issue and it is related with:

jobo322 commented 1 year ago

Hello @michelgravel, could you test please the behavior of exportAs jcamp-dx in the last changes. you can do it in https://dev.nmrium.org

michelgravel commented 1 year ago

I just tried it on the development site and it works great. Thank you!