binding
binding
¶
T1 mapping binding adapters for the shared fitting infrastructure.
BoundSPGRModel and BoundLookLockerModel wrap the corresponding
signal models together with their fixed independent variables (flip
angles / TR, inversion times), producing FittableModel instances
that the shared LevenbergMarquardtFitter can use.
Both provide analytical Jacobians for efficient convergence.
BoundSPGRModel
¶
Bases: BaseBoundModel
SPGR model with flip angles and TR bound.
Wraps an SPGRSignalModel so the fitter only sees
free parameters [T1, M0].
| PARAMETER | DESCRIPTION |
|---|---|
model
|
SPGR signal model.
TYPE:
|
flip_angles_rad
|
Flip angles in radians.
TYPE:
|
tr
|
Repetition time in milliseconds.
TYPE:
|
fixed
|
Parameters to fix at constant values during fitting.
TYPE:
|
predict_array_batch
¶
Predict SPGR signal for a batch of voxels.
| PARAMETER | DESCRIPTION |
|---|---|
free_params_batch
|
Free parameter values, shape
TYPE:
|
xp
|
Array module.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
NDArray
|
Predicted signal, shape |
get_initial_guess_batch
¶
Get initial parameter guesses from data.
Uses T1=1000 ms and M0=2*max(signal) as defaults.
| PARAMETER | DESCRIPTION |
|---|---|
observed_batch
|
Observed data, shape
TYPE:
|
xp
|
Array module.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
NDArray
|
Initial guesses, shape |
compute_jacobian_batch
¶
Compute analytical Jacobian for SPGR model.
| PARAMETER | DESCRIPTION |
|---|---|
params_batch
|
Free parameter values, shape
TYPE:
|
_predicted
|
Predicted signal (unused, Jacobian computed from params).
TYPE:
|
xp
|
Array module.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
NDArray
|
Jacobian, shape |
BoundLookLockerModel
¶
Bases: BaseBoundModel
Look-Locker model with inversion times bound.
Wraps a LookLockerSignalModel so the fitter only sees
free parameters [T1_star, A, B].
| PARAMETER | DESCRIPTION |
|---|---|
model
|
Look-Locker signal model.
TYPE:
|
ti_times
|
Inversion times in milliseconds.
TYPE:
|
fixed
|
Parameters to fix at constant values during fitting.
TYPE:
|
predict_array_batch
¶
Predict Look-Locker signal for a batch of voxels.
S(TI) = A - B * exp(-TI / T1*)
| PARAMETER | DESCRIPTION |
|---|---|
free_params_batch
|
Free parameter values, shape
TYPE:
|
xp
|
Array module.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
NDArray
|
Predicted signal, shape |
get_initial_guess_batch
¶
Get initial parameter guesses from data.
Uses T1*=median(TI), A=max(S), B=max(S)+min(S).
| PARAMETER | DESCRIPTION |
|---|---|
observed_batch
|
Observed data, shape
TYPE:
|
xp
|
Array module.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
NDArray
|
Initial guesses, shape |
compute_jacobian_batch
¶
Compute analytical Jacobian for Look-Locker model.
| PARAMETER | DESCRIPTION |
|---|---|
params_batch
|
Free parameter values, shape
TYPE:
|
_predicted
|
Predicted signal (unused, Jacobian computed from params).
TYPE:
|
xp
|
Array module.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
NDArray
|
Jacobian, shape |