cheminfo / convert-to-jcamp

Convert strings into JCAMP
https://cheminfo.github.io/convert-to-jcamp/
MIT License
0 stars 3 forks source link

XYdata and difdup #46

Closed lpatiny closed 2 years ago

lpatiny commented 2 years ago

there is a trick when you are using difdup compression about the last point that needs to be repeated on the next line. Not sure it was calculated here and you should check the specifications.

image

image

jobo322 commented 2 years ago

@lpatiny do you mean it is missing?

jobo322 commented 2 years ago

@lpatiny seems it is done here

lpatiny commented 2 years ago

Ok well possible. If the parser can read the generated jcamp and you recover the same number of points it should be ok.

It could also check that the parsed values are similar. Easy to make a mistake with those factors.

jobo322 commented 2 years ago

@lpatiny, do you know if it applies only for DIFDUP or we could generalize it?

also, it could be applied for 2D NMR variables, in this part of code?

lpatiny commented 2 years ago

Based on this publication: http://old.iupac.org/jcamp/protocols/dxir01.pdf

image

Based on this publication: http://www.jcamp-dx.org/protocols/dxnmr01.pdf

This is also quite interesting

image

Even if today I would rather consider 224 and not 216 as range.

lpatiny commented 2 years ago

@jobo322 please close this issue if you think it is ok.

jobo322 commented 2 years ago

It is included directly in the encoder. I will create a new ticket for recommended ordinate scaling