Skip to content

Commit 7fd9b80

Browse files
author
neil.hamilton
committed
Update ps6000 examples time axis generation
1 parent 72bca39 commit 7fd9b80

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

ps6000Examples/ps6000BlockAdvancedTriggerExample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
adc2mVChAMax = adc2mV(bufferAMax, chARange, maxADC)
160160

161161
# Create time data
162-
time = np.linspace(0, (cmaxSamples.value) * timeIntervalns.value, cmaxSamples.value)
162+
time = np.linspace(0, (cmaxSamples.value -1) * timeIntervalns.value, cmaxSamples.value)
163163

164164
# plot data from channel A
165165
plt.plot(time, adc2mVChAMax[:])

ps6000Examples/ps6000BlockExample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
adc2mVChBMax = adc2mV(bufferBMax, chBRange, maxADC)
143143

144144
# Create time data
145-
time = np.linspace(0, (cmaxSamples.value) * timeIntervalns.value, cmaxSamples.value)
145+
time = np.linspace(0, (cmaxSamples.value -1) * timeIntervalns.value, cmaxSamples.value)
146146

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

ps6000Examples/ps6000RapidBlockExample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
adc2mVChAMax9 = adc2mV(bufferAMax9, chARange, maxADC)
290290

291291
# Creates the time data
292-
time = np.linspace(0, (cmaxSamples.value) * timeIntervalns.value, cmaxSamples.value)
292+
time = np.linspace(0, (cmaxSamples.value -1) * timeIntervalns.value, cmaxSamples.value)
293293

294294
# Plots the data from channel A onto a graph
295295
plt.plot(time, adc2mVChAMax[:])

ps6000Examples/ps6000RapidBlockTriggerTimestampExample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
adc2mVChAMax9 = adc2mV(bufferAMax9, chARange, maxADC)
290290

291291
# Creates the time data
292-
time = np.linspace(0, (cmaxSamples.value) * timeIntervalns.value, cmaxSamples.value)
292+
time = np.linspace(0, (cmaxSamples.value -1) * timeIntervalns.value, cmaxSamples.value)
293293

294294
"""# Plots the data from channel A onto a graph
295295
plt.plot(time, adc2mVChAMax[:])

ps6000Examples/ps6000StreamingExample.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def streaming_callback(handle, noOfSamples, startIndex, overflow, triggerAt, tri
170170
adc2mVChBMax = adc2mV(bufferCompleteB, channel_range, maxADC)
171171

172172
# Create time data
173-
time = np.linspace(0, (totalSamples) * actualSampleIntervalNs, totalSamples)
173+
time = np.linspace(0, (totalSamples -1) * actualSampleIntervalNs, totalSamples)
174174

175175
# Plot data from channel A and B
176176
plt.plot(time, adc2mVChAMax[:])

0 commit comments

Comments
 (0)