API Reference v9.2.0
OscilloscopeDataclass
Module: zaber_motion.ascii
Contains a block of contiguous recorded data for one channel of the device's oscilloscope.
The following example illustrates how you can obtain an instance of this type:
from zaber_motion.ascii import Connection
connection = Connection.open_serial_port('COM3')
device = connection.get_device(1)
oscilloscope = device.oscilloscope
oscilloscope_data = oscilloscope.read()Related Guides:
Index
Properties
p
p
oscilloscope_data.data_sourceOscilloscopeDataSource Indicates whether the data came from a setting or an I/O pin.p
Methods
m
oscilloscope_data.get_data(unit = Units.NATIVE)Get the recorded data as an array of doubles, with optional unit conversion. Note that not all quantities can be unit converted. For example, digital I/O channels and pure numbers such as device mode settings have no units.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | UnitsAndLiterals | Unit of measure to convert the data to. |
Return Value
List[float] The recorded data for one oscilloscope channel, converted to the units specified.m
oscilloscope_data.get_delay(unit = Units.NATIVE)Get the user-specified time period between receipt of the start command and the first data point. Under some circumstances, the actual delay may be different - call GetSampleTime(0) to get the effective delay.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | TimeUnits | Unit of measure to represent the delay in. |
Return Value
float The delay setting at the time the data was recorded.m
oscilloscope_data.get_frequency(unit = Units.NATIVE)Get the sampling frequency that this data was recorded with.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | FrequencyUnits | Unit of measure to represent the frequency in. |
Return Value
float The frequency (inverse of the timebase setting) at the time the data was recorded.m
oscilloscope_data.get_sample_time(index, unit = Units.NATIVE)Calculate the time a sample was recorded, relative to when the recording was triggered.
Arguments
| Name | Type | Description |
|---|---|---|
| index | int | 0-based index of the sample to calculate the time of. |
| unit | TimeUnits | Unit of measure to represent the calculated time in. |
Return Value
float The calculated time offset of the data sample at the given index.m
oscilloscope_data.get_sample_times(unit = Units.NATIVE)Calculate the time for all samples, relative to when the recording was triggered.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | TimeUnits | Unit of measure to represent the calculated time in. |
Return Value
List[float] The calculated time offsets of all data samples.m
oscilloscope_data.get_timebase(unit = Units.NATIVE)Get the sample interval that this data was recorded with.
Arguments
| Name | Type | Description |
|---|---|---|
| unit | TimeUnits | Unit of measure to represent the timebase in. |
Return Value
float The timebase setting at the time the data was recorded.