Multi-Channel Timeseries#

Introduction#

Visualizing time series from various sources on a vertically stacked, time-aligned display is often the first tool employed when working with data from electrophysiological studies. These experiments generally seek to provide insight into the activities of nerve cells or muscles, as well as how they relate to each other or other measurable variables, such as the spatial position of the organism under study. Electrophysiological recording sessions can include diverse data types like electromyograms (EMG), electroencephalograms (EEG), local field potentials (LFP), or neural action potentials (spikes) - each consisting of multiple streams of information (‘channels’) that all are unified by their alignment to a single series of timestamps, but having a heterogenuous range of amplitude values.

There are many different approaches for a visualization of multichannel timeseries data, but we’ll highlight the one that we’ve found to be promising in many scenarios. If you have a dataset that is too large to fit into memory, check out the alternate approaches in the ‘Extensions and Alternate Workflows’ below the Recommended Workflow.


#TODO: Make Key Features list into a diagram or gif showing the feature-components of the viewer

Key Features#

Analyzing electrophysiological data often involves searching for patterns across time, channels, and covariates. Features that support this type of investigation for time-aligned, amplitude-diverse data include:

  • Smooth Interactions at Scale: Smooth zooming and panning across time and channels.

  • Subcoordinate Axes: Independent amplitude dimension (y-axis) per channel.

  • Instant Inspection: Quick information preview about the data under the cursor.

  • Group-Aware Handling: Zooming and y-range normalization per specified channel group/type.

  • Reference View: Minimap for navigation and contextualization in large datasets.

  • Responsive Scale Bar: Dynamic amplitude reference measurement.

  • Time-Range Annotations: Create and edit time-range annotations directly on the plot.



Extensions and Alternate Workflows#

#TODO add thumbnails to table

Title

Preview

Type

Summary

Details

Larger Dataset
(> RAM)

Larger Dataset

Alternate Workflow

Utilize Xarray, Zarr, and Dask for dynamic access of data subsets at optimal resolution.

To handle datasets beyond available memory (RAM), we can utilize dynamic access of certain data ranges and resolutions, using a precomputed hierarchical array pyramid.

Minimap Widget

Minimap

Extension

Use HoloViews RangeToolLink and Datashader to rasterize an aggregate view.

Create a minimap widget that provides a condensed overview of the entire dataset, allowing users to select and zoom into areas of interest quickly in the main plot while maintaining the contextualization of the zoomed out view.

Time Range Annotation

annotation

Extension

Utilize HoloNote along with any primary workflow approach.

Create (or import), edit, and save a table of start and end times. View the categorized ranges overlaid on the multi-channel timeseries plot. HoloNote allows you to interact with time range annotations directly on a plot, through widgets, or programmatically.

Standalone App

Standalone App

Extension

Deploy the visualization as a standalone, template-styled web application using HoloViz Panel.

This extension shows how to wrap your plot within a Panel Template for a styled, interactive web app that can run outside of a Jupyter Notebook. By marking the Panel component as servable, you can launch the app directly from the command line, providing a user-friendly interface in its own browser window.

⚠️ (WIP) Scale Bar

Scale Bar

Extension

Provides an accurate, dynamic, and customizable reference gauge of signal amplitude.

The scale bar feature in HoloViews+Bokeh allows for precise measurement indicators on plots. WIP STATUS: As of August 2024, a Bokeh PR is being finalized to support scale bars on individual subplots within composite figures, a feature critical for multi-timeseries visualizations. Once the PR is merged, HoloViews will quickly implement support.

⚠️ (WIP) Streaming

Streaming

Alternate Workflow

Stream real-time data into a multi-channel timeseries visualization with dynamic interaction capabilities.

The streaming visualization is designed to automatically follow the incoming data stream unless the user interacts by zooming in or panning, at which point the view stays in the range that the user has navigated to. When the user resets the view from the toolbar, the visualization resumes following the live data stream. WIP STATUS As of August 2024, functionality is being finalized (e.g. HoloViews #6318 and a narrative workflow will be added soon.

Smaller Dataset
(<100k samples)

Smaller Dataset

Alternate Workflow

Minimal imports for a flexible approach with very small dataset.

Only imports HoloViz libraries, Bokeh, and Numpy. Datasets with <100k data points and <10 channels can often be handled comfortably by modern desktop browsers on well-equipped devices.


#TODO: add benchmarking summary

Benchmarking#

WIP. Coming soon - Summary of the benchmarking results and comparisons of the key workflow segments.

Funding:#