Commit 2a489298 authored by Philipp Arras's avatar Philipp Arras

Formatting

parent 455439b4
Pipeline #70599 passed with stages
in 17 minutes and 7 seconds
......@@ -649,7 +649,6 @@ class Field(object):
scalar
The result of the operation.
"""
from .sugar import sqrt
if self.scalar_weight() is not None:
return self._val.std()
return np.sqrt(self.s_var())
......
......@@ -36,7 +36,7 @@ from ..operators.endomorphic_operator import EndomorphicOperator
from ..operators.harmonic_operators import HarmonicTransformOperator
from ..operators.linear_operator import LinearOperator
from ..operators.operator import Operator
from ..operators.simple_linear_operators import FieldAdapter, ducktape
from ..operators.simple_linear_operators import ducktape
from ..probing import StatCalculator
from ..sugar import full, makeDomain, makeField, makeOp
......@@ -410,11 +410,9 @@ class CorrelatedFieldMaker:
raise ValueError("length of dofdex needs to match total_N")
if self._total_N > 0:
space = 1
N = max(dofdex) + 1
position_space = makeDomain((UnstructuredDomain(N), position_space))
else:
space = 0
N = 0
position_space = makeDomain(position_space)
prefix = str(prefix)
......@@ -633,9 +631,9 @@ class CorrelatedFieldMaker:
space = space + spaces[0]
sub_spaces = set(spaces)
sub_spaces.remove(space)
#Domain containing domain[space] and domain[0] iff total_N>0
# Domain containing domain[space] and domain[0] iff total_N>0
sub_dom = makeDomain([samples[0].domain[ind]
for ind in (set([0,])-set(spaces))|set([space,])])
for ind in (set([0])-set(spaces)) | set([space])])
co = ContractionOperator(sub_dom, len(sub_dom)-1)
size = co.domain.size/co.target.size
res = 0.
......
......@@ -148,14 +148,3 @@ class ChainOperator(LinearOperator):
c_inp, t_op = op.simplify_for_constant_input(c_inp)
newop = t_op if newop is None else op(newop)
return c_inp, newop
# def draw_sample(self, from_inverse=False, dtype=np.float64):
# from ..sugar import from_random
# if len(self._ops) == 1:
# return self._ops[0].draw_sample(from_inverse, dtype)
#
# samp = from_random(random_type="normal", domain=self._domain,
# dtype=dtype)
# for op in self._ops:
# samp = op.process_sample(samp, from_inverse)
# return samp
......@@ -29,7 +29,7 @@ from .operator import Operator
from .sampling_enabler import SamplingEnabler
from .sandwich_operator import SandwichOperator
from .scaling_operator import ScalingOperator
from .simple_linear_operators import FieldAdapter, VdotOperator
from .simple_linear_operators import VdotOperator
class EnergyOperator(Operator):
......
......@@ -17,7 +17,7 @@
import numpy as np
from .. import utilities, fft
from .. import fft, utilities
from ..domain_tuple import DomainTuple
from ..domains.gl_space import GLSpace
from ..domains.lm_space import LMSpace
......@@ -248,7 +248,6 @@ class SHTOperator(LinearOperator):
def _apply_spherical(self, x, mode):
axes = x.domain.axes[self._space]
axis = axes[0]
v = x.val
p2h = not x.domain[self._space].harmonic
......
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