Skip to content

Commit

Permalink
Some tweaks for stacked nufft (#173)
Browse files Browse the repository at this point in the history
* fix(test): make stacked-gpu tests run.

* feat: make z_index default to "auto"

* docs: z-index computation.
  • Loading branch information
paquiteau authored Aug 7, 2024
1 parent 57765d5 commit 60e32d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/mrinufft/operators/stacked.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class MRIStackedNUFFT(FourierOperatorBase):
shape: tuple
Shape of the image.
z_index: array-like
Cartesian z index of masked plan.
Cartesian z index of masked plan. if "auto" the z_index is computed from the
samples, if they are 3D, using the last coordinate.
backend: str or FourierOperatorBase
Backend to use.
If str, a NUFFT operator is initialized with str being a registered backend.
Expand Down Expand Up @@ -74,9 +75,9 @@ def __init__(
self,
samples,
shape,
z_index,
backend,
smaps,
z_index="auto",
n_coils=1,
n_batchs=1,
squeeze_dims=False,
Expand Down Expand Up @@ -353,7 +354,8 @@ class MRIStackedNUFFTGPU(MRIStackedNUFFT):
shape: tuple
Shape of the image.
z_index: array-like
Cartesian z index of masked plan.
Cartesian z index of masked plan. if "auto" the z_index is computed from the
samples, if they are 3D, using the last coordinate.
smaps: array-like
Sensitivity maps.
n_coils: int
Expand All @@ -371,11 +373,11 @@ def __init__(
self,
samples,
shape,
z_index,
smaps,
n_coils=1,
n_batchs=1,
n_trans=1,
z_index="auto",
squeeze_dims=False,
smaps_cached=False,
density=False,
Expand Down
1 change: 1 addition & 0 deletions tests/helpers/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def wrapper(operator, array_interface, *args, **kwargs):
"gpunufft",
"torchkbnufft-gpu",
"tensorflow",
"stacked-cufinufft",
]:
pytest.skip("Uncompatible backend and array")
if array_interface in ["torch-cpu", "numpy"]:
Expand Down

0 comments on commit 60e32d2

Please sign in to comment.