From a5bffb79c7380c47bcabd4efa098270d5fb5ba51 Mon Sep 17 00:00:00 2001 From: Lukas Platz Date: Wed, 8 Aug 2018 18:28:26 +0200 Subject: [PATCH] added signal and residual plot --- demos/getting_started_2.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/demos/getting_started_2.py b/demos/getting_started_2.py index bcceb54c..d8899083 100644 --- a/demos/getting_started_2.py +++ b/demos/getting_started_2.py @@ -43,7 +43,7 @@ if __name__ == '__main__': # # # One dimensional regular grid with uniform exposure # position_space = ift.RGSpace(1024) - # exposure = np.ones(position_space.shape) + # exposure = ift.Field.full(position_space, 1.) # Two-dimensional regular grid with inhomogeneous exposure position_space = ift.RGSpace([512, 512]) @@ -99,6 +99,10 @@ if __name__ == '__main__': H, convergence = minimizer(H) # Plot results - ift.plot(sky(H.position), title='Reconstruction') + signal = sky(mock_position) + reconst = sky(H.position) + ift.plot(signal, title='Signal') ift.plot(GR.adjoint(data), title='Data') + ift.plot(reconst, title='Reconstruction') + ift.plot(reconst - signal, title='Residuals') ift.plot_finish(name='getting_started_2.png', xsize=16, ysize=16) -- GitLab