Exemplo n.º 1
0
 def exposure(self, exposure: Q_):
     self.logger.info(f'Setting exposure to {exposure}')
     try:
         if not isinstance(exposure, Q_):
             exposure = Q_(exposure)
         self._driver.ExposureTime.SetValue(exposure.m_as('us'))
         exposure = float(self._driver.ExposureTime.ToString()) * Q_('us')
         self.config.upgrade({'exposure': exposure})
     except _genicam.TimeoutException:
         self.logger.error(f'Timed out setting the exposure to {exposure}')
Exemplo n.º 2
0
 def set_exposure(self, exposure: Q_) -> Q_:
     self.camera.ExposureTime.SetValue(exposure.m_as('us'))
     self.exposure = exposure
     return self.get_exposure()