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
Copy file name to clipboardExpand all lines: docs/instruments.rst
+19-5Lines changed: 19 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,18 +34,32 @@ Then you can simply open it by name::
34
34
An Even Quicker Way
35
35
~~~~~~~~~~~~~~~~~~~
36
36
37
-
Here's a shortcut for opening an instrument that means you don't have to assign the instrument list
38
-
to a variable, or even know how to count--just use part of the instrument's string::
37
+
Here's a shortcut for opening an instrument that means you don't have to assign the instrument list to a variable, or even know how to count---just use part of the instrument's string::
This will work as long as the string you use isn't saved as an instrument alias. If you use a
46
47
string that matches multiple instruments, it just picks the first in the list.
47
48
48
49
50
+
Filtering Results
51
+
~~~~~~~~~~~~~~~~~
52
+
53
+
If you're only interested in a specific driver or category of instrument, you can use the `module` argument to filter your results. This will also speed up the search for the instruments::
54
+
55
+
>>> list_instruments(module='cameras')
56
+
[<ParamSet[TSI_Camera] serial='05478' number=0>]
57
+
>>> list_instruments(module='cameras.tsi')
58
+
[<ParamSet[TSI_Camera] serial='05478' number=0>]
59
+
60
+
`list_instruments()` checks if ``module`` is a substring of each driver module's name. Only modules whose names match are queried for available instruments.
0 commit comments