Memory / Buffer Management
Bases: PicoScopeBase, Sharedps5000aPs6000a
PicoScope 5000 (A) API specific functions
Methods:
| Name | Description |
|---|---|
get_maximum_available_memory |
Return the maximum sample depth of the device. |
memory_segments |
Configure the number of memory segments that the PicoScope will use. |
set_data_buffer |
Allocate and assign NumPy-backed data buffers |
set_data_buffer_for_enabled_channels |
Sets data buffers for enabled channels set by picosdk.set_channel() |
set_data_buffer_rapid_capture |
Allocates and assigns multiple data buffers for rapid block capture on a specified channel. |
set_data_buffers |
Allocate and assign max and min NumPy-backed data buffers |
set_unscaled_data_buffer |
Allocate and assign a NumPy-backed int8 data buffer using the driver's |
set_unscaled_data_buffers |
Allocate and assign max and min NumPy-backed int8 data buffers using |
get_maximum_available_memory()
Return the maximum sample depth of the device.
The ps5000a API has no GetMaximumAvailableMemory call; this queries MemorySegments with a single segment, which reports the full capture memory at the current resolution. Unlike the ps6000a/psospa query, this is a settings change: it (re)configures the device to 1 memory segment and discards any previously captured data. Do not call it while a capture or stream is in progress.
| Returns: |
|
|---|
| Raises: |
|
|---|
memory_segments(n_segments)
Configure the number of memory segments that the PicoScope will use.
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_data_buffer(channel, samples, segment=0, datatype=None, ratio_mode=cst.RATIO_MODE.NONE, action=None, buffer=None)
Allocate and assign NumPy-backed data buffers
| Parameters: |
|
|---|
| Returns: |
|
|---|
Note
samples=0 clears the registration, but only for this channel/segment/ratio_mode — unlike ACTION.CLEAR_ALL on other drivers, which clears every registered buffer.
set_data_buffer_for_enabled_channels(samples, segment=0, datatype=cst.DATA_TYPE.INT16_T, ratio_mode=cst.RATIO_MODE.RAW, clear_buffer=False, captures=0)
Sets data buffers for enabled channels set by picosdk.set_channel()
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_data_buffer_rapid_capture(channel, samples, captures, segment=0, datatype=DATA_TYPE.INT16_T, ratio_mode=RATIO_MODE.RAW, action=ACTION.CLEAR_ALL | ACTION.ADD)
Allocates and assigns multiple data buffers for rapid block capture on a specified channel.
| Parameters: |
|
|---|
| Returns: |
|
|---|
| Raises: |
|
|---|
set_data_buffers(channel, samples, segment=0, datatype=None, ratio_mode=cst.RATIO_MODE.AGGREGATE, action=None, buffers=None)
Allocate and assign max and min NumPy-backed data buffers
| Parameters: |
|
|---|
| Returns: |
|
|---|
Note
samples=0 clears the registration, but only for this channel/segment/ratio_mode — unlike ACTION.CLEAR_ALL on other drivers, which clears every registered buffer.
set_unscaled_data_buffer(channel, samples, segment=0, ratio_mode=cst.RATIO_MODE.NONE, buffer=None)
Allocate and assign a NumPy-backed int8 data buffer using the driver's
native unscaled 8-bit transfer path (ps5000aSetUnscaledDataBuffers).
At 8-bit resolution this halves the USB bandwidth and host memory per sample compared with the standard int16 path. The driver delivers raw 8-bit ADC codes with no scaling applied.
| Parameters: |
|
|---|
| Returns: |
|
|---|
set_unscaled_data_buffers(channel, samples, segment=0, ratio_mode=cst.RATIO_MODE.AGGREGATE, buffers=None)
Allocate and assign max and min NumPy-backed int8 data buffers using
the driver's native unscaled 8-bit transfer path
(ps5000aSetUnscaledDataBuffers).
| Parameters: |
|
|---|
| Returns: |
|
|---|