snake.core.engine.utils
#
Utilities for the MRD format.
Module Contents#
Functions#
Get phantom state after applying all temporal variation. |
|
Apply the FFT operator. |
|
Generate noise for a given chunk of k-space data. |
API#
- snake.core.engine.utils.get_phantom_state(phantom: snake.core.phantom.Phantom, dyn_datas: list[snake.core.phantom.DynamicData], i: int, sim_conf: snake.core.simulation.SimConfig, aggregate: bool = True) [numpy.typing.NDArray, numpy.typing.NDArray] [source]#
Get phantom state after applying all temporal variation.
- snake.core.engine.utils.fft(image: numpy.typing.NDArray, axis: tuple[int, ...] | int = -1) numpy.typing.NDArray [source]#
Apply the FFT operator.
- Parameters:
image (array) β Image in space.
axis (int) β Axis to apply the FFT.
- Returns:
kspace_data β kspace data.
- Return type:
array
- snake.core.engine.utils.get_noise(chunk_data: numpy.typing.NDArray, cov: numpy.typing.NDArray, rng: numpy.random.Generator) numpy.typing.NDArray [source]#
Generate noise for a given chunk of k-space data.