How to use the picoscope.ps3000a 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_ps3000a.py View on Github external
import matplotlib.pyplot as plt
import numpy as np
import time

from picoscope import ps3000a

SERIAL_NUM = 'AR911/011\x00'
ps = ps3000a.PS3000a(SERIAL_NUM)

# now = time.strftime("%Y%m%d_%H%M%S")
# filename = "sweep_" + now + ".swp"
# output_file = open(filename, "wb")

c = 3e8

# rapid block mode

ps.setChannel(channel="A", coupling="DC", VRange=1)

n_captures = 2300 * 3  # int(600 * 1.4)
sample_interval = 5 / 3e8
sample_duration = 1e3 * 2 / 3e8

ps.setSamplingInterval(sample_interval, sample_duration)
github colinoflynn / pico-python / examples / radar_capture_functions.py View on Github external
def disconnect(self):
        '''
        Closes the PicoScope API, releasing the oscilloscope.
        '''
        self.ps.close()


if __name__ == '__main__':
    import matplotlib.pyplot as plt
    # picoscope = reload(picoscope)
    from picoscope import ps3000a
    # ps3000a = reload(ps3000a)

    SERIAL_NUM = 'AR911/011\x00'
    ps = ps3000a.PS3000a(SERIAL_NUM)

    rscope = RadarScope(ps, max_range=1e3, range_resolution=5)

    rscope.capture_sweep()
    # rscope.to_file()
    # rscope.record(10, 5)

    plt.imshow(rscope.video_buffer, aspect="auto")
    plt.show()

    rscope.disconnect()