Commit 7d518e49 authored by Philipp Arras's avatar Philipp Arras

Cleanup and cosmetics in core files

parent a78e1e01
Pipeline #52939 passed with stages
in 8 minutes and 9 seconds
......@@ -109,7 +109,6 @@ class Linearization(object):
return self._metric
def __getitem__(self, name):
from .operators.simple_linear_operators import ducktape
return self.new(self._val[name], self._jac.ducktape_left(name))
def __neg__(self):
......
......@@ -15,19 +15,16 @@
#
# NIFTy is being developed at the Max-Planck-Institut fuer Astrophysik.
import numpy as np
from ..domains.rg_space import RGSpace
from ..domains.lm_space import LMSpace
from ..domains.hp_space import HPSpace
from .. import utilities
from ..domain_tuple import DomainTuple
from ..domains.gl_space import GLSpace
from ..domains.hp_space import HPSpace
from ..domains.rg_space import RGSpace
from .diagonal_operator import DiagonalOperator
from .endomorphic_operator import EndomorphicOperator
from .harmonic_operators import HarmonicTransformOperator
from .diagonal_operator import DiagonalOperator
from .simple_linear_operators import WeightApplier
from ..domain_tuple import DomainTuple
from ..field import Field
from .. import utilities
def FuncConvolutionOperator(domain, func, space=None):
......
......@@ -23,7 +23,6 @@ from ..sugar import domain_union
from ..utilities import indent
from .block_diagonal_operator import BlockDiagonalOperator
from .linear_operator import LinearOperator
from .simple_linear_operators import NullOperator
class SumOperator(LinearOperator):
......
......@@ -157,7 +157,6 @@ def _rgb_data(spectral_cube):
xyz_data /= xyz_data.max()
xyz_data = to_logscale(xyz_data, max(1e-3, xyz_data.min()), 1.)
rgb_data = xyz_data.copy()
it = np.nditer(xyz_data[:, 0], flags=['multi_index'])
for x in range(xyz_data.shape[0]):
rgb_data[x] = _gammacorr(np.matmul(MATRIX_SRGB_D65, xyz_data[x]))
rgb_data = rgb_data.clip(0., 1.)
......
......@@ -240,6 +240,8 @@ def special_add_at(a, axis, index, b):
_iscomplex_tpl = (np.complex64, np.complex128)
def iscomplextype(dtype):
return dtype.type in _iscomplex_tpl
......
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