You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
niscope: expand channels repeated_capability before populating channel and record info in fetched data (#1958)
* Fix fetch, read?
* Fix fetch_array_measurement?
* Fix fetch_measurement_stats?
* fix fetch_into?
* Update changelog in anticipation of fix
* enable correct test cases for catching #1770
* Use subtemplate for population of channel and record info in fetched data
* remove mention of niscope from changelog fix description
* Remove get_channel_names TODO from tests
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,6 +61,7 @@ All notable changes to this project will be documented in this file.
61
61
*#### Added
62
62
* `get_channel_names()`
63
63
*#### Changed
64
+
* Fix [#1770](https://github.com/ni/nimi-python/issues/1770): fetch(), read(), and friends return wrong data when called with channel ranges on multi-instrument session.
# Should this raise instead? If this asserts, is it the users fault?
2138
-
assertlwfm_i%lrcl==0, 'Number of waveforms should be evenly divisible by the number of channels: len(wfm_info) == {0}, len(self._repeated_capability_list) == {1}'.format(lwfm_i, lrcl)
assertwfm_info_count%channel_count==0, 'Number of waveforms should be evenly divisible by the number of channels: len(wfm_info) == {0}, len(channel_names) == {1}'.format(wfm_info_count, channel_count)
assertwfm_info_count%channel_count==0, 'Number of waveforms should be evenly divisible by the number of channels: len(wfm_info) == {0}, len(self._repeated_capability_list) == {1}'.format(wfm_info_count, channel_count)
2245
+
channel_count=len(channel_names)
2246
+
# Should this raise instead? If this asserts, is it the users fault?
2247
+
assertwfm_info_count%channel_count==0, 'Number of waveforms should be evenly divisible by the number of channels: len(wfm_info) == {0}, len(channel_names) == {1}'.format(wfm_info_count, channel_count)
assertresults_count%channel_count==0, 'Number of results should be evenly divisible by the number of channels: len(results) == {0}, len(self._repeated_capability_list) == {1}'.format(results_count, channel_count)
2345
+
channel_count=len(channel_names)
2346
+
# Should this raise instead? If this asserts, is it the users fault?
2347
+
assertresults_count%channel_count==0, 'Number of results should be evenly divisible by the number of channels: len(results) == {0}, len(channel_names) == {1}'.format(results_count, channel_count)
# Should this raise instead? If this asserts, is it the users fault?
2440
-
assertlwfm_i%lrcl==0, 'Number of waveforms should be evenly divisible by the number of channels: len(wfm_info) == {0}, len(self._repeated_capability_list) == {1}'.format(lwfm_i, lrcl)
assertwfm_info_count%channel_count==0, 'Number of waveforms should be evenly divisible by the number of channels: len(wfm_info) == {0}, len(channel_names) == {1}'.format(wfm_info_count, channel_count)
assertlwfm_i%lrcl==0, 'Number of waveforms should be evenly divisible by the number of channels: len(wfm_info) == {0}, len(self._repeated_capability_list) == {1}'.format(lwfm_i, lrcl)
# Should this raise instead? If this asserts, is it the users fault?
3180
+
assertwfm_info_count%channel_count==0, 'Number of waveforms should be evenly divisible by the number of channels: len(wfm_info) == {0}, len(channel_names) == {1}'.format(wfm_info_count, channel_count)
# Should this raise instead? If this asserts, is it the users fault?
34
-
assert lwfm_i % lrcl == 0, 'Number of waveforms should be evenly divisible by the number of channels: len(wfm_info) == {0}, len(self._repeated_capability_list) == {1}'.format(lwfm_i, lrcl)
assert wfm_info_count % channel_count == 0, 'Number of waveforms should be evenly divisible by the number of channels: len(wfm_info) == {0}, len(self._repeated_capability_list) == {1}'.format(wfm_info_count, channel_count)
assert results_count % channel_count == 0, 'Number of results should be evenly divisible by the number of channels: len(results) == {0}, len(self._repeated_capability_list) == {1}'.format(results_count, channel_count)
assert lwfm_i % lrcl == 0, 'Number of waveforms should be evenly divisible by the number of channels: len(wfm_info) == {0}, len(self._repeated_capability_list) == {1}'.format(lwfm_i, lrcl)
# Should this raise instead? If this asserts, is it the users fault?
13
+
assert ${results_name}_count % channel_count == 0, 'Number of ${results_description} should be evenly divisible by the number of channels: len(${results_name}) == {0}, len(channel_names) == {1}'.format(${results_name}_count, channel_count)
0 commit comments