mrpro.utils.slice_profiles.SliceProfileBase

class mrpro.utils.slice_profiles.SliceProfileBase(*args, **kwargs)[source]

Bases: ABC, Module

Base class for slice profiles.

__init__(*args, **kwargs) None

Initialize internal Module state, shared by both nn.Module and ScriptModule.

abstract forward(x: Tensor) Tensor[source]

Evaluate the slice profile at a position x.

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 – Number of positions to sample

Return type:

Sampled positions, shape will be size.