code: def calculate_exposure(self, duration):
          # type: (float) -> float
          
          exposure = duration - self.frequency_accuracy * duration / 1000000.0 - \
                     self.readout_time
          assert exposure > 0.0, \
              "Exposure time %s too small when deadtime taken into account" % (
                  exposure,)
          return exposure
docs: Calculate the exposure to set the detector to given the duration of
          the frame and the readout_time and frequency_accuracy