Skip to main content

Raw Neuropixel data viewer for numpy

Project description

viewephys

Neuropixel raw data viewer

Installation

pip install viewephys

Alternatively, in development mode:

git clone https://github.com/int-brain-lab/viewephys.git
cd viewephys
pip install -e .

Supported environments

This is compatible with the IBL environment

Otherwise, you can create a new environment as such:

conda create -n viewephys python=3.12
conda activate viewephys

And then follow the install instructions above.

Controls

  • ctrl + z: -3dB gain
  • ctrl + a: +3dB gain
  • ctrl + p: in multi-windows mode, link the displays (pan, zoom and gain)

Pick spikes

When the picking mode is enabled (menu pick)

  • left button click sets a point
  • shift + left button removes a point
  • control + left does not wrap on maximum around pick
  • space increments the spike group number

Examples

Visualize raw binary file

Activate your environment and type viewephys, you can then load a neuropixel binary file using the file menu.

alt text

Alternatively you can point the viewer to a specific file using the command line:

viewphys -f /path/to/raw.bin

Load in a numpy array or slice

# if running ipython, you may have to use the `%gui qt` magic command
import numpy as np
from viewephys.gui import viewephys
nc, ns, fs = (384, 50000, 30000)  # this mimics one second of neuropixel data
data = np.random.randn(nc, ns) / 1e6  # volts by default
ve = viewephys(data, fs=fs)

alt text

Contribution

Fork and PR.

Pypi Release checklist:

flake8
rm -fR dist
rm -fR build
python setup.py sdist bdist_wheel
twine upload dist/*
#twine upload --repository-url https://test.pypi.org/legacy/ dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

viewephys-1.0.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

viewephys-1.0.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file viewephys-1.0.0.tar.gz.

File metadata

  • Download URL: viewephys-1.0.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for viewephys-1.0.0.tar.gz
Algorithm Hash digest
SHA256 961affa2fedd77b4feb419721bc6b13d866d16f2e87033ca9d093c86a398e0a1
MD5 9aa8d5baf3c24ecfb731571a6234dd8d
BLAKE2b-256 d8ab77b5d9c2ac460eb25e3b7bb70740195e6cd5c7e81ce98698bd214b9cb64b

See more details on using hashes here.

File details

Details for the file viewephys-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: viewephys-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for viewephys-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20f06c7db81455e3772fcf543b9d147e78d1c9cdbc00a8e6111b492af5f80b6f
MD5 a49686fc104a5da0ac6e59fd855cb787
BLAKE2b-256 3864eb846b425b8f2ed784e5a4ba1442d7093cdaa44a29150e51451bfa85ae13

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page