mirror of
https://github.com/ARM-software/devlib.git
synced 2025-02-28 07:27:50 +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:
parent
5ef99f2cff
commit
d3c3015fc8
@ -143,9 +143,10 @@ class Measurement(object):
|
|||||||
|
|
||||||
class MeasurementsCsv(object):
|
class MeasurementsCsv(object):
|
||||||
|
|
||||||
def __init__(self, path, channels=None):
|
def __init__(self, path, channels=None, sample_rate_hz=None):
|
||||||
self.path = path
|
self.path = path
|
||||||
self.channels = channels
|
self.channels = channels
|
||||||
|
self.sample_rate_hz = sample_rate_hz
|
||||||
self._fh = open(path, 'rb')
|
self._fh = open(path, 'rb')
|
||||||
if self.channels is None:
|
if self.channels is None:
|
||||||
self._load_channels()
|
self._load_channels()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user