How to use the picoscope.ps4000a function in picoscope

To help you get started, we’ve selected a few picoscope examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github colinoflynn / pico-python / examples / test_ps4000a.py View on Github external
from picoscope import ps4000a
import matplotlib.pyplot as plt
import numpy as np
import time

ps = ps4000a.PS4000a()

# rapid block mode

ps.setChannel(channel="A", coupling="DC", VRange=1)
ps.setChannel(channel="B", enabled=False)
ps.setChannel(channel="C", enabled=False)
ps.setChannel(channel="D", enabled=False)

n_captures = 100
sample_interval = 100e-9  # 100 ns
sample_duration = 2e-3  # 1 ms
ps.setResolution('12')  # Resolution can only be set on the PS4444
ps.setSamplingInterval(sample_interval, sample_duration)
ps.setSimpleTrigger("A", threshold_V=0.1, timeout_ms=1)

samples_per_segment = ps.memorySegments(n_captures)