Skip to content
GitLab
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
262afba0
Commit
262afba0
authored
Apr 17, 2020
by
Martin Reinecke
Browse files
flip fft/ifft
parent
f9d8ed85
Pipeline
#73057
passed with stages
in 19 minutes and 45 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/operators/harmonic_operators.py
View file @
262afba0
...
...
@@ -74,11 +74,11 @@ class FFTOperator(LinearOperator):
self
.
_check_input
(
x
,
mode
)
ncells
=
x
.
domain
[
self
.
_space
].
size
if
x
.
domain
[
self
.
_space
].
harmonic
:
# harmonic -> position
func
=
fft
.
fftn
fct
=
1.
else
:
func
=
fft
.
ifftn
fct
=
ncells
else
:
func
=
fft
.
fftn
fct
=
1.
axes
=
x
.
domain
.
axes
[
self
.
_space
]
tdom
=
self
.
_tgt
(
mode
)
tmp
=
func
(
x
.
val
,
axes
=
axes
)
...
...
test/test_operators/test_nft.py
View file @
262afba0
...
...
@@ -82,8 +82,7 @@ def test_cartesian():
vol
=
ift
.
full
(
dom
,
1.
).
s_integrate
()
res1
=
fft
(
fld
).
val
# FIXME: we don't understand the conjugate() yet
np
.
testing
.
assert_allclose
(
res
,
res1
.
conjugate
()
*
vol
)
np
.
testing
.
assert_allclose
(
res
,
res1
*
vol
)
@
pmp
(
'eps'
,
[
1e-2
,
1e-6
,
2e-13
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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