Osprey Process Error - Error in osp_XReferencing

Hi,
I’m trying to use Osprey to process some unedited MRS data (SIEMENS twix format) and I’m having some issues. When I run run >> MRS = RunOspreyJob(‘jobfile.m’) I get the following :

Timestamp August 23, 2024 17:01:58 Osprey 2.6.6
Timestamp August 23, 2024 17:01:58 Osprey 2.6.6 OspreyLoad
Loading raw data from dataset 1 out of 1 total datasets…
Software version: VD (!?)
Scan 1/2, read all mdhs:
35.3 MB read in 0 s
Scan 2/2, read all mdhs:
4.2 MB read in 0 s

ans =

 0

multi RAID file detected.
No integrated water reference data found. Returning empty field

… done.
Elapsed time 2.239790 seconds
Timestamp August 23, 2024 17:02:00 Osprey 2.6.6 OspreyProcess
Processing data from dataset 1 out of 1 total datasets…
Index exceeds the number of array elements. Index must not exceed 0.

Error in osp_XReferencing (line 89)
HWHM=abs(tempx(gtHalfMax(1)) - tempx(gtHalfMax(end)))/2 * 0.8;

Error in op_preref (line 176)
[refShift, ~] = osp_XReferencing(temp_spec,frequencies,polarity,lim,0);% determine frequency shift

Error in OspreyProcess (line 248)
[refShift_ind_ini]=op_preref(raw,seq);

Error in RunOspreyJob (line 32)
MRSCont = OspreyProcess(MRSCont);

I was curious, so I commented out everything except OspreyLoad and wanted to look at the PDF it produces, because OspreyLoad should at least produce a spectra, right?

So the PDF is completely empty, which isn’t great, and I’m also wondering why this happens.

Here’s an example data file (with the anonymising script applied) : Dropbox
and the job file I used :
Dropbox

Any help or advice would be appreciated.

Hi @culverinse,

I looked at your data, and I am still not sure what kind of data this is.

The dimensions are 512, 34, 8, and 3, with the first one being the number of data points and the second one being the channels. I am not sure about the other dimensions, though.

Also, as you can see in the image, the ppm axis is not where you would expect it for proton MRS, so as long as I don’t have any additional information about the origin of the data, I am unable to help. This is also why the Osprey window doesn’t show any results and the cross-referencing fails. Could you ask whoever acquired the data for more information?

Best,
Helge

Raw-data

@culverinse, maybe I’m missing something but this looks like field mapping data to me (fastestmap_linear_3, I guess N=8 in 3 planes), not MRS? Do you have some other twix files saved too, and do these behave better?

By the way: which anonymizing script did you apply? It missed something (I’ll elaborate to the developers directly).

@alex and @Helge

Hi, yes. So I talked with the person who did the scan and the data was actually from a shimming procedure called FASTESTMAP (I wasn’t familiar with the name and I was a little stupid there).
I’ll try working on the other twix files that should actually have met data and hopefully those work.

Anonymizing script : I used the twix deidentification script from GitHub - schorschinho/MRSDeIdentificationTools: Tools to remove protected health information (PHI) from magnetic resonance spectroscopy data..

That would explain it :slight_smile: It can be confusing with all the different acronyms, especially when these sequences store their raw data in a similar format.

2 Likes