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
05512d65
Commit
05512d65
authored
May 13, 2020
by
Martin Reinecke
Browse files
Merge branch 'flip_fft' into 'NIFTy_6'
Flip fft and ifft See merge request
!451
parents
29933473
50e5d593
Pipeline
#74842
passed with stages
in 20 minutes and 42 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
05512d65
Changes since NIFTy 5:
FFT convention adjusted
=======================
When going to harmonic space, NIFTy's FFT operator now uses a minus sign in the
exponent (and, consequently, a plus sign on the adjoint transform). This
convention is consistent with almost all other numerical FFT libraries.
Interface change in EndomorphicOperator.draw_sample()
=====================================================
...
...
nifty6/operators/harmonic_operators.py
View file @
05512d65
...
...
@@ -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 @
05512d65
...
...
@@ -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