I am currently using FSL-MRS to quantify simulated spectra as part of my masters thesis. I used FID-A to simulate the basis spectra and the output consists of several .RAW files.
I am now trying to use
basis_tools convert to convert the folder containing the .RAW files into the json format that FSL expects it to be in. I have however run into a problem, and was hoping you could give me some advice.
Here is the error message I am getting:
Traceback (most recent call last): File "/Users/miniconda3/envs/Master_Thesis_Experiment/bin/basis_tools", line 10, in <module> sys.exit(main()) File "/Users/miniconda3/envs/Master_Thesis_Experiment/lib/python3.10/site-packages/fsl_mrs/scripts/basis_tools.py", line 224, in main args.func(args) File "/Users/miniconda3/envs/Master_Thesis_Experiment/lib/python3.10/site-packages/fsl_mrs/scripts/basis_tools.py", line 268, in convert basis_tools.convert_lcm_raw_basis( File "/Users/miniconda3/envs/Master_Thesis_Experiment/lib/python3.10/site-packages/fsl_mrs/utils/basis_tools.py", line 80, in convert_lcm_raw_basis basis = Basis(basis_array, names, [header, ] * len(names)) File "/Users/miniconda3/envs/Master_Thesis_Experiment/lib/python3.10/site-packages/fsl_mrs/core/basis.py", line 74, in __init__ self._dt = headers['dwelltime'] IndexError: list index out of range
I assume that the list of dict [header, ] in
convert_lcm_raw_basis is empty and thus trying to access the 0th element of this empty list ends up throwing the index out of range error. Any idea as how to how I could fix this? I will try digging a bit deeper using the debugger to see if I can figure out why this list is empty.
Thanks a lot, and I look forward to hearing from you.