Commit 915f8bc7 authored by Ultimanet's avatar Ultimanet
Browse files

Updated rg

parent d8f0ba70
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
## along with this program. If not, see <http://www.gnu.org/licenses/>. ## along with this program. If not, see <http://www.gnu.org/licenses/>.
from __future__ import division from __future__ import division
from nifty_rg import * from nifty_rg import rg_space
from nifty_power_conversion_rg import * from nifty_power_conversion_rg import power_backward_conversion_rg,\
power_forward_conversion_rg
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
import numpy as np import numpy as np
from nifty.nifty_mpi_data import distributed_data_object from nifty.nifty_mpi_data import distributed_data_object
from nifty.nifty_about import about
# Try to import pyfftw. If this fails fall back to gfft.
# Try to import pyfftw. If this fails fall back to gfft. If this fails fall back to local gfft_rg # If this fails fall back to local gfft_rg
try: try:
import pyfftw import pyfftw
...@@ -13,11 +14,11 @@ except(ImportError): ...@@ -13,11 +14,11 @@ except(ImportError):
try: try:
import gfft import gfft
fft_machine='gfft' fft_machine='gfft'
#about.infos.cprint('INFO: Using gfft') about.infos.cprint('INFO: Using gfft')
except(ImportError): except(ImportError):
import gfft_rg as gfft import gfft_rg as gfft
fft_machine='gfft_fallback' fft_machine='gfft_fallback'
#about.infos.cprint('INFO: Using builtin "plain" gfft version 0.1.0') about.infos.cprint('INFO: Using builtin "plain" gfft version 0.1.0')
def fft_factory(): def fft_factory():
...@@ -346,8 +347,7 @@ if fft_machine == 'pyfftw': ...@@ -346,8 +347,7 @@ if fft_machine == 'pyfftw':
return return_val return return_val
elif fft_machine == 'gfft' or 'gfft_fallback': elif fft_machine == 'gfft' or 'gfft_fallback':
class fft_gfft(fft): class fft_gfft(fft):
......
...@@ -21,10 +21,11 @@ ...@@ -21,10 +21,11 @@
#from nifty import * #from nifty import *
import numpy as np import numpy as np
from nifty import about, \ from nifty.nifty_about import about
field, \ from nifty.nifty_core import field
sqrt,exp,log, \ from nifty.nifty_simple_math import sqrt,exp,log
power_operator from nifty.operators import power_operator
def power_backward_conversion_rg(k_space,p,mean=None,bare=True): def power_backward_conversion_rg(k_space,p,mean=None,bare=True):
......
This diff is collapsed.
This diff is collapsed.
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