src.original.fitting.DT_IIITN package
Submodules
src.original.fitting.DT_IIITN.wls_ivim_fitting module
Weighted Least Squares (WLS) / Robust Linear Model (RLM) IVIM fitting.
Author: Devguru Tiwari, IIIT Nagpur Date: 2026-03-01
Implements a segmented approach for IVIM parameter estimation: 1. Estimate D from high b-values using weighted/robust linear regression on log-signal 2. Estimate f from the intercept of the Step 1 fit 3. Estimate D* from residuals at low b-values using weighted/robust linear regression
Two regression methods are available: - WLS: Weighted Linear Least Squares with Veraart weights (w = S^2) - RLM: Robust Linear Model using Huber’s T norm (statsmodels)
- Reference:
Veraart, J. et al. (2013). “Weighted linear least squares estimation of diffusion MRI parameters: strengths, limitations, and pitfalls.” NeuroImage, 81, 335-346. DOI: 10.1016/j.neuroimage.2013.05.028
- Requirements:
numpy statsmodels (only for method=”RLM”)
- src.original.fitting.DT_IIITN.wls_ivim_fitting.wls_ivim_fit(bvalues, signal, cutoff=200, method='WLS')[source]
IVIM fit using WLS or RLM (segmented approach).
Step 1: Fit D from high b-values on log-signal. Step 2: Fit D* from residuals at low b-values.
- Args:
bvalues (array-like): 1D array of b-values (s/mm²). signal (array-like): 1D array of signal intensities (will be normalized). cutoff (float): b-value threshold separating D from D* fitting.
Default: 200 s/mm².
- method (str): Regression method to use.
“WLS”: Weighted Least Squares with Veraart S² weights (default).
“RLM”: Robust Linear Model with Huber’s T norm (statsmodels).
- Returns:
- tuple: (D, f, Dp) where
D (float): True diffusion coefficient (mm²/s). f (float): Perfusion fraction (0-1). Dp (float): Pseudo-diffusion coefficient (mm²/s).