Generating spin system json files for basis set simulation using FSL-MRS

Hi all!

I was wondering if FSL-MRS has any functions to generate spin system json files for basis set simulations?

If there isn’t one, can you help me in creating it? I’ve never worked with json files before and not familiar about what I need to put in for making spin systems.

Looking forward to hear your thoughts.
Have a lovely day!

All the best,
Hande

Hi @handehio ,

What sequence / parameters are you trying to generate a basis set for? There are many spin systems already baked-in to FSL-MRS that you can possibly use.

BW

Will

Hi @wclarke,

Thank your for your quick response.

I’m actually trying to simulate 31P metabolites :smiling_face:. And my sequence is a pulse acquire sequence with some delay before the read out.

And I was thinking if it would be possible to keep processing pipeline in FSL-MRS.

Thanks!

Best,
Hande

Hi @handehio ,

You can crib from two places:

  1. The main spin system description on the simulator. This has some quite complex spin systems described, but also some very simple ones. E.g.
"sysAce": {
		"j": [[0]],
		"shifts":[1.904],
		"name": "Ace",
		"scaleFactor": 3
	},

  1. I have this little example for some edited MM which is a much smaller spin system
{"sysMM":[ {
		"j": [[0, 0.0, 0.0, 7.7],
              [0, 0.0, 0.0, 7.7],
              [0, 0.0, 0.0, 7.7],
              [0, 0.0, 0.0, 0.0]
             ],
		"shifts":[0.94,
                  0.94,
                  0.94,
                  2.05],
		"name": "Val",
		"scaleFactor": 1
	},
    {
		"j": [[0.0, -10.0, 6.0, 10.0],
              [0.0, 0.0, 8.0, 6.5],
              [0.0, 0.0, 0.0, -12.0],
              [0.0, 0.0, 0.0, 0.0]
             ],
		"shifts":[3.01,
                  3.01,
                  1.71,
                  1.71],
		"name": "Lys",
		"scaleFactor": 1
	}  
        ]
}

JSON is a very simple ASCII / human readbale format described at json.org. For each system you need to give it a name, define the chemical shift and any scalar (j) coupling in one set of off-diagonals in a matrix. The scalefactor key stores a value that says if there are more than one nucleus contributing to a signal. E.g. a CH3 group could be defined as a single chemical shift with a scale factor of three.

Let me know if you need any more help.

Will

Hi @wclarke!

Thank you so much for your excellent suggestion. This will help me a lot. I wa just wondering if you can talk about what corresponds to the rows and columns of j and shifts matrices. (I haven’t done spin system things and wanted to make sure). Thank you so much in advance!

Best,
Hande