mrpro.utils.slice_profiles.SliceGaussian

class mrpro.utils.slice_profiles.SliceGaussian[source]

Bases: SliceProfileBase

Gaussian slice profile.

__init__(fwhm: float | Tensor)[source]

Initialize the Gaussian slice profile.

Parameters:

fwhm (float | Tensor) – Full width at half maximum of the Gaussian

forward(x: Tensor) Tensor[source]

Evaluate the Gaussian slice profile at a position.

Parameters:

x (Tensor) – Position at which to evaluate the profile

Returns:

Value of the profile / intensity at the given position

random_sample(size: Sequence[int]) Tensor[source]

Sample n random positions from the profile.

Use the profile as a probability density function to sample positions.

Parameters:

size (Sequence[int]) – Number of positions to sample

Returns:

Sampled positions, shape will be size.