Commit 313a8c45 authored by Vincent Eberle's avatar Vincent Eberle
Browse files

docstrings and cosmetics

parent 7062e3b0
Pipeline #94320 failed with stages
in 17 minutes and 20 seconds
......@@ -26,6 +26,17 @@ from ..sugar import makeDomain, makeField
class Gridder(LinearOperator):
"""
Operator computing non-uniform 2D FFTs using ducc0 package.
Parameters
----------
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.
Parameters
----------
target: must be RGSpace?
pos:
eps:
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):
Parameters
----------
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`
......
Markdown is supported
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