From b48a00b9b2e9f029c1642a7451f483bd6bc063c3 Mon Sep 17 00:00:00 2001 From: LukasK13 Date: Mon, 8 Jun 2020 11:36:04 +0200 Subject: [PATCH] Bugfix: decompose units --- esbo_etc/classes/sensor/Imager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esbo_etc/classes/sensor/Imager.py b/esbo_etc/classes/sensor/Imager.py index a27400f..312d809 100644 --- a/esbo_etc/classes/sensor/Imager.py +++ b/esbo_etc/classes/sensor/Imager.py @@ -425,10 +425,10 @@ class Imager(ASensor): # Calculate the electron current of the background and thereby handling the photon energy as lambda-function background_current = ( background_photon_current / (lambda wl: (const.h * const.c / wl).to(u.W * u.s) / u.photon) * - self.__quantum_efficiency).integrate() + self.__quantum_efficiency).integrate().decompose() # Calculate the electron current of the signal and thereby handling the photon energy as lambda-function signal_current = (signal_photon_current / (lambda wl: (const.h * const.c / wl).to(u.W * u.s) / u.photon) * - self.__quantum_efficiency).integrate() + self.__quantum_efficiency).integrate().decompose() logger.debug("Signal current: %1.2e e-/s" % signal_current.value) logger.debug("Target size: " + size) logger.debug("Obstruction: %.2f" % obstruction)