Commit 0448204d authored by theos's avatar theos
Browse files

Merge branch 'feature/field_multiple_space' of gitlab.mpcdf.mpg.de:ift/NIFTy...

Merge branch 'feature/field_multiple_space' of gitlab.mpcdf.mpg.de:ift/NIFTy into feature/field_multiple_space
parents 2f5a515d ad1e239f
...@@ -15,7 +15,6 @@ from nifty.field_types import FieldType,\ ...@@ -15,7 +15,6 @@ from nifty.field_types import FieldType,\
from nifty.spaces.space import Space from nifty.spaces.space import Space
import nifty.nifty_utilities as utilities import nifty.nifty_utilities as utilities
from nifty_random import random
POINT_DISTRIBUTION_STRATEGIES = DISTRIBUTION_STRATEGIES['global'] POINT_DISTRIBUTION_STRATEGIES = DISTRIBUTION_STRATEGIES['global']
COMM = getattr(gdi[gc['mpi_module']], gc['default_comm']) COMM = getattr(gdi[gc['mpi_module']], gc['default_comm'])
......
This diff is collapsed.
This diff is collapsed.
...@@ -7,6 +7,8 @@ from nifty.spaces.space import SpaceParadict ...@@ -7,6 +7,8 @@ from nifty.spaces.space import SpaceParadict
class HPSpaceParadict(SpaceParadict): class HPSpaceParadict(SpaceParadict):
def __init__(self, nside): def __init__(self, nside):
if not hasattr(self, 'parameters'):
self.parameters = {}
SpaceParadict.__init__(self, nside=nside) SpaceParadict.__init__(self, nside=nside)
def __setitem__(self, key, arg): def __setitem__(self, key, arg):
...@@ -14,9 +16,12 @@ class HPSpaceParadict(SpaceParadict): ...@@ -14,9 +16,12 @@ class HPSpaceParadict(SpaceParadict):
raise ValueError(about._errors.cstring( raise ValueError(about._errors.cstring(
"ERROR: Unsupported hp_space parameter")) "ERROR: Unsupported hp_space parameter"))
temp = int(arg) if key == 'nside':
# if(not hp.isnsideok(nside)): temp = int(arg)
if ((temp & (temp - 1)) != 0) or (temp < 2): if ((temp & (temp - 1)) != 0) or (temp < 2):
raise ValueError(about._errors.cstring( raise ValueError(
"ERROR: invalid parameter ( nside <> 2**n ).")) about._errors.cstring(
"ERROR: invalid parameter ( nside <> 2**n ).")
)
self.parameters.__setitem__(key, temp) self.parameters.__setitem__(key, temp)
This diff is collapsed.
...@@ -268,10 +268,6 @@ class Space(object): ...@@ -268,10 +268,6 @@ class Space(object):
raise NotImplementedError(about._errors.cstring( raise NotImplementedError(about._errors.cstring(
"ERROR: There is no generic k_array for Space base class.")) "ERROR: There is no generic k_array for Space base class."))
def smooth(self, x, **kwargs):
raise AttributeError(about._errors.cstring(
"ERROR: There is no generic smoothing for Space base class."))
def get_plot(self, x, title="", vmin=None, vmax=None, unit=None, def get_plot(self, x, title="", vmin=None, vmax=None, unit=None,
norm=None, other=None, legend=False, save=None, **kwargs): norm=None, other=None, legend=False, save=None, **kwargs):
""" """
......
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