gazelib.visualization package

Submodules

gazelib.visualization.common module

gazelib.visualization.common.render_overview(common, output_html_filepath, title='Overview', emphasize_gaps=False)[source]

Create HTML-based visualization from all streams and events. Does not understand stream or event semantics like gaze paths for example.

Can be slow if streams contain large number of gaps.

Parameters:
common: A CommonV1 object output_html_filepath: a filepath as string title: HTML page title as string emphasize_gaps: if False, do not show red gaps. Makes it quicker.
gazelib.visualization.common.render_path(common, output_html_filepath, title='Path')[source]

Create a HTML-based visualization of the gaze path.

gazelib.visualization.common.render_path_for_each_event(common, event_tag, output_html_filepath)[source]

gazelib.visualization.utils module

gazelib.visualization.utils.get_valid_sublists(l, validator=<function isNotNone>)[source]

Return list of lists, where each sublist contains only valid values. In other words, the given list is splitted by its invalid values.

Parameters:
l:
A list
validator:
A boolean function that returns true if element is valid. Defaults to testing if value is not None.

Example:

>>> get_valid_sublists([1, 2, None, 3])
[[1, 2], [3]]
gazelib.visualization.utils.get_valid_sublists_2d(xs, ys, validator=<function isNotNone2d>)[source]

Return list of lists

Example result:

[
    ([1,2,3,...], [0,3,5,...]),
    ([4,6,2,...], [3,0,3,...]),
    ...
]
gazelib.visualization.utils.isNotNone(x)[source]
gazelib.visualization.utils.isNotNone2d(x, y)[source]

Module contents

Visualization tools for gazelib/common/v1 and possibly other containers in the future.