Decoding the fid in HMDB00005.nmrML

24 views
Skip to first unread message

Steffen Neumann

unread,
Nov 8, 2013, 6:11:01 PM11/8/13
to nm...@googlegroups.com
Dear Michael,

thanks for the updated example files. I am currently
writing the initial example code for nmRIO.

I am uncertain that I get the conversion back
to complex128 correct, could you provide me
with the first few decoded numbers in
<fidData encodedLength="165170" compressed="true" byteFormat="Complex128">

This what I currently get:

> ## from Bruker
> filename <- "../../../../../examples/reference_spectra_example/HMDB00005.nmrML"
>
> fid <- readNMRMLFID(filename)
> str(fid)
cplx [1:14400] 6.64e+38+3.2e+37i -1.28e+35+4.7e+36i 5.00e+32+0.0i ...

I just want to check if I got this right.

Thanks in advance,
Yours,
Steffen


--
IPB Halle AG Massenspektrometrie & Bioinformatik
Dr. Steffen Neumann http://www.IPB-Halle.DE
Weinberg 3 http://msbi.bic-gh.de
06120 Halle Tel. +49 (0) 345 5582 - 1470
+49 (0) 345 5582 - 0
sneumann(at)IPB-Halle.DE Fax. +49 (0) 345 5582 - 1409

DJ

unread,
Mar 6, 2014, 10:28:08 AM3/6/14
to nm...@googlegroups.com
Hi Mike

Sorry if I arrive after the battle, but I currently develop a nmrML reader in JAVA. It seems works fine ... with my nmrML files, but not with yours. So I would like to known how did you compress your fid data you give on http://nmrml.org/examples/. Because the first one mentions encodedLength=165170 and Complex128 as byteFormat. For me, Complex128 means: 2 * float64, i.e. 16 bytes.
If FID data were compressed as ZIP format, logically, after uncompressing , I would have 16 * 165170, i.e. 2642720.  However, I get only 230400 bytes!! This seems very strange! 
1/ do you confirm that Complex128 type means 2 * float64 ? (2 * Integer64 or else?)
2/ can you check if your compressed data are correct ? 
Thanks!

I put an exemple with compressed data (fid + 1r) (see http://nmrml.org/examples/3).
For FID: encodedLength=32768 and Integer32 as byteFormat. So we would have 32768 * 4 = 131072 bytes. After uncompressing, it's what I get.

Cheers
DJ

Steffen Neumann

unread,
Mar 7, 2014, 1:43:59 AM3/7/14
to DJ, nm...@googlegroups.com
Hi Daniel,

the naming complex128 is the confusing thing:
https://github.com/nmrML/nmrML/issues/74#issuecomment-32422942

Here is how I decompress that in R:
https://github.com/nmrML/nmrML/blob/master/tools/Parser_and_Converters/R/nmRIO/R/readNMRMLFID.R#L53

Which is called from here:
https://github.com/nmrML/nmrML/blob/master/tools/Parser_and_Converters/R/nmRIO/R/readNMRMLFID.R#L23

I still think we need to fix the naming of complex128
to avoid exactly this confusion.

And you brought up an important point about interoperability:
Can you point me to one of your example files, and also provide
me with the first, say, 10 decoded numbers in clear text,
so that I can add a corresponding unitTest for nmRIO ?

Yours,
Steffen
Reply all
Reply to author
Forward
0 new messages