MEGA-sLASER ON/OFF .RAWs to Osprey DIFF Basis Set

Hi all,
I’m working on creating a DIFF basis set for Osprey using a simulated MEGA-sLASER sequence (CMRR, TE = 68 ms) on a Siemens Skyra 3T system. I used @wclarke sequence information and simulated the spectra via FSL-MRS, which gave me ON and OFF .RAW files as well as ON/OFF/DIFF .json files.

However, I’m now a bit stuck on how to proceed:
:small_blue_diamond: FSL-MRS doesn’t output DIFF .RAW files, only DIFF .json
:small_blue_diamond: I need DIFF .RAW files (or .mat) to import into Osprey to create the basis set

What’s the recommended way to convert the ON and OFF .RAW files (LCModel-style) into DIFF .RAW or .mat files for use in Osprey’s fit_makeBasis?

Any suggestions, example scripts, or advice would be very much appreciated!

Thanks a lot in advance!

Hi @Thomas ,

I’ve just got round to this after getting back from holiday.

I’d imagine the easiest rout would be to read the FSL generated json file into Matlab and then write it into an Osprey compatible .mat file.

The key bits of the FSL .json are the fields basis_real, basis_imag and basis_dwell.

@admin or @Helge , is there a specification for what needs to be in an Osprey .mat file?

We don’t have a written-out specification, but we probably should at some point.

Do you have a convenient way of converting FSL-generated JSON basis sets into LCModel-type .BASIS files? Osprey can definitely use those.

Hi @wclarke, hi @admin,

thanks a lot for your helpful replies! I’ll try reading the FSL-generated JSON and re-writing it into an Osprey-compatible .mat file. From what I can tell from other metabolite .mat files I’ve imported into Osprey and from looking at fit_makeBasis, the file should probably follow a FID-A style structure - i.e., real and imaginary parts combined into complex numbers.

A written-out specification of the .mat format would be very useful. For now, I’ll just orient myself on what fit_makeBasis is reading and on the FID-A structures.

From what I understand (please correct me if I’m wrong), there isn’t a straightforward way of converting FSL-generated JSON files into LCModel .BASIS sets. I also considered using the FSL-MRS .RAW files to build an LCModel-style set, but abandoned this because (as far as I can tell) FSL-MRS doesn’t have a function to subtract the ON/OFF raw files, and the .RAW format also differs from LCModel.

It feels surprisingly difficult to get a working basis set for the CMRR MEGA-sLASER 3T sequence.

Thanks again for the guidance! At the moment I need to focus on a manuscript revision, but once I have time for the conversion script, I’ll share any progress here.

In the meantime, would it be possible to share a minimal Osprey-compatible .mat example (for one metabolite)? That would make writing a conversion script much easier.