From ac04f5725c9c3452ec6cbe8d398b11ecbb2a7fad Mon Sep 17 00:00:00 2001 From: NicoleJurjew Date: Sun, 19 May 2024 15:53:13 +0100 Subject: [PATCH] notebooks/PET/Solution_Snippets/DIY_OSEM_01_MLEM.py: bugfix in MLEM function --- notebooks/PET/Solution_Snippets/DIY_OSEM_01_MLEM.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/notebooks/PET/Solution_Snippets/DIY_OSEM_01_MLEM.py b/notebooks/PET/Solution_Snippets/DIY_OSEM_01_MLEM.py index b6fdea33..5152ef65 100644 --- a/notebooks/PET/Solution_Snippets/DIY_OSEM_01_MLEM.py +++ b/notebooks/PET/Solution_Snippets/DIY_OSEM_01_MLEM.py @@ -6,4 +6,6 @@ def MLEM(acquired_data, acq_model, initial_image, num_iterations): quotient.fill(numpy.nan_to_num(quotient.as_array())) mult_update = acq_model.backward(quotient)/sensitivity # A^t * quotient / A^t1 mult_update.fill(numpy.nan_to_num(mult_update.as_array())) + estimated_image *= mult_update + estimated_image.maximum(0) return estimated_image \ No newline at end of file