1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-02-27 23:17:51 +00:00

Instrument/MeasurementCSV: Add support for recording sample rate.

If performing post processing on a MeasurementCsv file, if a timestamp
is not available then the recorded sample rate can be used as a
substitute.
This commit is contained in:
Marc Bonnici 2017-08-03 12:13:48 +01:00
parent 5ef99f2cff
commit d3c3015fc8

@ -143,9 +143,10 @@ class Measurement(object):
class MeasurementsCsv(object):
def __init__(self, path, channels=None):
def __init__(self, path, channels=None, sample_rate_hz=None):
self.path = path
self.channels = channels
self.sample_rate_hz = sample_rate_hz
self._fh = open(path, 'rb')
if self.channels is None:
self._load_channels()