Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jnunyez authored and nocturnalastro committed Oct 6, 2023
1 parent f15e432 commit fec88a5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/vse_sync_pp/analyzers/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,7 @@ def _generate_taus(self):
self._lpf_signal = calculate_filter(self._data, self._transient, self._rate)
return None


class TimeDeviationAnalyzerBase(TimeIntervalErrorAnalyzerBase):
"""Analyze Time Deviation (TDEV).
Expand Down Expand Up @@ -477,6 +478,7 @@ 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 Down
6 changes: 3 additions & 3 deletions src/vse_sync_pp/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def append(self, data):
"""Append x and y data points extracted from `data`"""
self._x_data.append(self._extract_attr(self._x, data))
self._y_data.append(self._extract_attr(self._y, data))

def _plot_scatter(self, ax):
ax.axhline(0, color='black')
self._set_yscale(ax)
Expand All @@ -48,7 +48,7 @@ def _plot_scatter(self, ax):
ax.plot(self._x_data, self._y_data, '.')
ax.grid()
ax.set_title(f'{self._x.desc} vs {self._y.desc}')

def _plot_hist(self, ax):
counts, bins = np.histogram(
np.array(self._y_data, dtype=float),
Expand All @@ -75,7 +75,7 @@ def plot_scatter(self, filename):
self._plot_scatter(ax)
plt.savefig(filename)
return fig, ax

def plot_histogram(self, filename):
fig, ax = plt.subplots(1, constrained_layout=True)
fig.set_size_inches(10, 4)
Expand Down
2 changes: 1 addition & 1 deletion tests/vse_sync_pp/test_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def test_g8272_prtc_b(self):

self.assertEqual(REQUIREMENTS['G.8272/PRTC-B']['time-error-in-locked-mode/ns'], 40)

(interval1, func1), (interval2, func2) = REQUIREMENTS['G.8272/PRTC-B']['maximum-time-interval-error-in-locked-mode/ns'].items()
(interval1, func1), (interval2, func2) = REQUIREMENTS['G.8272/PRTC-B']['maximum-time-interval-error-in-locked-mode/ns'].items() # noqa

self.assertEqual(func1(100), 52.5)
self.assertEqual(func2(300), 40)
Expand Down

0 comments on commit fec88a5

Please sign in to comment.