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, orWave; for digital outputs, it may only beTTL. (To send a TTL pulse a an analog output, do not use theTTLshape; instead, use aPulsewith 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.
Deltasspecified 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.