Hello,
i have two questions about the the optimal control module:
Is it possible to set Lz=0 as target state (or alternatively any combination of Lx/Ly), e.g. if i want to optimize a pulse that moves a spin 1/2 nucleus from +Z to the X/Y plane and i dont care about the phase?
For an excitation pulse that with initial state Lz and target state -Ly, i would like to penalize resulting Lx magnetization more strongly than residual Lz. Right now Spinach only optimizes the amount -Ly, but for an excitation pulse resulting Lx magnetiation is less desirable compared to residual Lz. Lx magnetization will lead to phase distortions, wherease residual Lz will just reduce signal intensity. This can be pretty severe, e.g. 0.99 -Ly can still have a phase error of ~8 degree, if the rest of the magnetization is in Lx.
Thanks a lot in advance.
Best,
Philip
Optimal Control Questions
Re: Optimal Control Questions
Of course - see the "features_multitarget" example file: you can specify which multiple initial conditions should be sent to which destination states. Assign different multipliers to source-target pairs to regulate their relative importance.
For complicated and highly customized penalties, you can make your own error functional from combinations of grape_xy, grape_phase, etc. outputs. Note that fminnewton expects a function handle, and you can of course provide a handle to some other function of your choosing. So long as the order of inputs and outputs is the same as in standard Spinach functions, it would work.
For complicated and highly customized penalties, you can make your own error functional from combinations of grape_xy, grape_phase, etc. outputs. Note that fminnewton expects a function handle, and you can of course provide a handle to some other function of your choosing. So long as the order of inputs and outputs is the same as in standard Spinach functions, it would work.
Re: Optimal Control Questions
Dear Ilya,
thanks a lot for you reply. I am sorry, i tried, but i could not figure out which source-target pairs to use in order to obtain a shape that brings the system from +Z to the X/Y-plane. Or is this a task, where i would have to come up with my own error function?
Best,
Philip
thanks a lot for you reply. I am sorry, i tried, but i could not figure out which source-target pairs to use in order to obtain a shape that brings the system from +Z to the X/Y-plane. Or is this a task, where i would have to come up with my own error function?
Best,
Philip
Re: Optimal Control Questions
Simple trigonometry, really. I would suggest the following source states:
{Lz, Lz}
and the following target states
{Lx, Ly}
with a squared overlap fidelity function (control.fidelity='square'). In this way, whichever direction in the XY plane magnetisation points in, that would be an equivalent maximum of that fidelity.
{Lz, Lz}
and the following target states
{Lx, Ly}
with a squared overlap fidelity function (control.fidelity='square'). In this way, whichever direction in the XY plane magnetisation points in, that would be an equivalent maximum of that fidelity.