wiener_filter_curvature.py 1.46 KB
Newer Older
1
2
from ...operators import EndomorphicOperator,\
                         InvertibleOperatorMixin
3

Martin Reinecke's avatar
PEP8  
Martin Reinecke committed
4

5
class WienerFilterCurvature(InvertibleOperatorMixin, EndomorphicOperator):
Jakob Knollmueller's avatar
Jakob Knollmueller committed
6
7
8
9
    """The curvature of the WienerFilterEnergy.

    This operator implements the second derivative of the
    WienerFilterEnergy used in some minimization algorithms or
10
11
    for error estimates of the posterior maps. It is the
    inverse of the propagator operator.
Jakob Knollmueller's avatar
Jakob Knollmueller committed
12
13
14
15

    Parameters
    ----------
    R: LinearOperator,
Martin Reinecke's avatar
Martin Reinecke committed
16
17
18
       The response operator of the Wiener filter measurement.
    N: EndomorphicOperator
       The noise covariance.
Jakob Knollmueller's avatar
Jakob Knollmueller committed
19
    S: DiagonalOperator,
Martin Reinecke's avatar
Martin Reinecke committed
20
       The prior signal covariance
Jakob Knollmueller's avatar
Jakob Knollmueller committed
21
22
    """

23
    def __init__(self, R, N, S, inverter, preconditioner=None, **kwargs):
24
25
26
        self.R = R
        self.N = N
        self.S = S
27
28
29
30
31
32
        if preconditioner is None:
            preconditioner = self.S.times
        super(WienerFilterCurvature, self).__init__(
                                                 inverter=inverter,
                                                 preconditioner=preconditioner,
                                                 **kwargs)
33

34
35
    @property
    def domain(self):
Martin Reinecke's avatar
Martin Reinecke committed
36
        return self.S.domain
37
38
39
40
41
42
43
44
45

    @property
    def self_adjoint(self):
        return True

    @property
    def unitary(self):
        return False

46
    def _times(self, x):
Martin Reinecke's avatar
Martin Reinecke committed
47
48
49
        res = self.R.adjoint_times(self.N.inverse_times(self.R(x)))
        res += self.S.inverse_times(x)
        return res