projects
/
pypiezo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ef5048
)
Add a method for extracting input channels by name.
author
W. Trevor King
<wking@drexel.edu>
Tue, 19 Apr 2011 17:11:31 +0000
(13:11 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Tue, 19 Apr 2011 17:14:41 +0000
(13:14 -0400)
pypiezo/base.py
patch
|
blob
|
history
diff --git
a/pypiezo/base.py
b/pypiezo/base.py
index 4cffdba51412d2b94abac9b1626a9b1a8bc1d4c5..b80d727704e73cfc5e0df3f4ec788a21c69b89e8 100644
(file)
--- a/
pypiezo/base.py
+++ b/
pypiezo/base.py
@@
-455,6
+455,13
@@
class Piezo (object):
return axis
raise ValueError(name)
+ def input_channel_by_name(self, name):
+ "Get an input channel by its name."
+ for input_channel in self.input_channels:
+ if input_channel.name == name:
+ return input_channel
+ raise ValueError(name)
+
def channels(self, direction=None):
"""Iterate through all `(name, channel)` tuples.