View¶
-
class
joulescope.view.View(stream_buffer, calibration)[source]¶ -
property
calibration¶ The device calibration.
-
property
limits¶ Get the (x_min, x_max) limits for the view.
-
ping(*args, **kwargs)[source]¶ Ping the thread.
- Parameters
args – The positional arguments.
kwargs – The keyword arguments.
- Returns
(args, kwargs) after passing through the thread.
-
samples_get(start=None, stop=None, units=None, fields=None)[source]¶ Get exact samples over a range.
- Parameters
start – The starting time.
stop – The ending time.
units – The units for start and stop. ‘seconds’ or None is in floating point seconds relative to the view. ‘samples’ is in stream buffer sample indicies.
fields – The fields to get. None (default) gets the fundamental fields available for this view instance, which may vary depending upon the backend.
-
property
sampling_frequency¶ The output sampling frequency.
-
start(stream_buffer: joulescope.stream_buffer.StreamBuffer)[source]¶ Start streaming.
-
statistics_get(start=None, stop=None, units=None, callback=None)[source]¶ Get statistics over a range.
- Parameters
start – The starting time.
stop – The ending time.
units – The units for start and stop. ‘seconds’ or None is in floating point seconds relative to the view. ‘samples’ is in stream buffer sample indices.
callback – The optional callable. When provided, this method will not block and the callable will be called with the statistics data structure from the view thread.
- Returns
The statistics data structure or None if callback is provided.
Note: this same format is used by the
Driver.statistics_callback_register(). See the statistics documentation for details on the data format.
-
property