Commit df6bc849 authored by Philipp Arras's avatar Philipp Arras
Browse files

Rename signal covariance to Sh

When reading through this demo it was not immediately clear to me that S
operates on the h_space and not on s_space. Since the Fourier transform of the
signal field is called `sh`, I adopted the same notation for the operator S.
parent ef50508c
......@@ -9,19 +9,22 @@ comm = MPI.COMM_WORLD
rank = comm.rank
# Note that the constructor of PropagatorOperator takes as arguments the
# response R and noise covariance N operating on signal space and signal
# covariance operating on harmonic space.
class PropagatorOperator(InvertibleOperatorMixin, EndomorphicOperator):
def __init__(self, R, N, S, default_spaces=None):
def __init__(self, R, N, Sh, default_spaces=None):
super(PropagatorOperator, self).__init__(default_spaces=default_spaces)
self.R = R
self.N = N
self.S = S
self.fft = FFTOperator(R.domain, target=S.domain)
self.Sh = Sh
self.fft = FFTOperator(R.domain, target=Sh.domain)
self._domain = R.domain
def _inverse_times(self, x, spaces, x0=None):
return self.R.adjoint_times(self.N.inverse_times(self.R(x))) \
+ self.fft.adjoint_times(self.S.inverse_times(self.fft(x)))
+ self.fft.adjoint_times(self.Sh.inverse_times(self.fft(x)))
def domain(self):
......@@ -73,8 +76,8 @@ if __name__ == "__main__":
# Create mock data
S = create_power_operator(h_space, power_spectrum=pow_spec,
Sh = create_power_operator(h_space, power_spectrum=pow_spec,
sp = Field(p_space, val=pow_spec,
......@@ -95,6 +98,6 @@ if __name__ == "__main__":
# Wiener filter
j = R.adjoint_times(N.inverse_times(d))
D = PropagatorOperator(S=S, N=N, R=R)
D = PropagatorOperator(Sh=Sh, N=N, R=R)
m = D(j)
Supports Markdown
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