Skip to main content

Module admm

Module admm 

Source
Expand description

Shared ADMM iteration infrastructure for TV-based inversion methods.

Provides pre-allocated buffers and a generic iteration step used by TV-ADMM, NLTV, and RTS algorithms.

Structs§

AdmmBuffers
Pre-allocated buffers for ADMM-based inversion algorithms.

Enums§

FansiKernel
The dipole kernel a FANSI-family solver (NDI, nlTV, nlTGV, L1-QSM, WH-QSM, HD-QSM) uses.

Functions§

admm_step
Run one ADMM iteration step.
fansi_dipole_kernel
FANSI’s discrete dipole kernel, dipole_kernel_angulated(N, spatial_res, B0_dir) with its default mode = 1 (FANSI-toolbox 93044a3):
fansi_magnitude_weight
FANSI’s data weight from the magnitude, as in its in vivo example (script_invivo.m): min(2*mask*mag/max(mag), 1).
fansi_ppm_to_rad
ppm -> radians factor 2*pi*gamma*b0*te (gamma = GAMMA_BAR_MHZ_PER_T), for the FANSI solvers, which work on the phase in radians while the crate’s inversions take ppm. FANSI’s scripts use gyro = 2*pi*42.58; QSM.rs uses the shared constant, which is closer to the CODATA shielded-proton value (see crate::constants).
fansi_unit_ee2
FANSI’s EE2 = |E1|^2 + |E2|^2 + |E3|^2 with E_j = 1 - exp(2*pi*i*k_j/N_j): the spectral Laplacian of unit-spacing forward differences, as FANSI’s nlTV.m, nlTGV.m and nlL1TV.m build it (whatever the voxel size). Pair it with fgrad_inplace/bdiv_inplace on a unit-voxel grid. FFT order, i + nx*(j + ny*k).
prepare_admm_spectral
Pre-compute ADMM spectral operators (dipole kernel, inverse operator, and RHS).
prepare_fansi_kernel
[Fft3dWorkspace] and the FANSI-family dipole kernel kernel selects (see FansiKernel).
prepare_fansi_spectral
Pre-compute the continuous-kernel spectral operators of the nonlinear solvers that are not FANSI’s (QSM.jl’s NLTV, AMP-PE). The FANSI-family ports take their kernel from prepare_fansi_kernel instead.