Skip to content

Commit 72bca39

Browse files
author
neil.hamilton
committed
Update ps6000a examples time axis generation
1 parent d7693d1 commit 72bca39

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

ps6000aExamples/ps6000aBlockExample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
adc2mVChAMax = adc2mV(bufferAMax, channelRange, maxADC)
121121

122122
# Create time data
123-
time = np.linspace(0, (nSamples) * timeInterval.value * 1000000000, nSamples)
123+
time = np.linspace(0, (nSamples -1) * timeInterval.value * 1000000000, nSamples)
124124

125125
# plot data from channel A and B
126126
plt.plot(time, adc2mVChAMax[:])

ps6000aExamples/ps6000aBlockMSOExample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
bufferDPort0 = splitMSODataFast(noOfSamples, bufferDPort0Max)
149149

150150
# Create time data
151-
time = np.linspace(0, (nSamples) * timeInterval.value * 1000000000, nSamples)
151+
time = np.linspace(0, (nSamples -1) * timeInterval.value * 1000000000, nSamples)
152152

153153
# plot data from channel A and B
154154
plt.figure(num='Channel A Data')

ps6000aExamples/ps6000aRapidBlockExample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
adc2mVChAMax9 = adc2mV(bufferAMax9, channelRange, maxADC)
187187

188188
# Create time data
189-
time = np.linspace(0, (nSamples) * timeInterval.value * 1000000000, nSamples)
189+
time = np.linspace(0, (nSamples -1) * timeInterval.value * 1000000000, nSamples)
190190

191191
# plot data from channel A and B
192192
plt.plot(time, adc2mVChAMax[:])

0 commit comments

Comments
 (0)