Metabolite concentrations calculated by Osprey


I am using Osprey for analyzing my SVS data acquired by STEAM and sLASER at 3T and 7T. I am facing a problem and I do not know why this is happening. I would appreciate it if you could help me.

1- All TissCorrected values for both steam and slaser at 3t and 7t are higher than the normal range when I use .ima and .rda formats. I tried with dat format just for steam at 7t, and the values were in the correct range. However, my problem is I do not have the same type of format for all my data.

Do you know what should I do so that the values be in the correct range for the .ima and .rda formats? (I put screenshots of quantification tables and a couple of videos to see the quality of fitting and the procedure).

2- For STEAM at 3T and 7T, I have dat and rda.
For sLASER at 3T and 7T, I have .ima and rda. All 4 Water reference scans and 32 averages for metabolite data were saved in one dat file for each sLASER, and I do not know how can I separate them. Also, I want to know if it is possible to extract the first 16 averages out of 32 from a dat file and save it as a new file?

Hi again,

I figured out how to split the dat file for sLASER, and able to analyse the slaser with dat format. However, still the metabolite concentrations for TissueCorrected are overestimated and out of their normal range. It appears that regardless of the format I use, the values remain incorrect, despite the data quality and fitting being satisfactory.

Additionally, I’ve observed that the raw-water values for STEAM at 7T are lower compared to sLASER. This pattern is consistent across all 10 subjects in my scans. But not at 3T. They are roughly similar.

I’ve attached screenshots from the quantification tables for sLASER and STEAM, utilizing various formats.

For sLASER, I had 4 averages for water-ref. I analysed both using all 4 averages and once using one average.

Hi Zeinab,
the difference between rawWaterScaled/CSFWaterScaled and TissCorrWaterScaled is very suprising. When I look into OspreyQuantify.m, the main difference between CSFWaterScaled and TissCorrWaterScaled is that for CSFWaterScaled the water concentration was assumed to be the same for white matter and we have mean relaxation times for T1 and T2. For these factors in TissCorrWaterScaled, tissue fractions were considered. Maybe it’s easier to look at the 7T data, because the CSF fraction looks very small and we can ignore them.
For CSFWaterScaled we have for water:
water concentration = 55600 (pure water)0.65 (water visibility for wm) = 36140 mmol/L
T1_Water = 1.675;
T2_Water = 0.0525;
For TissCorrWaterScaled we have for water (ignore CSF):
water concentratration = 43300 (GM) and 36080 (WM)
T1_water = 2.130 (GM) and 1.220 (WM)
T2_water = 0.055 (GM) and 0.050 (WM).
The difference of the used relaxation times is to similar to explain your effects, I think.
But when we have a closer look to the formulas, CSFWaterScaled is scaled by pure water concentration
water visibility. For TissCorrWaterScaled, I don’t see this factor (e.g. set molal_fWM=1, only molal_concW=55510 is left).
This can explain that you have about 50% higher concentrations with tissue correction. Maybe @admin can help why these differences in the formulas exist.

Best, Heiner

Hi Hiener,

Thanks a lot for your response and explanation. I believe I may have identified another factor contributing to the overestimation of my data. Please correct me if I’m mistaken.
I am using Dinesh sLASER sequence, it has 3 TEs: TE1=7; TE2=10;TE3=9 and the combination of these are the actual echo time that I am using (26 ms). In Osprey header we can only see TE1 (below is the screenshot), I believe it may only consider this TE for adjusting the Echo time and based on this do the quantifications:

In this script "OspreyQuantify.m, line 246, is for getting the echo time, I manually changed “MRSCont.processed.metab{kk}.te” to 26 ms, and here is the value after and before this change:

I couldnot find anywhere else in the codes except the one I mentioned for getting the TE, if I have to change it from somewhere else, please let me know. How about line 594 and 595?

After changing TE to 26ms(In the header TE is still 7):

Before changing:

@Helge I’d like to hear your thoughts on this issue. Your assistance and suggestions would be greatly valued.

Hi Zeinab,
you’re absolutely right. This is also a problem here. At the beginning, I was also thinking about it. But normally, that should have an effect on both, RawWaterScaled/CSFWaterScaled and TissCorWaterScaled. So I’m wondering, why your results didn’t change for CSFWaterScaled, only for TissCorWaterScaled.
You also have to take into account that waterTE should probably be corrected. When you set your TE values correctly in line 246-247, you needn’t change line 594-595.
And normally the metabolite concentration should be proportional to 1/exp(-TE/T2_Metab). When you increase TE in your calculations, the estimated concentrations should also increase, or not?
Because of that and the fact that rawWaterScaled/CSFWaterScaled isn’t changing, I’m afraid that we overlooked something. Maybe you can correct TE in your data.


Hi @ZeinabEftekhari,

sorry for the delay. There are several things to unpack for your dataset.

OspreyQuantify issues: You are actually right that there is something off with the quantification module. Apparently, the code converted the TE/TR values from ms to seconds in lines 246-247, but divided them by 1000 again in the quantH2O function (which produces the input for the CSF-corrected estimates). The values were therefore extremely small and changing the TE values had almost no effect on the quantification. I have just pushed a fix to GitHub to resolve this. It is fine to change the TE/TR values in lines 246-247 only. However, I’d would be better to resolve this by correctly parsing the header information during the OspreyLoad module. Could you take a look at this yourself and see if you can find the correct TE values from the header or share the data with me?

OspreyFit: I had a quick flick through your data because I was worried by the variance in the tNAA estimates. It seems like LCModel has problems with the scaling/quantification of the measured MM basis set you are using. In some cases, it is almost zero and the spline baseline is doing the only work for the macromolecules leading to very high metabolite estimates. This was mainly the case for subjects with lipid contamination. This definitely needs fixing. There are several possible ways to do this:

  1. Scale the MM basis function to have a similar scale as the rest of the basis set
  2. Exclude the frequency region between 1.1 and 1.85 ppm using the LCModel GAP settings in the control file
  3. Use Gaussian parameterized MM basis functions instead

Let me know how this works out.

You should also do a bit of quality control where you look for lipid contamination or out-of-volume signals before using the estimates.

@hraum Thank you for jumping in! About the differences in the formulas. For the TissueCorrected estimates, we are applying the water visibility factors in the very beginning (see pircture). Therefore, molal_fWM = 1 is similar to 55510 * 0.65.


Hi @Helge,
Thanks for your answer. I’m still not understanding how you take the water visibility factors into account. Indeed, they are included in concW_GM, concW_WM… But I see these concentrations only in calculations for the molal fraction (line 713-715). In the calculations for TissCorrWaterScaled (line 729-733), I just see that molal_concW is included and for molal_fWM = 1 I achieve:
TissCorrWaterScaled{mm,ss}.metab(kk,:slight_smile: = (amplMets{mm,ss}.metab(kk,:slight_smile: ./ amplWater) .* molal_concW .* (1 - exp(-waterTR/T1w_WM)) * exp(-waterTE/T2w_WM) / ((1 - exp(-metsTR/T1_Metab(kk))) * exp(-metsTE/T2_Metab(kk)));
Am I missing something?


Hi Helge,

Thank you for your help! It was very helpful.

Regarding OspreyQuanity, I figured out how to adjust TE in osp_LoadDICOM and osp_LoadTwix. Also in OspreyQuality.m when I removed lines 594 and 595, it improved CSFWaterScaled results, which are now closer to the right range.

As for OspreyFit, I understand that you mentioned in the data with lipid contaminations the metabolite concentrations are higher and you found out because of tNAA values fluctuations. However, I’m not clear on the exact reason. For instance, in data with lipid contamination using STEAM, what’s the issue with scaling MM?

I’m using the basis set provided by Dinesh and Gosia, which includes measured macromolecules. In the control file, I set NSIMUL=0 and dkntmn=5, and I removed the chomit = ‘Mac’ command from the default Osprey control file. Because I didn’t create the basis set myself, I need help with the first and third solutions you suggested. Can you please explain how to do them and clarify the difference between these three solution? If there’s no difference, I attempted the second solution by using these commands: ppmgap(1,1) = 1.85 and ppmgap(2,1) = 1.1. However, I encountered an error in Osprey.

 FATAL ERROR  MYCONT  2.   (Check LCModel Manual).  ************************************************************************ 

This error occurred before the plot could be produced.
See the Diagnostics list in the LCModel Manual. ***

I tried the same command with LCModel, and it worked successfully.

If I implement the second solution for my data, given that we’re disregarding macromolecule (MM) concentrations within this gap, could this approach potentially impact the accuracy of the overall metabolite quantification?