initialize_mt_sat#
- torchsim.epg.initialize_mt_sat(duration, b1rms, df=0.0, slice_prof=1.0, B1=1.0)[source]#
Calculate RF energy deposition.
This is the energy deposited by and RF pulse on a bound pool, i.e., a spin pool without transverse magnetization (e.g., T2 almost 0.0).
- Parameters:
duration (float) – Pulse duration in
[s]
.b1rms (float) – Pulse root-mean-squared B1 in
[T]
for each transmit channel. Expected shape is(nchannels,)
.df (float) – Frequency offset of the pulse in
[Hz]
.slice_prof (float | torch.Tensor, optional) – Flip angle profile along slice. The default is
1.0
.B1 (float, optional) – Flip angle scaling factor. The default is
1.0
.
- Returns:
WT – Energy yielded by the RF pulse.
- Return type:
torch.Tensor
Notes
When flip angle is constant throughout acquisition, user should use the output
exp_WT
. When flip angle changes (e.g., MR Fingerprinting), user should provide theb1rms
for a normalized pulse (i.e., whenfa=1.0 [rad]
). Then, user rescale the outputWT
by the square of current flip angle, and use this to re-calculateexp_WT
. This can be achieved using the providedscale_mt_sat
function.Examples
import torch from torchsim.epg import initialize_mt_sat, mt_sat_op
Constant flip angle case. We will use a pulse duration of 1ms and define B1rms so that the b1rms * tau is 32.7 uT**2 * ms.
duration = 1e-3 # 1ms pulse duration b1rms = 1e-6 * (32.7**0.5) / 1e-3 # B1 rms in [T] df = 0.0 # assume on-resonance pulse
In this case, we can directly use the
exp(WT)
output.WT = initialize_mt_sat(torch.as_tensor(duration), torch.as_tensor(b1rms), df, slice_prof=1.0, B1=1.0) S = mt_sat_op(WT)
Variable flip angle case. We will use a pulse duration of 1ms and define B1rms so that the b1rms * tau is 54.3 uT**2 * ms when fa = 1 rad.
duration = 1e-3 # 1ms pulse duration b1rms = 1e-6 * (54.3**0.5) / 1e-3 # B1 rms in [T] df = 0.0 # assume on-resonance pulse
In this case, we use the exponential argument only:
WT = initialize_mt_sat(torch.as_tensor(duration), torch.as_tensor(b1rms), df)
Then, for each RF pulse of in the train, we rescale
WT
and recompute the exponential. Here, we do it explicitly:fa = torch.linspace(5, 60.0, 1000) fa = torch.deg2rad(fa) for n in range(fa.shape[0]): # update saturation operator S = mt_sat_op(WT, fa[n], slice_prof=1.0, B1=1.0) # apply saturation here ...