Train

class picodaq.stimulus.Train(pulse: Pulse, pulsecount: int | None = None, pulseperiod: Time = 0*s, duration: Time | None = None, perpulse: Deltas = <picodaq.stimulus.Deltas object>)

Representation of a train of pulses

Parameters:
  • pulse – The waveform to be used in the train.

  • pulsecount – The number of pulses in the train.

  • duration – The total duration of the train.

  • pulseperiod – The period between consecutive pulses.

  • perpulse – Changes to apply to parameters between pulses

For analog outputs, the pulse may be any of Pulse, Square, Sawtooth, Triangle, or Wave; for digital outputs, it may only be TTL. (To send a TTL pulse a an analog output, do not use the TTL shape; instead, use a Pulse with amplitude set to 5 V.)

Either the number of pulses must be specified (with pulsecount), or the total duration of the train (with duration), but not both. If duration is given, the pulse count is calculated for a tight fit. For instance, if the pulse period is 100 ms and each pulse has a duration of 20 ms, then specifying duration as 420 ms will yield 5 pulses.

The pulseperiod is measured start-to-start. If the pulseperiod is less than the duration of the pulse, the next pulse starts immediately after the previous one.

Deltas specified with perpulse are applied between pulses. That is: The first pulse and the following period are as stated; the second pulse and following period are modified by adding the deltas once; etc.

duration(tight: bool = False) Time

The duration of the train

Parameters:

tight – If true, the duration is measured to the end of the final pulse. Otherwise, it includes the (fictive) interval after the final pulse.