DataBlock Viewer

Viewer for myokit.DataBlock1d or myokit.DataBlock2d objects. Allows loading blocks from disk, and then visualising as interactive movies. Any point in the movie can be clicked to obtain the local action potential (or other variables).

Implementation

class myokit.gui.datablock_viewer.DataBlockViewer(filename=None)

Graphical interface for viewing DataBlock data.

action_about()

Displays the about dialog.

action_clear_graphs()

Removes all graphs from the graph area.

action_depause_timer()

De-pauses the timer, restarting it if was paused, not affecting it if it wasn’t.

action_extract_colormap_image()

Extracts the current colormap to an image file.

action_extract_frame()

Extracts the current frame to a csv file.

action_extract_frame_image()

Extracts the current frame to an image file.

action_extract_graphs()

Extracts the currently displayed graphs to a csv file.

action_license()

Displays this program’s licensing information.

action_next_frame(e=None)

Move to next frame!

action_open()

Let the user select a data file to load.

action_pause_timer()

Pauses the timer (if running). Only meant to be used for very short periods!

action_recent_file()

Opens a recent file.

action_set_colormap(name)

Loads the ColorMap specified by name.

action_set_frame(frame)

Move to a specific frame.

action_set_variable(var)

Loads the variable specified by the name var into the main display.

action_start_stop()

Toggles the started/stopped state of the timer.

action_start_timer()

Starts the timer.

closeEvent(event=None)

Called when window is closed.)

create_menu()

Creates this widget’s menu.

display_exception()

Displays the last exception.

event_colormap_selected()

Colormap is selected by user.

event_double_click(x, y)

Add a frozen graph at the location of the click

event_mouse_move(x, y)

Display the current cursor position on the video scene.

event_rate_changed(e=None)

User changed frame interval.

event_single_click(x, y)

Add a graph at the location of the click

event_variable_selected()

Variable is selected by user.

keyPressEvent(e)

Catch key presses?

load_config()

Loads the user configuration from an ini file.

load_data_file(fname)

Attempts to load the given data block 2d file.

save_config()

Saves the user configuration to an ini file.

update_recent_files_menu()

Updates the recent files menu.

update_window_title()

Sets this window’s title based on the current state.

myokit.gui.datablock_viewer.icon()

Widgets

class myokit.gui.datablock_viewer.GraphArea

Area that can draw several graphs.

clear()

Removes all graphs from the widget.

freeze()

Adds the temporary graph to the set of frozen graphs.

graph(variable, x, y)

Adds temporary graph to this widget.

log()

Returns a myokit DataLog containing the data currently displayed in the graph area.

minimumSizeHint()

Returns a minimum size.

mouseMoveEvent(event)

Show mouse position in status bar

paintEvent(event)

Draws all the graphs.

resizeEvent(e=None)

Resized.

set_data(data)

Passes in the DataBlock2d this graph area extracts its data from.

set_position(pos)

Sets the position of the time indicator.

sizeHint()

Returns a size suggestion.

sizePolicy()

Tells Qt that this widget shout expand.

class myokit.gui.datablock_viewer.VideoScene(*args)

Color data display scene.

mouseDoubleClickEvent(event)

Double-click

mouseMoveEvent(event)

Show mouse position in status bar

mousePressEvent(event)

Single-click

resize(w, h, p)

Resizes the scene to match the given dimensions.

class myokit.gui.datablock_viewer.VideoView(scene)

Views a color data scene.

fitInView(rect, keepAspect=False)

For some reason, Qt has a stupid bug in it that gives the scene a (hardcoded) margin of 2px. To remove, this is a re-implementation of the fitInView method, loosely based on the original C.

https://bugreports.qt-project.org/browse/QTBUG-11945

resizeEvent(event=None)

Called when the view is resized.