Incorrect fitting / macromolecule basis set missing (Siemens 3T)

Dear community
I am trying to do SVS and want to kindly ask for availability of macromolecules basis set (.json or .raw)

I used the following source to get basis sets for metabolites https://juchem.bme.columbia.edu/content/mr-spectroscopy-basis-sets
however, here there are no sets for macromolecules.
Please see the images (basis and report’s screenshot) and pdf report attached:
Thanks in advance

report.pdf (146.1 KB)
Basis spectre

@Sipan

Looking at the report something seems wrong with the basis set bandwidth. What did you set it to when converting?

I set bandwidth = 2500 and field strength = 2.89T

basis_tools convert /Users/nyuad/Desktop/raw /Users/nyuad/Desktop/Data/basis --bandwidth 2500 --fieldstrength 2.89

dear @wclarke
Should I have used this "spectometer frequency: 123.238831 MHZ?
I have attached the screenshot of data

Just double check you didn’t accidentally use the 4000 hz bw basis available from the same website

I used 2500 one from the website
What about the macromolecules basis set? Is their absence responsible for bad fitting?
Thanks

Ok thanks for checking. The other thing that could be wrong is your data bandwidth. How did you convert your data? Do you have the protocol from the scanner?

Thanks dear @wclarke for your reply
I converted the data using the following command from the practical (using my own directory)
spec2nii twix -e image -f steam_metab_raw -o data meas_MID310_STEAM_metab_FID115673.dat

Please see the attached images of visualizations of both files (water suppressed/ not suppressed)
No_water_visualization
Water_siuppression_visualization

Another thing I wanted to ask is that in my report I see that my basis is shifted towards left, instead of being from 0-4.5ppm range its in 3.5-4.5ppm range
I suspect this being the reason of poor fitting on the right side. Please see the image attached.

I greatly appreciate your help, thanks!

Yes that shift and scaling is what I’m trying to figure out. It’s odd. Please could you send me the basis and an example bit of data?

zip.zip (953.6 KB)
Dear @wclarke I zipped the files in order to upload, hope it would be visible

Hi @Sipan ,

The data you’ve tried to use for fitting (./fsl_mrs_proc/metab.nii.gz) is from a 7T scanner. Is this the example data? Your own data (I presume zip/svs_se_30_single_average/svs_se_30_ecc_file.nii.gz), measured at 2.89T does fit.

I had to do two things to make it work. 1) pad the basis set with zeros as the number of time points it covers is very short, and 2) set the baseline_order fit setting to 12 (which is high), to cope with the large artifactual lipid peak on the right of the spectrum.

Is this artefact something you see in lots of your data?

I padded the basis by doing the following

from fsl_mrs.utils import mrs_io
import numpy as np

basis = mrs_io.read_basis('basis')
basis._raw_fids = np.pad(basis.original_basis_array,((0, 2048), (0,0)))
basis.save('basis_pad')

This isn’t ideal as it leaves a small step in the time domain, causing ripple in the spectral domain.

Dear @wclarke
Thank you so much for your help!
yes I metab.nii.gz from the data from FSL practical which, as you said is 7T

I want to ask, did you used another metab.gii.nz? is there a such file available for 3T scanner or how can I generate it for my scanner?

and the code you shared for padding I can use it in terminal yes?
Thanks

[quote=“wclarke, post:11, topic:2264”]
2) set the baseline_order fit setting to 12 (which is high)

and I would appreciate if you could identify how this was done? is there a code for it to run on terminal? or a setting to change?
thanks

metab.nii.gz should be replaced by your data!

I’ts a command line option for fsl_mrs

–baseline_order 12

so I can just use this command? (or I should write --baseline_order=12?)

Dear @wclarke
I have changed my metab.nii.gz accordingly no its spectrometer frequency is 123,.238832 MHz and Field strength is 2.89T

however, when I try to do the fitting, I see this error
The basis spectra covers too little time. Please reduce the dwelltime, number of points or pad this basis.

I tried to implement your code for padding but it did not worked on command line
can you please, indicate how can I do padding a solve this issue
Thanks

Dear @wclarke
I would greatly appreciate your help for using the code you provided. How can I run it? Should I install python to run it?
Thanks

No run it in a python terminal-session/script/notebook (your choice)

Dear @wclarke
Thank you for your guidance, however I was not able to implement the padding due to not being able to install fsl-mrs numpy. I tried both on my default windows cmd and WSL linux, however for both of them I got the same error.

I would greatly appreciate your help!