This repository contains a set of matlab scripts to detect threshold crossings in extracellular voltage data that has been continuously acquired using an open ephys system in their .continuous format to the .nev format. This code is based on a similar function, plx2nev developed by Matt Smith's lab at the University of Pittsburgh. To do so it executes the following steps.
- Import data
- Filter the data according to user specifications
- Calculate threshold crossings, and associated waveforms
- Write waveforms and threshold-crossing times to a .nev format
The resulting file can be read by multiple commercial and open-source spike sorting softwares. Below are some I have tested
- Offline Sorter by Plexon
- Spike2 by Cambridge Electronic Design Limited
- Spikesort from Matt Smith's lab
I would appreciate help in testing the code. A word of warning, it will run very slowly with extracellular recordings from recording probes with lots of contacts. Data it is used for involve recordings taken from multilaminar probes with 32 contacts. It could probably work reasonably well up to 128 channels.
To run this code you need the following
Running the code is relatively simple, add the scripts and the required open ephys analysis tools scripts to your path and execute main_example.m. Further information is available on the Wiki page
A note on operating systems This should work across most operating systems. It was written and tested using Matlab 2016b running in Mac OS X 10.11.6. It was also tested on a computer running Windows 7. If you have a problem post to issues above and I will see if I can help.
The code is provided for free via the GNU General Public License. See license file in this repository for further details.