Skip to content
Snippets Groups Projects
Commit ddff18c4 authored by Vincent Eberle's avatar Vincent Eberle Committed by Philipp Arras
Browse files

even # pixels for gridder

parent 2cc558b8
No related branches found
No related tags found
1 merge request!600Add finufft
...@@ -28,6 +28,9 @@ class Gridder(LinearOperator): ...@@ -28,6 +28,9 @@ class Gridder(LinearOperator):
def __init__(self, target, uv, eps=2e-10, nthreads=1): def __init__(self, target, uv, eps=2e-10, nthreads=1):
self._capability = self.TIMES | self.ADJOINT_TIMES self._capability = self.TIMES | self.ADJOINT_TIMES
self._target = makeDomain(target) self._target = makeDomain(target)
for ii in [0, 1]:
if target.shape[ii] % 2 != 0:
raise ValueError("even number of samples is required for gridding operation")
if (len(self._target) != 1 or not isinstance(self._target[0], RGSpace) if (len(self._target) != 1 or not isinstance(self._target[0], RGSpace)
or not len(self._target.shape) == 2): or not len(self._target.shape) == 2):
raise ValueError("need target with exactly one 2D RGSpace") raise ValueError("need target with exactly one 2D RGSpace")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment