Commit ec5edd53 authored by Theo Steininger's avatar Theo Steininger
Browse files

Merge branch 'real_fft_really_integrated' into 'master'

Real fft really integrated

See merge request !185
parents 19469582 ae1ab44a
Pipeline #16561 passed with stages
in 33 minutes and 55 seconds
...@@ -20,4 +20,4 @@ ...@@ -20,4 +20,4 @@
# 1) we don't load dependencies by storing it in __init__.py # 1) we don't load dependencies by storing it in __init__.py
# 2) we can import it in setup.py for the same reason # 2) we can import it in setup.py for the same reason
# 3) we can import it into your module module # 3) we can import it into your module module
__version__ = '3.0.4' __version__ = '3.1.0'
...@@ -35,8 +35,8 @@ setup(name="ift_nifty", ...@@ -35,8 +35,8 @@ setup(name="ift_nifty",
include_dirs=[numpy.get_include()], include_dirs=[numpy.get_include()],
dependency_links=[ dependency_links=[
'git+https://gitlab.mpcdf.mpg.de/ift/keepers.git#egg=keepers-0.3.7', 'git+https://gitlab.mpcdf.mpg.de/ift/keepers.git#egg=keepers-0.3.7',
'git+https://gitlab.mpcdf.mpg.de/ift/d2o.git#egg=d2o-1.0.8'], 'git+https://gitlab.mpcdf.mpg.de/ift/d2o.git#egg=d2o-1.1.1'],
install_requires=['keepers>=0.3.7', 'd2o>=1.0.8'], install_requires=['keepers>=0.3.7', 'd2o>=1.1.1'],
package_data={'nifty.demos': ['demo_faraday_map.npy'], package_data={'nifty.demos': ['demo_faraday_map.npy'],
}, },
license="GPLv3", license="GPLv3",
......
...@@ -32,6 +32,7 @@ from nifty import Field,\ ...@@ -32,6 +32,7 @@ from nifty import Field,\
PowerSpace,\ PowerSpace,\
nifty_configuration nifty_configuration
import d2o
from d2o import distributed_data_object from d2o import distributed_data_object
from test.common import expand from test.common import expand
...@@ -93,7 +94,7 @@ class Test_Functionality(unittest.TestCase): ...@@ -93,7 +94,7 @@ class Test_Functionality(unittest.TestCase):
@expand(product([RGSpace((8,), harmonic=True, @expand(product([RGSpace((8,), harmonic=True,
zerocenter=False), zerocenter=False),
RGSpace((8, 8), harmonic=True, distances=0.123, RGSpace((8, 8), harmonic=True, distances=0.123,
zerocenter=False)], zerocenter=True)],
[RGSpace((8,), harmonic=True, [RGSpace((8,), harmonic=True,
zerocenter=False), zerocenter=False),
LMSpace(12)], LMSpace(12)],
...@@ -101,6 +102,8 @@ class Test_Functionality(unittest.TestCase): ...@@ -101,6 +102,8 @@ class Test_Functionality(unittest.TestCase):
def test_power_synthesize_analyze(self, space1, space2, base): def test_power_synthesize_analyze(self, space1, space2, base):
nifty_configuration['harmonic_rg_base'] = base nifty_configuration['harmonic_rg_base'] = base
d2o.random.seed(11)
p1 = PowerSpace(space1) p1 = PowerSpace(space1)
spec1 = lambda k: 42/(1+k)**2 spec1 = lambda k: 42/(1+k)**2
fp1 = Field(p1, val=spec1) fp1 = Field(p1, val=spec1)
...@@ -112,7 +115,7 @@ class Test_Functionality(unittest.TestCase): ...@@ -112,7 +115,7 @@ class Test_Functionality(unittest.TestCase):
outer = np.outer(fp1.val.get_full_data(), fp2.val.get_full_data()) outer = np.outer(fp1.val.get_full_data(), fp2.val.get_full_data())
fp = Field((p1, p2), val=outer) fp = Field((p1, p2), val=outer)
samples = 1000 samples = 2000
ps1 = 0. ps1 = 0.
ps2 = 0. ps2 = 0.
for ii in xrange(samples): for ii in xrange(samples):
...@@ -124,10 +127,10 @@ class Test_Functionality(unittest.TestCase): ...@@ -124,10 +127,10 @@ class Test_Functionality(unittest.TestCase):
assert_allclose(ps1.val.get_full_data()/samples, assert_allclose(ps1.val.get_full_data()/samples,
fp1.val.get_full_data(), fp1.val.get_full_data(),
rtol=0.1) rtol=0.2)
assert_allclose(ps2.val.get_full_data()/samples, assert_allclose(ps2.val.get_full_data()/samples,
fp2.val.get_full_data(), fp2.val.get_full_data(),
rtol=0.1) rtol=0.2)
def test_vdot(self): def test_vdot(self):
s=RGSpace((10,)) s=RGSpace((10,))
......
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