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
* add get_channel_names to niscope api
* Mention addition in changelog
* Remove unnecessary line from metadata
* Update metadata from internal dev export
* Do not render in SessionBase.
* Add test_get_channel_names_with_single_instrument_session
* Correct single_instrument test
Copy file name to clipboardExpand all lines: docs/niscope/class.rst
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1894,6 +1894,45 @@ fetch_measurement_stats
1894
1894
1895
1895
1896
1896
1897
+
get_channel_names
1898
+
-----------------
1899
+
1900
+
.. py:currentmodule:: niscope.Session
1901
+
1902
+
.. py:method:: get_channel_names(indices)
1903
+
1904
+
Returns a list of channel names for given channel indices.
1905
+
1906
+
1907
+
1908
+
1909
+
1910
+
:param indices:
1911
+
1912
+
1913
+
Index listfor the channels in the session. Valid values are from zero to the total number of channels in the session minus one. The index string can be one of the following formats:
1914
+
1915
+
- A comma-separated list—for example, "0,2,3,1"
1916
+
- A range using a hyphen—for example, "0-3"
1917
+
- A range using a colon—for example, "0:3 "
1918
+
1919
+
You can combine comma-separated lists and ranges that use a hyphen or colon. Both out-of-order and repeated indices are supported ("2,3,0,""1,2,2,3"). White space characters, including spaces, tabs, feeds, and carriage returns, are allowed between characters. Ranges can be incrementing or decrementing.
Returns a list of channel names for given channel indices.
4830
+
4831
+
Args:
4832
+
indices (basic sequence types or str or int): Index list for the channels in the session. Valid values are from zero to the total number of channels in the session minus one. The index string can be one of the following formats:
4833
+
4834
+
- A comma-separated list—for example, "0,2,3,1"
4835
+
- A range using a hyphen—for example, "0-3"
4836
+
- A range using a colon—for example, "0:3 "
4837
+
4838
+
You can combine comma-separated lists and ranges that use a hyphen or colon. Both out-of-order and repeated indices are supported ("2,3,0," "1,2,2,3"). White space characters, including spaces, tabs, feeds, and carriage returns, are allowed between characters. Ranges can be incrementing or decrementing.
4839
+
4840
+
4841
+
Returns:
4842
+
names (list of str): The channel name(s) at the specified indices.
Copy file name to clipboardExpand all lines: src/niscope/metadata/functions_addon.py
+56-1Lines changed: 56 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,62 @@
14
14
]
15
15
}
16
16
}
17
-
17
+
functions_additional_get_channel_name= {
18
+
'GetChannelNameFromString': {
19
+
'documentation': {
20
+
'description': 'Returns a list of channel names for given channel indices.\n'
21
+
},
22
+
'included_in_proto': True,
23
+
'parameters': [
24
+
{
25
+
'direction': 'in',
26
+
'documentation': {
27
+
'description': '\nThe instrument handle you obtain from niScope_init that identifies a\nparticular instrument session.\n'
28
+
},
29
+
'name': 'vi',
30
+
'type': 'ViSession'
31
+
},
32
+
{
33
+
'direction': 'in',
34
+
'documentation': {
35
+
'description': 'Index list for the channels in the session. Valid values are from zero to the total number of channels in the session minus one. The index string can be one of the following formats:\n\n- A comma-separated list—for example, "0,2,3,1"\n- A range using a hyphen—for example, "0-3"\n- A range using a colon—for example, "0:3 "\n\nYou can combine comma-separated lists and ranges that use a hyphen or colon. Both out-of-order and repeated indices are supported ("2,3,0," "1,2,2,3"). White space characters, including spaces, tabs, feeds, and carriage returns, are allowed between characters. Ranges can be incrementing or decrementing.\n'
0 commit comments