.rda and .ima formats give different results

1,149 views
Skip to first unread message

Pippa Storey

unread,
Apr 18, 2016, 11:10:34 AM4/18/16
to TARQUIN users' group
I have assumed that Siemens .rda and .ima files have the same information content. They are both generated by exporting data from the patient browser, .ima files via 'export to offline' and .rda via the Siemens spectroscopy tool. Indeed .rda files can be generated from .ima files by reimporting .ima files back onto the scanner and exporting them from the Siemens spectroscopy tool as .rda. 

However, when I import .rda and .ima files FOR THE SAME ACQUISITION into Tarquin and process them USING THE SAME PARAMETERS I get different results for the metabolite areas. Why? One observation: the phasing of the spectrum in the final fit seems to be slightly different depending on whether I import the data in .rda or .ima format, even though I use automatic phasing in both cases.

Any thoughts?

Thanks,
Pippa

Andreas Bartsch

unread,
Apr 18, 2016, 5:07:11 PM4/18/16
to tarquin_u...@googlegroups.com
Hi Pippa,

bummer - that would be quite distressing, wouldn’t it.
I have no idea but could you post example files?

Cheers,
Andreas

--
You received this message because you are subscribed to the Google Groups "TARQUIN users' group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tarquin_users_g...@googlegroups.com.
To post to this group, send email to tarquin_u...@googlegroups.com.
Visit this group at https://groups.google.com/group/tarquin_users_group.
For more options, visit https://groups.google.com/d/optout.

Pippa Storey

unread,
Apr 19, 2016, 9:43:24 AM4/19/16
to TARQUIN users' group
In response to Andreas Bartsch, I am attaching an example. The fit using the ima file is labeled DB_ima.pdf and the fit using the rda file is labeled DB_rda.pdf. In both cases the fits were performed with the 'quick fit' option, so the parameters should be identical in both cases. You will notice that the ratio of total choline to total creatine differs by about 14% between the two file formats, so it's not an insignificant difference. Furthermore you will notice that the phasing appears to be different between the two cases, despite the fact that they should be based on the same data and were phased using the automatic phasing that is run as part of the quick fit.
DB_rda.pdf
DB_ima.pdf

Martin Wilson

unread,
Apr 19, 2016, 10:44:21 AM4/19/16
to tarquin_u...@googlegroups.com
Hi Pippa,

Thanks for the plots. My best guess is that the data in the two files
are not numerically identical. RDA files are text based, whereas IMA
stores the MRS data in a DICOM style structure of floating point
numbers so it's likely the numerical precision (and therefore absolute
values) are slightly different between the formats.

A difference of 14% may seem surprising, however the predicted error
of the TCr measure is around 20% and this is what you are using as a
denominator.

Martin

Ben Rowland

unread,
Apr 19, 2016, 11:25:01 AM4/19/16
to tarquin_u...@googlegroups.com
Hi Martin,

Actually only the header of the RDA files is text based, the actual data is stored in a binary format. RDA does store the FIDs as double precision while IMA only uses single precision but this is too small a difference to explain these differences. Also as Pippa notes the RDA can be reconstituted from the IMA so the extra precision is meaningless.

I overlaid the two spectra on top of each other (attached) and it is clear that they are essentially identical, so I would expect the estimates of the metabolites to be fairly close to each other. My suspicion is that they are starting from different initial guesses despite being launched the same way, this would almost certainly cause the optimisation routine to converge on a slightly different solution.

One interesting thing to note is that the Init beta of the first spectrum is 102, dropping to a final beta of 91.2, while for the second spectrum it starts at 22.1 and increases to 77.3. Is there some difference in the way TARQUIN guesses parameters for the different files which could explain that?

Ben

P.S. Pippa, if you can share the .IMA and .RDA files in question (anonymised of course) then I can easily compare the raw data and confirm for you whether there is any difference between the two formats.

Pippa Storey

unread,
Apr 19, 2016, 2:21:23 PM4/19/16
to TARQUIN users' group
Thank you both for your feedback. I have anonymised the .ima file and generated an .rda file from it, and am attaching both. I haven't learned yet how to read spectroscopy data from either file format, so if you can tell me what the differences are, I would be interested to know. If there is no difference in the data, but there is a difference in the initial guesses used for fitting spectra from .rda and .ima inputs, I would be interested to know that also. Is one file format 'preferred' for any reason?

Thank you once again for your help.

Pippa 


On Monday, April 18, 2016 at 11:10:34 AM UTC-4, Pippa Storey wrote:
DB_MARCH8_1.MR.0010.0001.2016.04.08.08.56.33.941434.62223144.IMA
DB_TE40.rda

Ben Rowland

unread,
Apr 19, 2016, 3:02:47 PM4/19/16
to tarquin_u...@googlegroups.com
Hi Pippa,

I opened up both of the files you attached using some Python scripts I have. I mentioned before that RDA uses double precision while IMA uses only single, in my code I convert both to double precision (complex128), and there is no difference between the data in the two files. Of course, this is not the same code that TARQUIN uses to read data files but this suggests that the two files should give identical processed results.

Ben


--
You received this message because you are subscribed to the Google Groups "TARQUIN users' group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tarquin_users_g...@googlegroups.com.
To post to this group, send email to tarquin_u...@googlegroups.com.
Visit this group at https://groups.google.com/group/tarquin_users_group.
For more options, visit https://groups.google.com/d/optout.
<DB_MARCH8_1.MR.0010.0001.2016.04.08.08.56.33.941434.62223144.IMA><DB_TE40.rda>

Martin Wilson

unread,
Apr 20, 2016, 2:49:55 AM4/20/16
to tarquin_u...@googlegroups.com

Hi Pippa,

Thanks for the data. Ben is correct that the MRS raw data has been stored with equal precision between RDA and IMA and there are no differences there.

However, the RDA header is text based, therefore the transmitter frequency and sampling frequency (read from the header) are slightly different between the two formats for the reasons described before. I've attached a text representation of the two files after being read by TARQUIN and you should be able to spot the differences. I strongly suspect this is the cause of the differences you have observed.

As for which number is correct, this is anyones guess, but I still think that the noise present in the data is the dominant source of error. The slight differences in the fitting results just highlighting the inherent uncertainty in the measures.

Martin

ima.dpt
rda.dpt

Pippa Storey

unread,
Apr 20, 2016, 10:27:18 AM4/20/16
to TARQUIN users' group
Thank you both for looking at the files I uploaded. The difference in stated sampling frequency that Martin refers to seems to originate from the way that dwell time is listed in the .ima and .rda files. In particular, it seems that the .rda file rounds the dwell time. In the header of the .ima file, 'RealDwellTime' is listed as 833400, whereas in the header of the .rda file, 'DwellTime' is given as 833. 

Martin, I tried to reproduce the .dpt files that you sent using the 'export raw WS signal'. The files I got were almost identical to yours except for the Phi0 and Phi1 fields near the top. They were both zero in your files but non-zero in mine, and very different when I import the data using .ima and .rda formats. Are the Phi0 and Phi1 fields taken from the .ima and .rda files or are they calculated by Tarquin? 

Ben, would you mind sharing your Python scrips for reading the FID from .ima and .rda files?

Thanks again to you both.
Pippa


On Monday, April 18, 2016 at 11:10:34 AM UTC-4, Pippa Storey wrote:
Reply all
Reply to author
Forward
0 new messages