Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/analog_in/voltage_acq_int_clk_wfm.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
waveform = task.read_waveform()
print(f"Acquired data: {waveform.scaled_data}")
print(f"Channel name: {waveform.channel_name}")
print(f"Unit description: {waveform.unit_description}")
print(f"Units: {waveform.units}")
print(f"t0: {waveform.timing.start_time}")
print(f"dt: {waveform.timing.sample_interval}")
14 changes: 6 additions & 8 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ python-decouple = ">=3.8"
click = ">=8.0.0"
distro = { version = ">=1.9.0", platform = "linux" }
requests = ">=2.25.0"
nitypes = {version=">=0.1.0dev3", allow-prereleases=true}
nitypes = {version=">=0.1.0dev9", allow-prereleases=true}

[tool.poetry.extras]
grpc = ["grpcio", "protobuf"]
Expand Down
30 changes: 15 additions & 15 deletions tests/component/test_stream_readers_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def test___analog_single_channel_reader___read_waveform___returns_valid_waveform
assert _is_timestamp_close_to_now(waveform.timing.timestamp)
assert waveform.timing.sample_interval == ht_timedelta(seconds=1 / 1000)
assert waveform.channel_name == ai_single_channel_task_with_timing.ai_channels[0].name
assert waveform.unit_description == "Volts"
assert waveform.units == "Volts"
assert waveform.sample_count == samples_to_read


Expand All @@ -211,7 +211,7 @@ def test___analog_single_channel_reader___read_waveform_no_args___returns_valid_
assert _is_timestamp_close_to_now(waveform.timing.timestamp)
assert waveform.timing.sample_interval == ht_timedelta(seconds=1 / 1000)
assert waveform.channel_name == ai_single_channel_task_with_timing.ai_channels[0].name
assert waveform.unit_description == "Volts"
assert waveform.units == "Volts"
assert waveform.sample_count == 50


Expand All @@ -232,7 +232,7 @@ def test___analog_single_channel_reader___read_waveform_in_place___populates_val
assert _is_timestamp_close_to_now(waveform.timing.timestamp)
assert waveform.timing.sample_interval == ht_timedelta(seconds=1 / 1000)
assert waveform.channel_name == ai_single_channel_task_with_timing.ai_channels[0].name
assert waveform.unit_description == "Volts"
assert waveform.units == "Volts"
assert waveform.sample_count == samples_to_read


Expand Down Expand Up @@ -300,7 +300,7 @@ def test___analog_single_channel_reader___read_waveform_high_sample_rate___retur
assert _is_timestamp_close_to_now(waveform.timing.timestamp)
assert waveform.timing.sample_interval == ht_timedelta(seconds=1 / 10_000_000)
assert waveform.channel_name == ai_single_channel_task_with_high_rate.ai_channels[0].name
assert waveform.unit_description == "Volts"
assert waveform.units == "Volts"
assert waveform.sample_count == samples_to_read


Expand All @@ -324,7 +324,7 @@ def test___analog_single_channel_reader_with_timing_flag___read_waveform___only_
assert waveform.timing.sample_interval_mode == SampleIntervalMode.REGULAR
assert waveform.timing.sample_interval == ht_timedelta(seconds=1 / 1000)
assert waveform.channel_name == ""
assert waveform.unit_description == ""
assert waveform.units == ""


@pytest.mark.grpc_skip(reason="read_analog_waveform not implemented in GRPC")
Expand All @@ -344,7 +344,7 @@ def test___analog_single_channel_reader_with_extended_properties_flag___read_wav
assert waveform.scaled_data == pytest.approx(expected, abs=VOLTAGE_EPSILON)
assert waveform.timing.sample_interval_mode == SampleIntervalMode.NONE
assert waveform.channel_name == ai_single_channel_task_with_timing.ai_channels[0].name
assert waveform.unit_description == "Volts"
assert waveform.units == "Volts"


@pytest.mark.grpc_skip(reason="read_analog_waveform not implemented in GRPC")
Expand All @@ -369,7 +369,7 @@ def test___analog_single_channel_reader_with_both_flags___read_waveform___includ
assert waveform.timing.sample_interval_mode == SampleIntervalMode.REGULAR
assert waveform.timing.sample_interval == ht_timedelta(seconds=1 / 1000)
assert waveform.channel_name == ai_single_channel_task_with_timing.ai_channels[0].name
assert waveform.unit_description == "Volts"
assert waveform.units == "Volts"


@pytest.mark.grpc_skip(reason="read_analog_waveform not implemented in GRPC")
Expand All @@ -389,7 +389,7 @@ def test___analog_single_channel_reader_with_none_flag___read_waveform___minimal
assert waveform.scaled_data == pytest.approx(expected, abs=VOLTAGE_EPSILON)
assert waveform.timing.sample_interval_mode == SampleIntervalMode.NONE
assert waveform.channel_name == ""
assert waveform.unit_description == ""
assert waveform.units == ""


def test___analog_multi_channel_reader___read_one_sample___returns_valid_samples(
Expand Down Expand Up @@ -484,7 +484,7 @@ def test___analog_multi_channel_reader___read_waveforms___returns_valid_waveform
assert (
waveform.channel_name == ai_multi_channel_task_with_timing.ai_channels[chan_index].name
)
assert waveform.unit_description == "Volts"
assert waveform.units == "Volts"
assert waveform.sample_count == samples_to_read


Expand All @@ -510,7 +510,7 @@ def test___analog_multi_channel_reader___read_waveforms_no_args___returns_valid_
assert (
waveform.channel_name == ai_multi_channel_task_with_timing.ai_channels[chan_index].name
)
assert waveform.unit_description == "Volts"
assert waveform.units == "Volts"
assert waveform.sample_count == 50


Expand Down Expand Up @@ -542,7 +542,7 @@ def test___analog_multi_channel_reader___read_waveforms_in_place___populates_val
assert (
waveform.channel_name == ai_multi_channel_task_with_timing.ai_channels[chan_index].name
)
assert waveform.unit_description == "Volts"
assert waveform.units == "Volts"
assert waveform.sample_count == samples_to_read


Expand Down Expand Up @@ -607,7 +607,7 @@ def test___analog_multi_channel_reader_with_timing_flag___read_waveforms___only_
assert waveform.timing.sample_interval_mode == SampleIntervalMode.REGULAR
assert waveform.timing.sample_interval == ht_timedelta(seconds=1 / 1000)
assert waveform.channel_name == ""
assert waveform.unit_description == ""
assert waveform.units == ""
assert waveform.sample_count == samples_to_read


Expand All @@ -634,7 +634,7 @@ def test___analog_multi_channel_reader_with_extended_properties_flag___read_wave
assert (
waveform.channel_name == ai_multi_channel_task_with_timing.ai_channels[chan_index].name
)
assert waveform.unit_description == "Volts"
assert waveform.units == "Volts"
assert waveform.sample_count == samples_to_read


Expand Down Expand Up @@ -666,7 +666,7 @@ def test___analog_multi_channel_reader_with_both_flags___read_waveforms___includ
assert (
waveform.channel_name == ai_multi_channel_task_with_timing.ai_channels[chan_index].name
)
assert waveform.unit_description == "Volts"
assert waveform.units == "Volts"
assert waveform.sample_count == samples_to_read


Expand All @@ -691,7 +691,7 @@ def test___analog_multi_channel_reader_with_none_flag___read_waveforms___minimal
assert waveform.scaled_data == pytest.approx(expected, abs=VOLTAGE_EPSILON)
assert waveform.timing.sample_interval_mode == SampleIntervalMode.NONE
assert waveform.channel_name == ""
assert waveform.unit_description == ""
assert waveform.units == ""
assert waveform.sample_count == samples_to_read


Expand Down
Loading