Commit 376a776e authored by theos's avatar theos
Browse files

Resolved circular dependency in lm/gl/hp spaces.

parent cd874cca
......@@ -29,7 +29,7 @@ try:
except(ImportError):
try:
import healpy as hp
if lv(hp.__version__) < lv('1.8.1'):
if lv(hp.__version__) < lv('3.8.1'):
raise ImportError(
about._errors.cprint(
"ERROR: installed healpy version is older than 1.8.1!"))
......@@ -44,7 +44,7 @@ except(ImportError):
else:
try:
import healpy as hp
if lv(hp.__version__) < lv('1.8.1'):
if lv(hp.__version__) < lv('3.8.1'):
raise ImportError(
about._errors.cprint(
"ERROR: installed healpy version is older than 1.8.1!"))
......
......@@ -7,7 +7,7 @@ from matplotlib.ticker import LogFormatter as lf
from d2o import STRATEGIES as DISTRIBUTION_STRATEGIES
from nifty.lm import LMSpace
from nifty.lm.lm_space import LMSpace
from nifty.space import Space
from nifty.config import about,\
......
......@@ -38,7 +38,7 @@ import pylab as pl
from d2o import STRATEGIES as DISTRIBUTION_STRATEGIES
from nifty.lm import LMSpace
from nifty.lm.lm_space import LMSpace
from nifty.space import Space
from nifty.field import Field
......
......@@ -10,8 +10,8 @@ from matplotlib.ticker import LogFormatter as lf
from d2o import STRATEGIES as DISTRIBUTION_STRATEGIES
from nifty.space import Space
from hp_space import HPSpace
from gl_space import GLSpace
#from hp_space import HPSpace
#from gl_space import GLSpace
from nifty.config import about,\
nifty_configuration as gc,\
dependency_injector as gdi
......@@ -290,6 +290,8 @@ class LMSpace(Space):
if codomain is None:
return False
from hp_space import HPSpace
from gl_space import GLSpace
if not isinstance(codomain, Space):
raise TypeError(about._errors.cstring(
"ERROR: The given codomain must be a nifty lm_space."))
......@@ -344,6 +346,8 @@ class LMSpace(Space):
`arXiv:1303.4945 <http://www.arxiv.org/abs/1303.4945>`_
"""
from hp_space import HPSpace
from gl_space import GLSpace
if coname == 'gl' or (coname is None and gc['lm2gl']):
if self.dtype == np.dtype('complex64'):
new_dtype = np.float32
......@@ -527,7 +531,8 @@ class LMSpace(Space):
# "external alm2map method!")
np_x = x.get_full_data()
from hp_space import HPSpace
from gl_space import GLSpace
if isinstance(codomain, GLSpace):
nlat = codomain.paradict['nlat']
nlon = codomain.paradict['nlon']
......
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