oversample#
- mrinufft.trajectories.tools.oversample(trajectory, new_Ns, kind='cubic')[source]#
Resample a trajectory to increase the number of samples using interpolation.
- Parameters:
trajectory (np.ndarray) – The original trajectory array, where interpolation is applied along the second axis.
new_Ns (int) – The desired number of samples in the resampled trajectory.
kind (str, optional) – The type of interpolation to use, such as ‘linear’, ‘quadratic’, or ‘cubic’, by default “cubic”.
- Returns:
The resampled trajectory array with
new_Ns
points along the second axis.- Return type:
np.ndarray
Notes
This function uses
scipy.interpolate.interp1d
to perform the interpolation along the second axis of the input trajectory array.Warning
Using ‘quadratic’ or ‘cubic’ interpolations is likely to generate samples located slightly beyond the original k-space limits by making smooth transitions.
See also
scipy.interpolate.interp1d
The underlying interpolation function used for resampling.