wiener_filter_curvature.py 1.54 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
16
17
18
19
20
21
22
23
24


    Parameters
    ----------
    R: LinearOperator,
        The response operator of the Wiener filter measurement.
    N : EndomorphicOperator
        The noise covariance.
    S: DiagonalOperator,
        The prior signal covariance

    """

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

37
38
39
40
41
42
43
44
45
46
47
48
49
50
    @property
    def domain(self):
        return self._domain

    @property
    def self_adjoint(self):
        return True

    @property
    def unitary(self):
        return False

    # ---Added properties and methods---

51
    def _times(self, x):
Martin Reinecke's avatar
Martin Reinecke committed
52
53
54
        res = self.R.adjoint_times(self.N.inverse_times(self.R(x)))
        res += self.S.inverse_times(x)
        return res