Bugfix: decompose units

This commit is contained in:
Lukas Klass 2020-06-08 11:36:04 +02:00
parent 3b337749b7
commit b48a00b9b2
1 changed files with 2 additions and 2 deletions

View File

@ -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)