Define inhomogeneous Field in optimal control

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

Define inhomogeneous Field in optimal control

Post by Mengjia He »

Hello, I have a problem regards fixing field value in optimal control.

When I define the inhomogeneous Field using "control.pwr_levels'', does this parameter just give relative value of inhomogeneity, since ''control.amplitudes'' will determinate its exact value.
kuprov
Posts: 123
Joined: Mon Mar 29, 2021 4:26 pm

Re: Define inhomogeneous Field in optimal control

Post by kuprov »

control.pwr_levels is an overall multiplier on top of control.amplitudes - the latter is waveform amplitude profile in each individual member of the ensemble (I would recommend scaling it into [0,1]), but the former defines the ensemble.
Mengjia He
Posts: 16
Joined: Thu Jan 20, 2022 8:28 am

Re: Define inhomogeneous Field in optimal control

Post by Mengjia He »

I understand, thank you very much.
Mengjia He
Posts: 16
Joined: Thu Jan 20, 2022 8:28 am

Re: Define inhomogeneous Field in optimal control

Post by Mengjia He »

Another question for fixing inhomogeneous B0 Field: if every part of ensemble feels B0 field which has an offset to the defined "sys.magnet''.

An idea is to set a distributed chemical shift by drift Hamiltonian, so if I divide the sample into over 100 voxels, then the size of drift Hamiltonian will be more than 100*1, I don't know if its appropriate, maybe this operation greatly increase the simulation time?
kuprov
Posts: 123
Joined: Mon Mar 29, 2021 4:26 pm

Re: Define inhomogeneous Field in optimal control

Post by kuprov »

You can specify arrays of drift Liouvillians in control.drift - just make an array with different B0 offset. Of course it would increase the simulation time, but Spinach would automatically parallelise that calculation, so use a big computer or a cluster!
Mengjia He
Posts: 16
Joined: Thu Jan 20, 2022 8:28 am

Re: Define inhomogeneous Field in optimal control

Post by Mengjia He »

Tnanks for you reply.

Using the optimized pulse to simulate the NMR fid signal and spectrum, I also have to face the B0 and B1 inhomogeneity problem, do you have any idea to handle this in Spinach, like set '' control.pwr_levels'' and '' control.drift'' in the optimal control module.
kuprov
Posts: 123
Joined: Mon Mar 29, 2021 4:26 pm

Re: Define inhomogeneous Field in optimal control

Post by kuprov »

Same story - use an ensemble of drift Hamiltonians in control.drift AND and ensemble of scaling factors in control.pwr_levels; Spinach will automatically take a direct product of these two sets (i.e. if you have N drifts and K power levels, that means N*K calculations), so the simulation might get rather long. But it will do it.
Mengjia He
Posts: 16
Joined: Thu Jan 20, 2022 8:28 am

Re: Define inhomogeneous Field in optimal control

Post by Mengjia He »

kuprov wrote: Thu Jan 20, 2022 4:49 pm Same story - use an ensemble of drift Hamiltonians in control.drift AND and ensemble of scaling factors in control.pwr_levels; Spinach will automatically take a direct product of these two sets (i.e. if you have N drifts and K power levels, that means N*K calculations), so the simulation might get rather long. But it will do it.
Your reply reminds me a crucial problem in my simulation.

I do not want include distribution like powder average in my simulation. Here we use control.drifts to define inhomogeneous B0 field, and use control.pwr_levels to define inhomogeneous B1 field, they both depend on the spatial position. I have divide the sample into N voxels, each voxel has a single drift and a single power level, so I might just need N calculations. So the above fixing will cause misconception and unnecessary calculation in Spinach?
kuprov
Posts: 123
Joined: Mon Mar 29, 2021 4:26 pm

Re: Define inhomogeneous Field in optimal control

Post by kuprov »

In principle, we have this covered, this is called a correlated ensemble.

https://spindynamics.org/wiki/index.php ... iderations

I can quite quickly implement an option wherein you would have drift-power correlation, that is, each specified drift generator would have its corresponding specified power. Is that what you need?
Mengjia He
Posts: 16
Joined: Thu Jan 20, 2022 8:28 am

Re: Define inhomogeneous Field in optimal control

Post by Mengjia He »

Yes, exactly. Thank you very much for you effort.

And please just tell me when this implement can work. :D
Post Reply