Skip to content
Snippets Groups Projects
Commit 30f8f70c authored by Philipp Arras's avatar Philipp Arras
Browse files

Fixup in SlopeOperator

parent 2d3f070c
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,7 @@ def get_random_LOS(n_los):
if __name__ == '__main__':
# FIXME description of the tutorial
np.random.seed(42)
np.seterr(all='raise')
position_space = ift.RGSpace([128, 128])
# Setting up an amplitude model
......@@ -81,7 +82,7 @@ if __name__ == '__main__':
# build model Hamiltonian
H = ift.Hamiltonian(likelihood, ic_sampling)
INITIAL_POSITION = ift.from_random('normal', domain)
INITIAL_POSITION = ift.full(H.domain, 0.)
position = INITIAL_POSITION
plot = ift.Plot()
......
......@@ -81,5 +81,5 @@ class SlopeOperator(LinearOperator):
xglob = x.to_global_data()
res[-1] = np.sum(xglob[1:])
for i in range(self.ndim):
res[i] = np.sum((self.pos[i] * xglob)[1:])
res[i] = np.sum(self.pos[i][1:] * xglob[1:])
return Field.from_global_data(self.domain, res)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment