SpikeInterface / spikeinterface

A Python-based module for creating flexible and robust spike sorting pipelines.
https://spikeinterface.readthedocs.io
MIT License
533 stars 187 forks source link

Spikes are appearing as flipped, or upside-down #2664

Closed TheAnton205 closed 7 months ago

TheAnton205 commented 8 months ago

Hello, plotting traces in spike interface seem to plot spikes going down, rather than up. Is it possible to flip the y-axis and make them not upside down?

Below is what I want to see: image

Here is what spikeInterface is plotting: image

zm711 commented 8 months ago

Extracellular potentials typically go down. What kind of data are you hoping to plot? Which extractor are you using?

TheAnton205 commented 7 months ago

We are using openephys for extracting and neuropixels are the type of data we want to plot. The first image is a screenshot from openephys during live recording. More specifically, this is an LFP (local field potential) recording.

zm711 commented 7 months ago

I would guess that you have some sort of display issue for openephys. Or a referencing issue. In general extracellular potentials are downward deflecting the way the plot traces are. If you have sample data you can share we could double check for you. But the get_traces() function shouldn't flip your data.

Do you expect positive data for any other reason other than that is how the gui is displaying it?

TheAnton205 commented 7 months ago

Maybe it is the openephys GUI displaying the positive values. We didn't expect positive data from openephys, just the reason we asked was that we were seeing a difference between the two images. Thank you for your swift response!

zm711 commented 7 months ago

Of course. Feel free to open more issues if they come up. Happy to help!