mrpro.data.traj_calculators.KTrajectoryCartesian
- class mrpro.data.traj_calculators.KTrajectoryCartesian[source]
Bases:
KTrajectoryCalculator
Cartesian trajectory.
- __init__()
- classmethod gaussian_variable_density(encoding_matrix: SpatialDimension[int] | int, acceleration: float = 2.0, n_center: int = 10, fwhm_ratio: float = 0.3, n_other: Sequence[int] = (1,), seed: int = 0) KTrajectory [source]
Generate k-space Gaussian weighted variable density sampling.
- Parameters:
encoding_matrix (
Union
[SpatialDimension
[int
],int
]) – Encoded K-space size, must haveencoding_matrix.z=1
. If a single integer, a square k-space is considered.acceleration (
float
, default:2.0
) – Acceleration factor (undersampling rate).n_center (
int
, default:10
) – Number of fully-sampled center lines to always include.fwhm_ratio (
float
, default:0.3
) – Full-width at half-maximum of the Gaussian relative to encoding_matrix.y. Larger values approach uniform sampling. Set to infinity for uniform sampling.n_other (
Sequence
[int
], default:(1,)
) – Batch size(s). The trajectory is different for each batch sample.seed (
int
, default:0
) – Random seed for reproducibility.
- Returns:
Cartesian trajectory.
- Raises:
ValueError – If
n_center
exceeds the total number of lines to keep given the acceleration.NotImplementedError – If called with a 3D encoding matrix.
- __call__(*, n_k0: int, k0_center: int | Tensor, k1_idx: Tensor, k1_center: int | Tensor, k2_idx: Tensor, k2_center: int | Tensor, reversed_readout_mask: Tensor | None = None, **_) KTrajectory [source]
Calculate Cartesian trajectory for given KHeader.
- __eq__(value, /)
Return self==value.
- __new__(**kwargs)