Module: secbench.picoscope

The secbench.picoscope module contains drivers for Picoscope oscilloscopes.

This module requires Picoscope libraries to be installed. You can install the PicoSDK or simply

The package requires to have in your library path:

Note

On Linux, we recommend to set the correct permissions on the USB ports to avoid running scripts as root. You can add the following line in /lib/udev/rules.d/99-secbench.rules:

SUBSYSTEMS=="usb", ATTRS{idVendor}=="0ce9", MODE="0660", GROUP="plugdev"

Make sure you are in the plugdev group.

Usage

Once everything is installed and a scope is connected to your computer, you should be able to load a device with:

from secbench.api import get_bench

bench = get_bench()
scope = bench.get_scope()
print(scope)

The secbench.api automatically tries to import secbench.picoscope so that the devices are discoverable.

Supported models

class PicoPS2000AScope
__init__(serial_number=None)
classmethod is_supported(hardware_info)

Test if this class can be discovered.

This is useful for instruments that are platform-specific.

classmethod discover(hw_info)

Return a generator of possible instantiations of the class.

Parameters:

hardware_info – information that can be used by implementors for checking hardware availability.

Returns:

a generator of valid arguments that can be passed to Discoverable.build() for constructing instances.

classmethod build(hardware_info, serial_number)

Instantiate the hardware using specific parameters returned by discover.

property description

The self-description of this instrument. This is typically a string representation of the device serial number.

>>> scope.description
"1329.7002K14-100654-Hn"
channels()

Return a mapping of analog channels available.

class PicoPS6000Scope
__init__(serial_number=None)
classmethod is_supported(hardware_info)

Test if this class can be discovered.

This is useful for instruments that are platform-specific.

classmethod discover(hw_info)

Return a generator of possible instantiations of the class.

Parameters:

hardware_info – information that can be used by implementors for checking hardware availability.

Returns:

a generator of valid arguments that can be passed to Discoverable.build() for constructing instances.

classmethod build(hardware_info, serial_number)

Instantiate the hardware using specific parameters returned by discover.

property description

The self-description of this instrument. This is typically a string representation of the device serial number.

>>> scope.description
"1329.7002K14-100654-Hn"
channels()

Return a mapping of analog channels available.