Metadata-Version: 2.1
Name: ibl-neuropixel
Version: 0.8.1
Summary: Collection of tools for Neuropixel 1.0 and 2.0 probes data
Home-page: https://github.com/int-brain-lab/ibl-neuropixel
Author: The International Brain Laboratory
Project-URL: Bug Tracker, https://github.com/int-brain-lab/ibl-neuropixel/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# ibl-neuropixel
Collection of tools to handle Neuropixel 1.0 and 2.0 data
(documentation coming soon...)

## Installation
`pip install ibl-neuropixel`


## Destriping
### Getting started
This relies on a fast fourier transform external library: `pip install pyfftw`.

Minimal working example to destripe a neuropixel binary file. 
```python
from pathlib import Path
from neurodsp.voltage import decompress_destripe_cbin
sr_file = Path('/datadisk/Data/spike_sorting/pykilosort_tests/imec_385_100s.ap.bin')
out_file = Path('/datadisk/scratch/imec_385_100s.ap.bin')

decompress_destripe_cbin(sr_file=sr_file, output_file=out_file, nprocesses=8)
```

### Viewer

The best way to look at the results is to use [viewephys](https://github.com/oliche/viewephys),
open an ephys viewer on the raw data.

- tick the destipe box.
- move to a desired location in the file
- ctr+P will make the gain and axis the same on both windows

![alt text](./docs/raw_bin_viewer_destripe.png "Ephys viewer")

You can then move within the raw data file.

### White Paper
The following describes the methods implemented in this repository.
https://doi.org/10.6084/m9.figshare.19705522

## Contribution

Pypi Release checklist:
Edit the version number in `setup.py`, and add release notes in `release_notes.md`

```shell
flake8
git tag -a vX.Y.Z
git push origin vX.Y.Z
```

Create new release with tag vX.Y.Z (will automatically publish to PyPI)
