Skip to main content

Module constants

Module constants 

Source
Expand description

Physical constants (gyromagnetic ratio). Physical constants shared across the crate.

Use these wherever QSM.rs converts between radians, Hz and ppm itself, and wherever a host converts QSM.rs’s outputs (e.g. ppm → Hz for a BIDS fieldmap), so both agree.

Ported methods that hard-code a different value in their authors’ code (DECOMPOSE’s 42.58, TGV-QSM’s 42.5781, HEIDI’s 2.67522128e8 rad/s/T, QSMART’s 2.675e8, …) keep that value locally, so the port matches the reference. Those sites say so; do not point them here.

Constants§

GAMMA_BAR_HZ_PER_T
Proton reduced gyromagnetic ratio γ̄ = γ/2π, in Hz/T.
GAMMA_BAR_MHZ_PER_T
GAMMA_BAR_HZ_PER_T in MHz/T, for formulas written as 2π · γ̄[MHz/T] · B0 · TE (ppm → rad).
GAMMA_RAD_PER_S_PER_T
Proton gyromagnetic ratio γ = 2π·γ̄, in rad/s/T.