bartorch.nlop.Bloch

Contents

bartorch.nlop.Bloch#

bartorch.nlop.Bloch(acquisition, *unknown, shape=(), bounds=None, amplitude=True, subspace=None, contrasts=None, **scale)#

Any TorchSim sequence as a model operator: moba --bloch’s family.

moba --bloch fits a Bloch simulation of the sequence rather than a closed form, which is what makes it work for sequences that have none. This is the same idea with TorchSim doing the simulating: an FSE train, a fingerprinting schedule, a bSSFP sweep, a sequence of your own – anything with a simulate – becomes an operator BART’s Gauss-Newton solves.

Parameters:
  • acquisition (torchsim Simulator) – The sequence, with everything not being solved for already fixed on it. A property bound as a map – a measured B1, a known T1 – is one value per voxel and rides along.

  • *unknown (str) – The properties being solved for, in the order their channels appear.

  • shape (tuple of int) – The voxel shape, C order.

  • bounds (dict, optional) – {name: (low, high)}, either end None for unbounded. A bound is kept by solving for a transformed variable, so no iterate leaves it – which matters more under an encoding than in a voxel-wise fit, where one bad voxel spoils the whole residual.

  • amplitude (bool) – Carry a complex amplitude multiplying the simulated signal.

  • subspace (torchsim.Subspace, optional) – Solve in a temporal basis rather than in the contrasts.

  • contrasts (int, optional) – How many images the sequence records; measured when not given.

  • **scale – The size of a step in a parameter left unbounded.

Examples

>>> from torchsim.simulators import FSESimulator
>>> M = Bloch(
...     FSESimulator(flip=train, ESP=8.0, TR=3000.0),
...     "T1", "T2",
...     shape=(128, 128),
...     bounds={"T1": (100.0, 4000.0), "T2": (5.0, 500.0)},
... )