mrphy.beffective
B-effective related functions
- mrphy.beffective.beff2ab(beff: Tensor, *, E1: Tensor = tensor(0.), E2: Tensor = tensor(0.), γ: Tensor = tensor(4257.6000, dtype=torch.float64), dt: Tensor = tensor(4.0000e-06, dtype=torch.float64)) Tuple[Tensor, Tensor]
Compute Hargreave’s 𝐴/𝐵, mat/vec, from B-effectives
See: doi:10.1002/mrm.1170.
- Usage:
A, B = beff2ab(beff, *, E1, E2, γ, dt)
- Inputs:
beff
: (N,*Nd,nT,xyz), B-effective.
- Optionals:
T1
: () ⊻ (N ⊻ 1, *Nd ⊻ 1,), “Sec”, T1 relaxation.T2
: () ⊻ (N ⊻ 1, *Nd ⊻ 1,), “Sec”, T2 relaxation.γ
: () ⊻ (N ⊻ 1, *Nd ⊻ 1,), “Hz/Gauss”, gyro ratio.dt
: () ⊻ (N ⊻ 1,), “Sec”, dwell time.
- Outputs:
A
: (N, *Nd, xyz, 3), A[:,iM,:,:], is the iM-th 𝐴.B
: (N, *Nd, xyz), B[:,iM,:], is the iM-th 𝐵.
- mrphy.beffective.beff2uφ(beff: Tensor, γ2πdt: Tensor, *, dim=-1) Tuple[Tensor, Tensor]
Compute rotation axes and angles from B-effectives
- Usage:
U, Φ = beff2uϕ(beff, γ2πdt, *, dim)
- Inputs:
beff
: (N, *Nd, xyz), “Gauss”, B-effective, magnetic field applied on M.γ2πdt
: () ⊻ (N ⊻ 1, *Nd ⊻ 1,), “rad/Gauss”, gyro ratio in radiance mutiplied by dt.
- Optionals:
dim
: int. Indicate the xyz-dim, allow beff.shape != (N, *Nd, xyz)
- Outputs:
U
: (N, *Nd, xyz), rotation axisΦ
: (N, *Nd), rotation angle
- mrphy.beffective.rfgr2beff(rf: Tensor, gr: Tensor, loc: Tensor, *, Δf: Tensor | None = None, b1Map: Tensor | None = None, γ: Tensor = tensor(4257.6000, dtype=torch.float64)) Tensor
Compute B-effectives from rf and gradients
- Usage:
beff = rfgr2beff(rf, gr, loc, *, Δf, b1Map, γ)
- Inputs:
rf
: (N,xy,nT,(nCoils)), “Gauss”, xy for separating real and imag part.gr
: (N,xyz,nT), “Gauss/cm”.loc
: (N,*Nd,xyz), “cm”, locations.
- Optionals:
Δf
: (N,*Nd,), “Hz”, off-resonance.b1Map
: (N, *Nd, xy (, nCoils), a.u., transmit sensitivity.γ
: () ⊻ (N ⊻ 1, *Nd ⊻ 1,), “Hz/Gauss”, gyro ratio.
- Outputs:
beff
: (N,*Nd,nT,xyz), “Gauss”