mrpro.utils.slice_profiles.SliceInterpolate
- class mrpro.utils.slice_profiles.SliceInterpolate(positions: Tensor, values: Tensor)[source]
Bases:
SliceProfileBase
Slice Profile based on Interpolation of Measured Profile.
- __init__(positions: Tensor, values: Tensor)[source]
Initialize the Interpolated Slice Profile.
- Parameters:
positions – Positions of the measured profile
values – Intensities of the measured profile
- forward(x: Tensor) Tensor [source]
Evaluate the Interpolated Slice Profile at a position.
- Parameters:
x – Position at which to evaluate the profile
- Return type:
Value of the profile / intensity at the given position
- random_sample(size: Sequence[int]) Tensor
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.