Skip to content

Commit

Permalink
use 3x3 matrix in MLEM example
Browse files Browse the repository at this point in the history
  • Loading branch information
gschramm committed Jan 7, 2024
1 parent 86a37c7 commit ceee08e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/05_algorithms/demo_01_mlem.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@

# %%

A = xp.asarray([[1, 4], [3, 2]], dtype=xp.float64, device=dev)
A = xp.asarray([[1, 4, 2], [3, 2, 5], [0, 1, 4]], dtype=xp.float64, device=dev)

op = parallelproj.MatrixOperator(A)

x_true = xp.asarray([5.5, 10.5], dtype=xp.float64, device=dev)
x_true = xp.asarray([5.5, 10.7, 8.2], dtype=xp.float64, device=dev)

noise_free_data = op(x_true)

Expand All @@ -52,7 +52,7 @@

# noisy_data = xp.floor(noise_free_data)

contamination = xp.asarray([0.1, 0.1], dtype=xp.float64, device=dev)
contamination = xp.asarray([0.1, 0.1, 0.1], dtype=xp.float64, device=dev)

# %%

Expand All @@ -63,7 +63,7 @@
exp_ref = op(x_ref) + contamination
cost_ref = float(xp.sum(exp_ref - noisy_data * xp.log(exp_ref)))
# %%
num_iter = 500
num_iter = 1000

x = xp.ones(op.in_shape, dtype=xp.float64, device=dev)
ones_back = op.adjoint(xp.ones(op.out_shape, dtype=xp.float64, device=dev))
Expand Down

0 comments on commit ceee08e

Please sign in to comment.