From 0ea0dce4f2888d975812c32fc88459c29852c9ab Mon Sep 17 00:00:00 2001 From: Joschka Date: Mon, 7 Aug 2023 10:41:20 +0200 Subject: [PATCH] Correct declaration of numerator and denominator in get_OD() --- Analyser/ImagingAnalyser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Analyser/ImagingAnalyser.py b/Analyser/ImagingAnalyser.py index 488e68c..e818fb2 100644 --- a/Analyser/ImagingAnalyser.py +++ b/Analyser/ImagingAnalyser.py @@ -208,12 +208,12 @@ class ImageAnalyser(): :rtype: numpy array """ - numerator = np.atleast_1d(imageBackground - imageDrak) - denominator = np.atleast_1d(imageAtom - imageDrak) + denominator = np.atleast_1d(imageBackground - imageDrak) + numerator = np.atleast_1d(imageAtom - imageDrak) - numerator[numerator == 0] = 1 denominator[denominator == 0] = 1 - imageOD = np.abs(np.divide(denominator, numerator)) + numerator[numerator == 0] = 1 + imageOD = np.abs(np.divide(numerator, denominator)) imageOD= -np.log(imageOD) if len(imageOD) == 1: