Error in Osprey - Unrecognized field name "names"

Hi Osprey Developers,

We are having trouble getting the latest version (2.5.0) of osprey to process Siemens MEGA-PRESS data. When running OspreyLoad, we get

| Reader version: 1496740353 (UTC: 06-Jun-2017 09:12:33)
| Scan 1/2, read all mdhs:
| 35.4 MB read in 1 s
| Scan 2/2, read all mdhs:
| 532.2 MB read in 1 s
|
| No water reference data found. Returning empty field

and then when running OspreyProcess

| Unrecognized field name “names”.
|
| Error in osp_XReferencing (line 42)
| ind = find(strcmp(dataToFit.names,‘sum’));
|
| Error in op_preref (line 178)
| [refShift, ~] =
| osp_XReferencing(temp_spec,frequencies,polarity,lim,0);%
| determine frequency shift
|
| Error in OspreyProcess (line 248)
| [refShift_ind_ini]=op_preref(raw,seq);
|

These errors occur even with data that was successfully processed with earlier versions of Osprey. Any help with this would be much appreciated.

Hi @BenC,

So the first message is normal. The no water reference data found. Returning empty field message means that your sequence did not have an integrated water reference in the TWIX .dat file. This is a feature of, for example, the CMRR sequence. In this case, the TWIX .dat file contains water reference data which is then separated by Osprey.

For the second message. Could you make a screenshot of MRSCont.raw{1, 1}.flags and MRSCont.raw{1, 1}.seq. It seems like the sequence is not correctly identified.

Best,
Helge

Hi @Helge,

Thankyou for your reply. It does seem to be interpreting the data as unedited, despite the fields in MRSCont.flags specifying edited / MEGA -PRESS:

MRSCont.raw{1,1}.seq

ans =

'PRESS'

MRSCont.raw{1,1}.flags
writtentostruct: 1
gotparams: 1
leftshifted: 1
filtered: 0
zeropadded: 0
freqcorrected: 0
phasecorrected: 0
averaged: 0
addedrcvrs: 1
subtracted: 0
writtentotext: 0
downsampled: 0
isFourSteps: 0
isUnEdited: 1
isMEGA: 1
isHERMES: 0
isHERCULES: 0
isPRIAM: 0
isMRSI: 0

I am able to share the data if that would help, though the file is rather large.

Hi @BenC,

that is indeed bad. It identifies them as isUnEdited and isMEGA at the same time. I would like to find a clean solution for this.

Could you upload one dataset to OneDrive or something similar?

Best,
Helge

Hi @Helge,

I coincidentally was using Osprey for the first time and ran into the exact same error messages as Ben using Siemens MEGA-PRESS data. I will send you a direct message with a DropBox link to download an example data file.

Cheers,
Corey

1 Like

Hi both,

I have just pushed a new version to the develop branch (GitHub - schorschinho/osprey: All-in-one toolbox for processing of magnetic resonance spectroscopy data.) that solves both your issues.

Let me know if things work out on your side.

Best,
Helge

Hi @Helge,

The fix worked! I subsequently ran into an error when calling MRSCont = OspreyFit(MRSCont);

Unrecognized field name “water”.

Error in osp_plotModule (line 606)
RawAmpl = RawAmpl ./ (MRSCont.fit.results.water.fitParams{1,kk}.ampl .* MRSCont.fit.scale{kk});

Error in osp_plotAllPDF (line 76)
osp_plotModule(MRSCont, ‘OspreyFit’, kk,[bb ss], Names{mm});

Error in OspreyFit (line 228)
osp_plotAllPDF(MRSCont, ‘OspreyFit’);

which was the result of water fit results being stored as MRSCont.fit.results.w.fitParams. rather than MRSCont.fit.results.water.fitParams. Changing line 606 in osp_plotModule.m to:

RawAmpl = RawAmpl ./ (MRSCont.fit.results.w.fitParams{1,kk}.ampl .* MRSCont.fit.scale{kk});

let the function run to completion and hopefully correctly.

I did run into a subsequent error when running MRScont = OspreySeg(MRSCont) after
MRScont = OspreyCoreg(MRSCont); which gave the following error:

Error using osp_CheckRunPreviousModule
Trying to segment data, but data has not been loaded yet. Run OspreyCoreg first.

Error in OspreySeg (line 37)
[~,MRSCont.ver.CheckOsp ] = osp_CheckRunPreviousModule(MRSCont, ‘OspreySeg’);

Not sure what is causing that error.

Thanks,
Corey