SpikeInterface / SpikeInterface/spikeinterface

Discussion on best way to visualise data in an experiment

Open
#3,028 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
847
Forks
280
Avg merge
3d 9h
Merged PRs (30d)
29

Description

At the hackathon, there was a lot of discussion on the importance of data visualisation. There are already a lot of nice tools for visualising data in spikeinterface (plot_traces(), and spikeinterface-gui). These are very useful for having a good look, close up at a single dataset.

However, when running a lot of acquisition sessions, it can be useful to print summary of a recording to quickly assess data quality across an entire experiment. I was wondering how people are handling this in their research? I sometimes use code blocks like the below (psedocode) to dump images to a PDF for review later. An intrinsic problem at what scale to plot the data - at large time bins you loose all spike resolution. At small time bins, you need to take small snapshots through a long recording. In this case it might be easy to miss large blocks of the recording where data quality could feasibly be comprimised. Also, if saving to .svg / .png you cant really zoom in like a usual matplotlib recording.

Code Example
from matplotlib.backends.backend_pdf import PdfPages
import spikeinterface.widgets as si_widgets

pdf_pages = PdfPages(output_filepath)
fig, ax = plt.subplots(*(1, 3))

# some list of times to plot, with a period (i.e. window) to plot

for i, (start_time, stop_time) in enumerate(
        zip(times,
            times + period_s)
 ):

        si_widgets.plot_traces(
            recording,
            order_channel_by_depth=True,
            time_range=(start_time, stop_time),
            mode="line",
            show_channel_ids=True,
            return_scaled=True,
            ax=ax[i],
        )
        ax[i].get_legend().remove()

pdf_pages.savefig(fig)
plt.close(fig)
pdf_pages.close()

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing plot_traces() workflow and the spikeinterface-gui tool, then compare them with the provided matplotlib/PDF example. The issue does not define a specific implementation or acceptance criteria, so the visualization requirements and what constitutes a completed summary need to be clarified first.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.