CompositeSignalModel#

class CompositeSignalModel(*args)[source]#

Class that sequentially calls the signal-process building blocks. This offers a general way to stack and exchange arbitrary building blocks without changing the simulation calling signature

Parameters:

args – All signal modules that need to be concatenated.

Methods:

__call__(signal_tensor[, segment_index])

Consecutively calls submodules which the signal change to the passed in tensor.

unstack_repetitions(simulation_result)

Uses the dimension expansion information from the sub modules to unstack the simulated tensor of k-space, samples or images.

update()

Calls update function of all sub-modules and records the overall expansion factor

Attributes:

expected_number_of_repetitions

Returns the total expansion factor (factor by which the #repetitions axis grows)

unstacked_axis_names

returns the name of modules with expansion factors > 1 in the order that is used in unstack_repetitions:

__call__(signal_tensor, segment_index=0, **kwargs)[source]#

Consecutively calls submodules which the signal change to the passed in tensor.

Parameters:
  • kwargs – dictionary of tensors containing all required quantities. Is forwarded to BaseSignalModule.

  • signal_tensor (Tensor) –

  • segment_index (int | Tensor | None) –

unstack_repetitions(simulation_result)[source]#

Uses the dimension expansion information from the sub modules to unstack the simulated tensor of k-space, samples or images. In both cases the second axis (index=1) is assumed to represent the stacked repetitions. :type simulation_result: Union[Tensor, ndarray] :param simulation_result: (-1, [noise], samples) :rtype: Tensor :return: k-space (…, [noise], samples)

Parameters:

simulation_result (Tensor | ndarray) –

Return type:

Tensor

update()[source]#

Calls update function of all sub-modules and records the overall expansion factor

property expected_number_of_repetitions: Tensor#

Returns the total expansion factor (factor by which the #repetitions axis grows)

property unstacked_axis_names: Tuple[str]#

returns the name of modules with expansion factors > 1 in the order that is used in unstack_repetitions: