Commit 42413ccc authored by Lukas Platz's avatar Lukas Platz
Browse files

added __repr__ methods to _FunctionApplier, _Amplitude and _LognormalMomentMatching

parent 533fcc7e
Pipeline #75816 passed with stages
in 13 minutes and 41 seconds
......@@ -129,6 +129,7 @@ class _LognormalMomentMatching(Operator):
op = _normal(logmean, logsig, key, N_copies).ptw("exp")
self._domain, self._target = op.domain, op.target
self.apply = op.apply
self._repr_str = f"_LognormalMomentMatching: " + op.__repr__()
@property
def mean(self):
......@@ -138,6 +139,9 @@ class _LognormalMomentMatching(Operator):
def std(self):
return self._sig
def __repr__(self):
return self._repr_str
class _SlopeRemover(EndomorphicOperator):
def __init__(self, domain, space=0):
......@@ -346,11 +350,15 @@ class _Amplitude(Operator):
self.apply = op.apply
self._domain, self._target = op.domain, op.target
self._space = space
self._repr_str = "_Amplitude: " + op.__repr__()
@property
def fluctuation_amplitude(self):
return self._fluc
def __repr__(self):
return self._repr_str
class CorrelatedFieldMaker:
"""Constrution helper for hirarchical correlated field models.
......
......@@ -362,6 +362,9 @@ class _FunctionApplier(Operator):
self._check_input(x)
return x.ptw(self._funcname, *self._args, **self._kwargs)
def __repr__(self):
return f"_FunctionApplier ('{self._funcname}')"
class _CombinedOperator(Operator):
def __init__(self, ops, _callingfrommake=False):
......
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