Model-based command routing#
bartorch moba ... and bartorch mobafit ... run as the apps
moba() and mobafit() when the
command line reads into an app call exactly, and as BART’s command otherwise.
cli.route makes the decision after reading the input arrays; the adapters
are _moba and _mobafit in src/bartorch/cli/_apps.py. An adapter raises
Unsupported for any argument it does not translate, so an argument is never
ignored: the whole command line goes to the command.
Agreement with the command#
The apps fit BlochSim’s models in BlochSim’s bounded parameterisation and
reach the minimum the command reaches by a different path, so they agree with
the command to the tolerance of a fit rather than to the bit. The adapters
convert the named maps back into BART’s coefficients: rates in 1/s from times
in ms, the same stacking along COEFF_DIM, and the data scaling the command
applies (--scale_data, --normalize_scaling, --scale_psf; under -G the
coil images scaled to a norm of a hundred). The tolerances are held in
tests/test_cli.py.
With the coils estimated, only the product of the amplitude and the coils is determined by the data; the two routes split it by a smooth factor, so the tests compare the product.
Models routed to the app#
Command |
Flags |
App model |
|---|---|---|
|
|
Multi-echo decay, inversion recovery, Look-Locker recovery, water and fat, diffusion decay, Lorentzian lines |
|
|
Multi-echo decay, Look-Locker recovery |
|
|
Look-Locker model in the flip angle, B1 under a Sobolev weighting |
|
|
Water and fat over the coil images, B0 under a Sobolev weighting |
|
|
Inversion recovery of a multi-echo gradient-echo train |
|
|
BlochSim FLASH or IR-FLASH simulation in |
Command lines sent to BART#
Argument |
Reason |
|---|---|
|
Counts Gauss-Newton steps over BART’s own scaled coefficients; a bounded parameterisation needs more, so the count does not translate into the app’s |
|
Counts FISTA iterations, or under |
|
A wavelet term on the maps, which the app does not carry |
|
Separate water and fat decays, which the bounded fit does not separate |
Any other |
A model on another layout, which the app does not have |
|
The proximal iteration |
|
No app counterpart, no neutral start, a value outside the bounds, a preconditioning, an output the app does not compute |
|
A train or a held parameter the app does not play; a B1 map beside a held B1 is taken |
A trajectory ( |
The adapters read Cartesian k-space only |
An input the reader cannot load, or an array with more dimensions than BART has |
The command reports it |
A missing input file is reported before either route runs (cli._missing),
so the message is the same whichever route would have served the command.