states_matrix#
- torchsim.epg.states_matrix(device, nstates, nlocs=1, ntrans_pools=1, nlong_pools=1, weight=1.0)[source]#
Generate EPG states matrix.
- Parameters:
device (torch.device) – Computational device.
nstates (int) – Numer of EPG states.
nlocs (int, optional) – Number of spatial locations. The default is 1.
ntrans_pools (int, optional) – Number of pools for transverse magnetization. The default is 1.
nlong_pools (int, optional) – Number of pools for longitudinal magnetization. The default is 1.
weight (float | npt.ArrayLike, optional) – Fractional weight for the different pools of shape
(nlong_pools,)
. The default is1.0
.
- Returns:
states –
EPG states matrix of with fields:
Fplus: transverse F+ states of shape (nstates, nlocs, ntrans_pools)
Fminus: transverse F- states of shape (nstates, nlocs, ntrans_pools)
Z: longitudinal Z states of shape (nstates, nlocs, nlong_pools)
- Return type:
SimpleNamespace