Commit e1c9f98a authored by Vincent Eberle's avatar Vincent Eberle Committed by Philipp Arras
Browse files

docstrings and cosmetics

parent 8ed8afdb
......@@ -26,6 +26,17 @@ from ..sugar import makeDomain, makeField
class Gridder(LinearOperator):
Operator computing non-uniform 2D FFTs using ducc0 package.
target : Domain, tuple of domains or DomainTuple. This must be a 2D RGSpace.
uv : coordinates of the data-points. This is supposed to be a 2D numpy.array
eps : requested precision
nthreads: @Parras, please fill this
def __init__(self, target, uv, eps=2e-10, nthreads=1):
self._capability = self.TIMES | self.ADJOINT_TIMES
self._target = makeDomain(target)
......@@ -67,19 +78,24 @@ class Gridder(LinearOperator):
class FinuFFT(LinearOperator):
Operator computing non-uniform FFTs using finufft package
Operator computing non-uniform 1D,2D and 3D FFTs using finufft package.
target: must be RGSpace?
target : Domain, tuple of domains or DomainTuple.
This must be an RGSpace with 1 to 3 dimensions.
pos : coordinates of the data-points
eps: requested precision
def __init__(self, target, pos, eps=2e-10):
import finufft
self._capability = self.TIMES | self.ADJOINT_TIMES
self._target = makeDomain(target)
if not isinstance(self._target[0], RGSpace):
raise TypeError("target needs to be an RGSpace")
if len(self._target.shape) > 3:
raise ValueError("Only 1D, 2D and 3D FFTs are supported by finufft")
self._domain = DomainTuple.make(UnstructuredDomain((pos.shape[0])))
self._eps = float(eps)
dst = np.array(self._target[0].distances)
......@@ -136,7 +136,6 @@ class UniformOperator(Operator):
The domain on which the field shall be defined. This is at the same
time the domain and the target of the operator.
loc: float
scale: float
......@@ -141,7 +141,7 @@ class FieldAdapter(LinearOperator):
tgt : Domain, tuple of Domain, DomainTuple, dict or MultiDomain:
tgt : Domain, tuple of domains, DomainTuple, dict or MultiDomain:
If this is a Domain, tuple of Domain or DomainTuple, this will be the
operator's target, and its domain will be a MultiDomain consisting of
its domain with the supplied `name`
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment