Data Retrieval
Bases: PicoScopeBase, shared_ps6000a_psospa, shared_4000a_6000a
PicoScope 6000 (A) API specific functions
Methods:
| Name | Description |
|---|---|
get_time_axis |
Return an array of time values based on the timebase and number |
get_values |
Retrieves a block of captured samples from the device once it's ready. |
get_values_bulk |
Retrieve data from multiple memory segments. |
get_values_bulk_async |
Begin asynchronous retrieval of values from multiple segments. |
get_values_overlapped |
Retrieve overlapped data from multiple segments for block or rapid block mode. |
is_over_range |
Logs and prints a warning if any channel has been over range. |
is_ready |
Blocks execution until the PicoScope device is ready. |
no_of_streaming_values |
Return the number of values currently available while streaming. |
stop_using_get_values_overlapped |
Terminate overlapped capture mode. |
get_time_axis(timebase, samples, pre_trig_percent=None, unit='ns', ratio=0)
Return an array of time values based on the timebase and number of samples
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_values(samples, start_index=0, segment=0, ratio=0, ratio_mode=RATIO_MODE.RAW)
Retrieves a block of captured samples from the device once it's ready. If a channel goes over-range a warning will appear.
This function should be called after confirming the device is ready using is_ready().
It invokes the underlying PicoSDK GetValues function to read the data into memory.
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_values_bulk(start_index, no_of_samples, from_segment_index, to_segment_index, down_sample_ratio, down_sample_ratio_mode)
Retrieve data from multiple memory segments.
| Parameters: |
|
|---|
| Returns: |
|
|---|
get_values_bulk_async(start_index, no_of_samples, from_segment_index, to_segment_index, down_sample_ratio, down_sample_ratio_mode, lp_data_ready, p_parameter)
Begin asynchronous retrieval of values from multiple segments.
| Parameters: |
|
|---|
get_values_overlapped(start_index, no_of_samples, down_sample_ratio, down_sample_ratio_mode, from_segment_index, to_segment_index, overflow)
Retrieve overlapped data from multiple segments for block or rapid block mode.
Call this method before :meth:run_block_capture to defer the data
retrieval request. The driver validates and performs the request when
:meth:run_block_capture runs, which avoids the extra communication that
occurs when calling :meth:run_block_capture followed by
:meth:get_values. After the capture completes you can call
:meth:get_values again to retrieve additional copies of the data.
Stop further captures with :meth:stop_using_get_values_overlapped and
check progress using :meth:ps6000a.PicoScope.get_no_of_processed_captures.
| Parameters: |
|
|---|
| Returns: |
|
|---|
Examples:
>>> samples = scope.get_values_overlapped(
... start_index=0, # read from start of buffer
... no_of_samples=1024, # copy 1024 samples
... down_sample_ratio=1, # no downsampling
... down_sample_ratio_mode=RATIO_MODE.RAW,
... from_segment_index=0, # first segment only
... to_segment_index=0,
... )
>>> scope.run_block_capture(timebase=1, samples=1024)
>>> data = scope.get_values(samples=1024)
>>> samples, scope.over_range
(1024, 0)
is_over_range()
Logs and prints a warning if any channel has been over range.
The :attr:over_range attribute stores a bit mask updated by data
retrieval methods like :meth:get_values and
:meth:get_values_overlapped. Calling this method logs a warning if
any channel went over range and returns a list of the affected
channel names.
| Returns: |
|
|---|
is_ready()
Blocks execution until the PicoScope device is ready.
Continuously calls the PicoSDK IsReady function in a loop, checking if
the device is prepared to proceed with data acquisition.
| Returns: |
|
|---|
no_of_streaming_values()
Return the number of values currently available while streaming.
stop_using_get_values_overlapped()
Terminate overlapped capture mode.
Call this when overlapped captures are complete to release any
resources allocated by :meth:get_values_overlapped.