aboutsummaryrefslogtreecommitdiff
path: root/devlib/instrument/energy_probe.py
diff options
context:
space:
mode:
authorSergei Trofimov <sergei.trofimov@arm.com>2016-09-02 14:03:33 +0100
committerSergei Trofimov <sergei.trofimov@arm.com>2016-09-02 14:03:33 +0100
commit390a544a92095ed26ef1815c9557c7315d94d121 (patch)
treed5aced58ff587a7354f3574aadeae9f19769b894 /devlib/instrument/energy_probe.py
parentd7aac2b5df29ad8bed5cac22aa9c7b590835cfcf (diff)
downloaddevlib-390a544a92095ed26ef1815c9557c7315d94d121.tar.gz
instrument: allow specifying channels in reset()
Prior to this commit, measurements to be collected were specified via "sites" and "kinds" parameters. This has the limitation that if you wanted measurments of kind X from site A and kind Y from site B, you'd have to specify them as reset(sites=['A', 'B'], kinds=['X', 'Y']) Which would have the effect of also collecting measurments Y for site A and measurments X for site B. This commit adds the option of specifying individual channels, via thier labels, e.g. reset(channels=['A_X', 'B_Y']) so that only the channels you're interested in will be collected.
Diffstat (limited to 'devlib/instrument/energy_probe.py')
-rw-r--r--devlib/instrument/energy_probe.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/devlib/instrument/energy_probe.py b/devlib/instrument/energy_probe.py
index 54ce8de..a40a791 100644
--- a/devlib/instrument/energy_probe.py
+++ b/devlib/instrument/energy_probe.py
@@ -64,8 +64,8 @@ class EnergyProbeInstrument(Instrument):
for kind in self.attributes:
self.add_channel(label, kind)
- def reset(self, sites=None, kinds=None):
- super(EnergyProbeInstrument, self).reset(sites, kinds)
+ def reset(self, sites=None, kinds=None, channels=None):
+ super(EnergyProbeInstrument, self).reset(sites, kinds, channels)
self.raw_output_directory = tempfile.mkdtemp(prefix='eprobe-caiman-')
parts = ['-r {}:{} '.format(i, int(1000 * rval))
for i, rval in enumerate(self.resistor_values)]