Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TraceImageViewer, plus other small updates #177

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
Add TraceImageViewer example
grahamfindlay committed May 10, 2023
commit 00789e3eaede09f73d17890ba390282a00324adf
22 changes: 22 additions & 0 deletions examples/trace_image_viewer_datasource.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import ephyviewer
from ephyviewer.tests.testing_tools import make_fake_signals


# Create the main Qt application (for event loop)
app = ephyviewer.mkQApp()

# Create the main window that can contain several viewers
win = ephyviewer.MainViewer(debug=True, show_auto_scale=True)

# Create a TraceView and add it to the main window
view1 = ephyviewer.TraceViewer(source=make_fake_signals(), name="LFPs")
view1.params["scale_mode"] = "same_for_all"
win.add_view(view1)

# Create a TraceImageView and add it to the main window
view2 = ephyviewer.TraceImageViewer(source=make_fake_signals(), name="CSDs")
win.add_view(view2)

# show main window and run Qapp
win.show()
app.exec()