Simulartion with inhomogeneous Field

Topics related to Spinach package
Post Reply
Mengjia He
Posts: 16
Joined: Thu Jan 20, 2022 8:28 am

Simulartion with inhomogeneous Field

Post by Mengjia He »

Hi, Prof. Kuprov,

Here is a question regards proccessing inhomogeneous B0 within the liquid NMR simulation.

A direct way is updating the 'spin_system.inter.zeeman.matrix' and running the simulation for each voxel, like the script below. But it will cause long program in multiple spins case.

So I want to ask if there is any interface in Spinach, that I can define the spin_system quickly.

Thank you.
Mengjia
Attachments
screen1.PNG
screen1.PNG (77.17 KiB) Viewed 941 times
kuprov
Posts: 125
Joined: Mon Mar 29, 2021 4:26 pm

Re: Simulartion with inhomogeneous Field

Post by kuprov »

I would recommend setting the magnetic field to 1 Tesla in the sys.magnet, and then requesting separately the Zeeman part and the coupling part of the Hamiltonian by using the retention options described here:

https://spindynamics.org/wiki/index.php?title=Assume.m

that way you only need to build the Hamiltonians once. Then combine them into H=Hc+B*Hz where B is your actual field in Tesla. Then use that to run the simulation of your choice with that Hamiltonian.

For integrating over the field distribution, I recommend the Gauss-Legendre quadrature:

https://spindynamics.org/wiki/index.php ... Gaussleg.m
Mengjia He
Posts: 16
Joined: Thu Jan 20, 2022 8:28 am

Re: Simulartion with inhomogeneous Field

Post by Mengjia He »

Sounds nice way, I would try.
Post Reply