Skip to content

Commit

Permalink
[analyzer] fixed clearing of data and markers
Browse files Browse the repository at this point in the history
  • Loading branch information
janscience committed Jul 6, 2024
1 parent daa67c6 commit d9e12ad
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHNAGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v2.2

- Fixed clearing of analysis data


## v2.1 - 2024.07.04

- Centered zooming of time axis with T and Shift+T
Expand Down
9 changes: 9 additions & 0 deletions src/audian/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,15 @@ def __init__(self, browser, name, source_name):
self.events = {}
self.browser.add_analyzer(self)


def clear(self):
"""Clear the data table and the markers.
"""
self.data.clear_data()
for name in self.events:
for c in range(len(self.events[name])):
self.events[name][c].clear()


def analyze(self, t0, t1, channel, traces):
"""Analysis function.
Expand Down
2 changes: 1 addition & 1 deletion src/audian/databrowser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1747,7 +1747,7 @@ def clear_analysis(self):
if self.analysis_table is not None:
self.analysis_table.clear()
for a in self.analyzers:
a.data = []
a.clear()


def save_analysis(self):
Expand Down

0 comments on commit d9e12ad

Please sign in to comment.