pub struct AmpPeParams {Show 14 fields
pub wave_order: usize,
pub nlevel: usize,
pub wave_pec: f64,
pub simulated_te: f64,
pub max_linearization_ite: usize,
pub b0: f64,
pub gyro_ratio: f64,
pub damp_rate_sig: f64,
pub damp_rate_par: f64,
pub max_pe_spar_ite: usize,
pub max_pe_est_ite: usize,
pub cvg_thd: f64,
pub tikhonov_beta: f64,
pub normalize_weight: bool,
}Expand description
Parameters for the AMP-PE inversion.
Fields§
§wave_order: usizeDaubechies wavelet order: 1 (db1, best for straight B0) or 2 (db2).
nlevel: usizeWavelet decomposition levels.
wave_pec: f64Morphology-mask retention fraction (cumulative-energy threshold).
simulated_te: f64Simulated echo time (s) used to turn the field into phase.
max_linearization_ite: usizeLinearization iterations for each of the two stages.
b0: f64Field strength (Tesla).
gyro_ratio: f64Gyromagnetic ratio (MHz/T); default 42.58, the reference implementation’s value, not
crate::constants. Keep it.
damp_rate_sig: f64Damping rate for the GAMP signal updates (damp_rate).
damp_rate_par: f64Learning rate for parameter estimation (kappa).
max_pe_spar_ite: usizeInner sparse-reconstruction iterations per GAMP call.
max_pe_est_ite: usizeInner parameter-estimation iterations per GAMP call.
cvg_thd: f64Convergence threshold for the GAMP inner loop.
tikhonov_beta: f64Tikhonov regularization weight for the L2 seed (chiL2).
normalize_weight: boolRescale the magnitude weight to unit mean inside the mask. Off by default: upstream
(qsm_multi_echo_combined.m) weights by the magnitude as it is; the QSM-CI wrapper
normalises it.
Implementations§
Source§impl AmpPeParams
impl AmpPeParams
Sourcepub fn validate(&self) -> Result<(), InputError>
pub fn validate(&self) -> Result<(), InputError>
Checks the parameters AMP-PE cannot run with: wave_order must be a supported
Daubechies order (SUPPORTED_ORDERS, 1–4) and
nlevel at most MAX_NLEVEL, since the grid is padded to a multiple of 2^nlevel.
amp_pe also refuses an nlevel whose padded grid would not fit in memory’s address
range.
Trait Implementations§
Source§impl Clone for AmpPeParams
impl Clone for AmpPeParams
Source§fn clone(&self) -> AmpPeParams
fn clone(&self) -> AmpPeParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AmpPeParams
impl Debug for AmpPeParams
Source§impl Default for AmpPeParams
impl Default for AmpPeParams
Auto Trait Implementations§
impl Freeze for AmpPeParams
impl RefUnwindSafe for AmpPeParams
impl Send for AmpPeParams
impl Sync for AmpPeParams
impl Unpin for AmpPeParams
impl UnsafeUnpin for AmpPeParams
impl UnwindSafe for AmpPeParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more