Slightly shifted spectrum when using Osprey LCModel wrapper

Hello @admin,

I have encountered a peculiar issue where, when I process unedited data in Osprey and use the LCModel wrapper to fit it, the spectrum appears slightly shifted to the right

. However, when I process the same file using the command line to run the LCModel on my MacBook Air (M3, Sequoia 15.6.1), I see no shift and everything aligns where it is supposed to be. I’m using the same control file written by Osprey, with the only change being the path to the basis file.

I vaguely recall reading that LCModel attempts to correct any shifts in the spectrum, so is this feature disabled in the LCModel wrapper in Osprey? Or, could the shift be in my basis set .mat file? I used the basis io_LCMBasis.m basis function in Osprey to make my basis file compatible with Osprey.

Any tips would be greatly appreciated!

Best,
Humberto

Hi Humberto,

During loading/processing, Osprey makes some attempts to pre-phase and frequency-correct spectra - they’re intended to correct any coarse frequency/phase errors before feeding the spectrum into the modeling. But yeah, it seems like in this case it has actually moved the spectrum a little to the right.

LCModel accounts for small frequency shifts between basis set and data on its own accord (you’re right about that), so I don’t think this is too problematic.

Best,
Georg

Hello Georg,

I wanted to ask about the automatic control file generation in Osprey. I noticed that the wconc value is set to 55556 and the attmet is set to 1.0. I was reading the manual, and it seems these are the default values for a phantom? The default should be 35880 and 0.7 according to the LCModel manual.

I got around this by changing the code manually, but we are also trying to implement the workflow from this paper Continuous automated analysis workflow for MRS studies, which uses the command-line executable version of Osprey, so I can’t manually edit anything.

I guess I can rebuild the executable, but I’m just wondering why these are the default values.

Thanks!
Humberto

Hi @hmonsivais,

All water concentration and relaxation corrections are handled internally in OspreyQuantify. Therefore, it was much easier to set the default to pure water and no relaxation correction for LCModel.

The section %%% 3. GET WATER-SCALED, TISSUE-UNCORRECTED RATIOS %%% in OspreyQuantify takes care of if these factors are defined differently in the control file.

I hope this answers the question.

Helge

Hi @Helge thanks for the reply. Yes, this makes sense. We were only looking at the LCModel ouputs from OspreyFit and not the results from OspreyQuantify. Our people here are used to the LCModel output.