Commit 508800eb authored by Martin Reinecke's avatar Martin Reinecke
Browse files

merge master

parents 8acbab72 1297585d
Pipeline #17041 passed with stage
in 18 minutes and 40 seconds
......@@ -16,4 +16,4 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from endomorphic_operator import EndomorphicOperator
from .endomorphic_operator import EndomorphicOperator
......@@ -18,7 +18,7 @@
import abc
from nifty.operators.linear_operator import LinearOperator
from ..linear_operator import LinearOperator
class EndomorphicOperator(LinearOperator):
......
......@@ -16,5 +16,5 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from transformations import *
from .transformations import *
from .fft_operator import FFTOperator
......@@ -18,14 +18,14 @@
import numpy as np
import nifty.nifty_utilities as utilities
from nifty.spaces import RGSpace,\
GLSpace,\
HPSpace,\
LMSpace
from nifty.operators.linear_operator import LinearOperator
from transformations import RGRGTransformation,\
from ... import nifty_utilities as utilities
from ...spaces import RGSpace,\
GLSpace,\
HPSpace,\
LMSpace
from ..linear_operator import LinearOperator
from .transformations import RGRGTransformation,\
LMGLTransformation,\
LMHPTransformation,\
GLLMTransformation,\
......
......@@ -16,10 +16,10 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from rgrgtransformation import RGRGTransformation
from gllmtransformation import GLLMTransformation
from hplmtransformation import HPLMTransformation
from lmgltransformation import LMGLTransformation
from lmhptransformation import LMHPTransformation
from .rgrgtransformation import RGRGTransformation
from .gllmtransformation import GLLMTransformation
from .hplmtransformation import HPLMTransformation
from .lmgltransformation import LMGLTransformation
from .lmhptransformation import LMHPTransformation
from transformation_cache import TransformationCache
\ No newline at end of file
from .transformation_cache import TransformationCache
......@@ -18,10 +18,10 @@
import numpy as np
from nifty.config import dependency_injector as gdi
from nifty import GLSpace, LMSpace
from slicing_transformation import SlicingTransformation
import lm_transformation_helper
from ....config import dependency_injector as gdi
from .... import GLSpace, LMSpace
from .slicing_transformation import SlicingTransformation
from . import lm_transformation_helper
pyHealpix = gdi.get('pyHealpix')
......
......@@ -18,11 +18,11 @@
import numpy as np
from nifty.config import dependency_injector as gdi
from nifty import HPSpace, LMSpace
from slicing_transformation import SlicingTransformation
from ....config import dependency_injector as gdi
from .... import HPSpace, LMSpace
from .slicing_transformation import SlicingTransformation
import lm_transformation_helper
from . import lm_transformation_helper
pyHealpix = gdi.get('pyHealpix')
......
from __future__ import division
import numpy as np
def buildLm(nr, lmax):
new_dtype = np.result_type(nr.dtype, np.complex64)
size = (len(nr)-lmax-1)/2+lmax+1
size = (len(nr)-lmax-1)//2+lmax+1
res = np.zeros([size], dtype=new_dtype)
res[0:lmax+1] = nr[0:lmax+1]
res[lmax+1:] = np.sqrt(0.5)*(nr[lmax+1::2] + 1j*nr[lmax+2::2])
......
......@@ -17,11 +17,11 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import numpy as np
from nifty.config import dependency_injector as gdi
from nifty import GLSpace, LMSpace
from ....config import dependency_injector as gdi
from .... import GLSpace, LMSpace
from slicing_transformation import SlicingTransformation
import lm_transformation_helper
from .slicing_transformation import SlicingTransformation
from . import lm_transformation_helper
pyHealpix = gdi.get('pyHealpix')
......
......@@ -17,10 +17,10 @@
# and financially supported by the Studienstiftung des deutschen Volkes.
import numpy as np
from nifty.config import dependency_injector as gdi
from nifty import HPSpace, LMSpace
from slicing_transformation import SlicingTransformation
import lm_transformation_helper
from ....config import dependency_injector as gdi
from .... import HPSpace, LMSpace
from .slicing_transformation import SlicingTransformation
from . import lm_transformation_helper
pyHealpix = gdi.get('pyHealpix')
......
......@@ -16,14 +16,17 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from builtins import range
from builtins import object
import warnings
import numpy as np
from d2o import distributed_data_object, STRATEGIES
from nifty.config import dependency_injector as gdi
import nifty.nifty_utilities as utilities
from ....config import dependency_injector as gdi
from .... import nifty_utilities as utilities
from keepers import Loggable
from functools import reduce
fftw = gdi.get('fftw')
......
......@@ -16,10 +16,11 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from __future__ import division
import numpy as np
from transformation import Transformation
from rg_transforms import MPIFFT, SerialFFT
from nifty import RGSpace, nifty_configuration
from .transformation import Transformation
from .rg_transforms import MPIFFT, SerialFFT
from .... import RGSpace, nifty_configuration
class RGRGTransformation(Transformation):
......@@ -84,8 +85,8 @@ class RGRGTransformation(Transformation):
zerocenter = temp
# calculate the initialization parameters
distances = 1 / (np.array(domain.shape) *
np.array(domain.distances))
distances = 1. / (np.array(domain.shape) *
np.array(domain.distances))
new_space = RGSpace(domain.shape,
zerocenter=zerocenter,
......
......@@ -19,8 +19,8 @@
import abc
import numpy as np
import nifty.nifty_utilities as utilities
from transformation import Transformation
from .... import nifty_utilities as utilities
from .transformation import Transformation
class SlicingTransformation(Transformation):
......
......@@ -19,14 +19,14 @@
import abc
from keepers import Loggable
from future.utils import with_metaclass
class Transformation(Loggable, object):
class Transformation(with_metaclass(abc.ABCMeta, type('NewBase', (Loggable, object), {}))):
"""
A generic transformation which defines a static check_codomain
method for all transforms.
"""
__metaclass__ = abc.ABCMeta
def __init__(self, domain, codomain, module=None):
if codomain is None:
......
......@@ -16,6 +16,7 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from builtins import object
class _TransformationCache(object):
def __init__(self):
......
......@@ -16,4 +16,4 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from invertible_operator_mixin import InvertibleOperatorMixin
\ No newline at end of file
from .invertible_operator_mixin import InvertibleOperatorMixin
......@@ -16,6 +16,7 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from builtins import object
from nifty.minimization import ConjugateGradient
from nifty.field import Field
......
# -*- coding: utf-8 -*-
from laplace_operator import LaplaceOperator
from .laplace_operator import LaplaceOperator
......@@ -16,4 +16,4 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from linear_operator import LinearOperator
from .linear_operator import LinearOperator
......@@ -16,15 +16,17 @@
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik
# and financially supported by the Studienstiftung des deutschen Volkes.
from builtins import str
import abc
from nifty.nifty_meta import NiftyMeta
from keepers import Loggable
from nifty.field import Field
import nifty.nifty_utilities as utilities
from future.utils import with_metaclass
class LinearOperator(Loggable, object):
class LinearOperator(with_metaclass(NiftyMeta, type('NewBase', (Loggable, object), {}))):
"""NIFTY base class for linear operators.
The base NIFTY operator class is an abstract class from which
......@@ -70,8 +72,6 @@ class LinearOperator(Loggable, object):
"""
__metaclass__ = NiftyMeta
def __init__(self, default_spaces=None):
self._default_spaces = default_spaces
......
Supports Markdown
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