Skip to content

Commit

Permalink
try toplot
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunyez committed Oct 5, 2023
1 parent 1d03572 commit 5719046
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/vse_sync_pp/analyzers/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,8 @@ def _explain_common(self, data):
self._lpf_signal = calculate_filter(data, self._transient, self._rate)
return None

def toplot(self):
yield from zip(self._taus, self._samples)

class TimeDeviationAnalyzerBase(TimeIntervalErrorAnalyzerBase):
"""Analyze Time Deviation (TDEV).
Expand Down Expand Up @@ -432,8 +434,8 @@ def explain(self, data):
'timestamp': self._timestamp_from_dec(data.iloc[0].timestamp),
'duration': data.iloc[-1].timestamp - data.iloc[0].timestamp,
'tdev': self._statistics(self._samples, 'ns'),
'tdev_taus': self._taus.tolist(),
'tdev_samples': self._samples.tolist(),
#'tdev_taus': self._taus.tolist(),
#'tdev_samples': self._samples.tolist(),
}
return analysis

Expand Down Expand Up @@ -465,7 +467,6 @@ def test(self, data):
return (False, "unacceptable mtie")
return (True, None)
return result

def explain(self, data):
analysis = self._explain_common(data)
if analysis is None:
Expand All @@ -475,7 +476,7 @@ def explain(self, data):
'timestamp': self._timestamp_from_dec(data.iloc[0].timestamp),
'duration': data.iloc[-1].timestamp - data.iloc[0].timestamp,
'mtie': self._statistics(self._samples, 'ns'),
'mtie_taus': self._taus.tolist(),
'mtie_samples': self._samples.tolist(),
#'mtie_taus': self._taus.tolist(),
#'mtie_samples': self._samples.tolist(),
}
return analysis

0 comments on commit 5719046

Please sign in to comment.