sendCustomPulseTrain()
Description
Sends a sequence of onset times and voltages describing a train of pulses.
- The train can be mapped to any output channel by specifying a custom train ID in the output channel's parameters. 
- Two custom trains can be created, with 1,000 pulses each (PulsePal r0.4). 
- While this function allows custom onset times, the duration of each pulse in the custom train is set by adjusting each output channel's parameters. 
- Pulses that are continuous or overlapping will merge (see the Parameter guide). 
- If set to biphasic pulses, the voltage specified for each pulse is sign-inverted for the second phase (i.e. if +5V for phase 1, -5V is used automatically for phase 2). 
Syntax
sendCustomPulseTrain(customTrainID, pulseTimes, pulseVoltages)
Parameters
- customTrainID: The custom pulse train to program (1 or 2) 
- pulseTimes: An array of pulse onset times in seconds (datatype = list) 
- pulseVoltages: An array containing one voltage for each pulse (datatype = list) 
Returns
None
Example
pulseTimes = [0, 0.2, 0.5, 1] # Create an array of pulse times in seconds
voltages = [8,4,-3.5,-10] # Create an array of pulse voltages in volts
myPulsePal.programOutputChannelParam('customTrainID', 1, 2) # Set output ch1 to use custom train 2
myPulsePal.sendCustomPulseTrain(2, pulseTimes, voltages) # Send arrays to PulsePal, defined as custom train 2
myPulsePal.triggerOutputChannels(1, 0, 0, 0) # Soft-trigger output channel 1 to play its pulse train