Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
e1c9f98a
Commit
e1c9f98a
authored
Feb 25, 2021
by
Vincent Eberle
Committed by
Philipp Arras
Feb 25, 2021
Browse files
docstrings and cosmetics
parent
8ed8afdb
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/library/nft.py
View file @
e1c9f98a
...
...
@@ -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
)
...
...
src/library/special_distributions.py
View file @
e1c9f98a
...
...
@@ -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
"""
...
...
src/operators/simple_linear_operators.py
View file @
e1c9f98a
...
...
@@ -141,7 +141,7 @@ class FieldAdapter(LinearOperator):
Parameters
----------
tgt : Domain, tuple of
D
omain, DomainTuple, dict or MultiDomain:
tgt : Domain, tuple of
d
omain
s
, 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`
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment