Commit 5af4d1da authored by theos's avatar theos

Removed deprecated entries from nifty/config/nifty_config.py

parent 8eea1f2d
......@@ -22,14 +22,6 @@ variable_fft_module = keepers.Variable(
'fft_module',
['pyfftw', 'gfft', 'gfft_dummy'],
lambda z: z in dependency_injector)
# gl_space needs libsharp
variable_lm2gl = keepers.Variable(
'lm2gl',
[True, False],
lambda z: (('libsharp_wrapper_gl' in
dependency_injector)
if z else True) and isinstance(z, bool),
genus='boolean')
def _healpy_validator(use_healpy):
......@@ -59,11 +51,6 @@ variable_use_libsharp = keepers.Variable(
if z else True) and isinstance(z, bool),
genus='boolean')
variable_verbosity = keepers.Variable('verbosity',
[1],
lambda z: z == abs(int(z)),
genus='int')
def _dtype_validator(dtype):
try:
......@@ -86,41 +73,24 @@ variable_default_distribution_strategy = keepers.Variable(
if z == 'fftw' else True),
genus='str')
variable_default_comm = keepers.Variable(
'default_comm',
['COMM_WORLD'],
lambda z: hasattr(dependency_injector['MPI'], z))
nifty_configuration = keepers.get_Configuration(
name='NIFTy',
variables=[variable_fft_module,
variable_lm2gl,
variable_use_healpy,
variable_use_libsharp,
variable_verbosity,
variable_default_field_dtype,
variable_default_distribution_strategy],
variable_default_distribution_strategy,
variable_default_comm],
file_name='NIFTy.conf',
search_pathes=[os.path.expanduser('~') + "/.config/nifty/",
os.path.expanduser('~') + "/.config/",
'./'])
########
### Compatibility variables
########
variable_mpi_module = keepers.Variable('mpi_module',
['MPI'],
lambda z: z in dependency_injector)
nifty_configuration.register(variable_mpi_module)
# register the default comm variable as the 'mpi_module' variable is now
# available
variable_default_comm = keepers.Variable(
'default_comm',
['COMM_WORLD'],
lambda z: hasattr(dependency_injector[
nifty_configuration['mpi_module']], z))
nifty_configuration.register(variable_default_comm)
########
########
......
......@@ -4,11 +4,9 @@ import numpy as np
from d2o import distributed_data_object,\
STRATEGIES as DISTRIBUTION_STRATEGIES
from nifty.config import nifty_configuration as gc,\
dependency_injector as gdi
from nifty.config import dependency_injector as gdi
MPI = gdi[gc['mpi_module']]
hp = gdi.get('healpy')
MPI = gdi['MPI']
class PowerIndices(object):
......
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