Commit 32185d29 authored by Martin Reinecke's avatar Martin Reinecke

fixes

parent 00390d87
......@@ -105,7 +105,7 @@ class GLSpace(StructuredDomain):
LMSpace
The partner domain
"""
from .. import LMSpace
from ..domains.lm_space import LMSpace
return LMSpace(lmax=self._nlat-1, mmax=self._nlon//2)
def check_codomain(self, codomain):
......@@ -117,6 +117,6 @@ class GLSpace(StructuredDomain):
This function only checks whether `codomain` is of type
:class:`LMSpace`.
"""
from .. import LMSpace
from ..domains.lm_space import LMSpace
if not isinstance(codomain, LMSpace):
raise TypeError("codomain must be a LMSpace.")
......@@ -80,7 +80,7 @@ class HPSpace(StructuredDomain):
The `lmax` and `mmax` parameters of the returned :class:`LMSpace` are
set to `2*self.nside`.
"""
from .. import LMSpace
from ..domains.lm_space import LMSpace
return LMSpace(lmax=2*self.nside)
def check_codomain(self, codomain):
......@@ -92,6 +92,6 @@ class HPSpace(StructuredDomain):
This function only checks whether `codomain` is of type
:class:`LMSpace`.
"""
from .. import LMSpace
from ..domains.lm_space import LMSpace
if not isinstance(codomain, LMSpace):
raise TypeError("codomain must be a LMSpace.")
......@@ -139,7 +139,7 @@ class LMSpace(StructuredDomain):
GLSpace
The partner domain
"""
from .. import GLSpace
from ..domains.gl_space import GLSpace
return GLSpace(self.lmax+1, self.mmax*2+1)
def check_codomain(self, codomain):
......@@ -151,6 +151,7 @@ class LMSpace(StructuredDomain):
This function only checks whether `codomain` is of type
:class:`GLSpace` or :class:`HPSpace`.
"""
from .. import GLSpace, HPSpace
from ..domains.gl_space import GLSpace
from ..domains.hp_space import HPSpace
if not isinstance(codomain, (GLSpace, HPSpace)):
raise TypeError("codomain must be a GLSpace or HPSpace.")
......@@ -32,9 +32,13 @@ def make_amplitude_model(s_space, Npixdof, ceps_a, ceps_k, sm, sv, im, iv,
im, iv : y-intercept_mean, y-intercept_variance of power_slope
'''
from ..operators import (ExpTransform, QHTOperator, SlopeOperator,
SymmetrizingOperator)
from ..models import Variable, Constant, PointwiseExponential
from ..operators.exp_transform import ExpTransform
from ..operators.qht_operator import QHTOperator
from ..operators.slope_operator import SlopeOperator
from ..operators.symmetrizing_operator import SymmetrizingOperator
from ..models.variable import Variable
from ..models.constant import Constant
from ..models.local_nonlinearity import PointwiseExponential
h_space = s_space.get_default_codomain()
p_space = PowerSpace(h_space)
......
......@@ -8,8 +8,12 @@ def make_correlated_field(s_space, amplitude_model):
amplitude_model : model for correlation structure
'''
from .. import (FFTOperator, Field, MultiField, PointwiseExponential,
PowerDistributor, Variable)
from ..operators.fft_operator import FFTOperator
from ..field import Field
from ..multi.multi_field import MultiField
from ..models.local_nonlinearity import PointwiseExponential
from ..operators.power_distributor import PowerDistributor
from ..models.variable import Variable
h_space = s_space.get_default_codomain()
ht = FFTOperator(h_space, s_space)
p_space = amplitude_model.value.domain[0]
......@@ -35,10 +39,15 @@ def make_mf_correlated_field(s_space_spatial, s_space_energy,
'''
Method for construction of correlated multi-frequency fields
'''
from .. import (DomainTuple, Field, MultiField,
PointwiseExponential, Variable)
from ..operators import (DomainDistributor, PowerDistributor,
HarmonicTransformOperator)
from ..operators.fft_operator import FFTOperator
from ..field import Field
from ..multi.multi_field import MultiField
from ..models.local_nonlinearity import PointwiseExponential
from ..operators.power_distributor import PowerDistributor
from ..models.variable import Variable
from ..domain_tuple import DomainTuple
from ..operators.domain_distributor import DomainDistributor
from ..operators.harmonic_transform_operator import HarmonicTransformOperator
h_space_spatial = s_space_spatial.get_default_codomain()
h_space_energy = s_space_energy.get_default_codomain()
h_space = DomainTuple.make((h_space_spatial, h_space_energy))
......
......@@ -53,7 +53,7 @@ class ExpTransform(LinearOperator):
# 0 <= frac < 1.
self._frac[i] = coord - self._bindex[i]
from ..domains import LogRGSpace
from ..domains.log_rg_space import LogRGSpace
log_space = LogRGSpace(2*dof+1, bindistances,
t_mins, harmonic=False)
self._target = DomainTuple.make(target)
......
......@@ -27,7 +27,7 @@ class QHTOperator(LinearOperator):
if target.harmonic:
raise TypeError("Target is not a codomain of domain")
from ..domains import LogRGSpace
from ..domains.log_rg_space import LogRGSpace
if not isinstance(domain, LogRGSpace):
raise ValueError("Domain has to be a LogRGSpace!")
if not isinstance(target, LogRGSpace):
......
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