Ejemplo n.º 1
0
 def _get_envelope(self):
     if not self._envelope_valid:
         log.debug('recomputing _envelope')
         rise_time = self.get_current_value('rise_fall_time')
         ramp_n = int(rise_time*self.iface_behavior.fs)
         t = self._get_time()
         self._envelope = wave.generate_envelope(len(t), ramp_n)
         self._envelope_valid = True
     return self._envelope
 def _get_cos_envelope(self):
     if not self._cos_envelope_valid:
         log.debug('recomputing cos envelope')
         t = self._get_time()
         rise_time = self.get_current_value('rise_fall_time')
         rise_n = int(rise_time*self.iface_behavior.fs)
         duration_n = len(t)
         envelope = wave.generate_envelope(duration_n, rise_n) 
         self._cos_envelope = envelope
         self._cos_envelope_valid = True
     return self._cos_envelope