From d2cbb903035912e3655223f22168f509daa19e53 Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Thu, 1 Aug 2024 13:07:14 +0200 Subject: [PATCH 1/3] fix(test): make stacked-gpu tests run. --- tests/helpers/factories.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/helpers/factories.py b/tests/helpers/factories.py index 81defbae..43838da0 100644 --- a/tests/helpers/factories.py +++ b/tests/helpers/factories.py @@ -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"]: From 83cdca0de0966004447ddfe4031e549602e79349 Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Thu, 1 Aug 2024 13:08:11 +0200 Subject: [PATCH 2/3] feat: make z_index default to "auto" --- src/mrinufft/operators/stacked.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mrinufft/operators/stacked.py b/src/mrinufft/operators/stacked.py index 03d55e38..6fc33c4c 100644 --- a/src/mrinufft/operators/stacked.py +++ b/src/mrinufft/operators/stacked.py @@ -74,9 +74,9 @@ def __init__( self, samples, shape, - z_index, backend, smaps, + z_index="auto", n_coils=1, n_batchs=1, squeeze_dims=False, @@ -371,11 +371,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, From 28ae3521504c9baaf1512f0e7238eb7a016ace8e Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Mon, 5 Aug 2024 07:55:46 -0500 Subject: [PATCH 3/3] docs: z-index computation. --- src/mrinufft/operators/stacked.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mrinufft/operators/stacked.py b/src/mrinufft/operators/stacked.py index 6fc33c4c..387b7b9b 100644 --- a/src/mrinufft/operators/stacked.py +++ b/src/mrinufft/operators/stacked.py @@ -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. @@ -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