EMCqMRI.core.models.signal.looklocker module

class EMCqMRI.core.models.signal.looklocker.Looklocker(config_object)[source]

Bases: core.base.base_signal_model.SignalModel

Class implementing the forward model of a Look Locker based acquisition. Contains methods:

  • setTau: set inversion times of acquisition

  • forwardModel: Defines the signal model

  • generateWeightedImages: wrapper to generate N weighted images from A, B and T1 maps

  • gradients: Uses autograd to automatically compute gradients w.r.t. the likelihood function

  • initializeParameters: Initialises all tissue parameters

forward(kappa, tau)[source]

Abstract function that defines the forward pass of the signal model. Generates a synthetic signal based on a signal model. This function must implement any necessary loops for generation of sequence of signals

Parameters
  • kappa ([torch.Tensor]) – a torch.Tensor or a list of torch.Tensor containing independent parameters of the signal model.

  • *fixed_params ([tuple]) – any necessary fixed parameter of the signal model.

Raises

NotImplementedError – When the subclass does not override this method.

Returns

Simulated (or synthetic) signal.

Return type

([torch.Tensor])

initialize_parameters(signal)[source]

Initializes the independent parameters of the signal model. In general, these are the parameters that will be estimated by the inference model.

Raises

NotImplementedError – When the subclass does not override this method.

Returns

If list, each element contains a torch.Tensor of different types (e.g. images, scalars, etc.). Each torch.Tensor is defined as the parameter to be estimated by the inference model.

Return type

([torch.Tensor]) or ([list])