Timeseries visualizer and data processing tools for Electrocorticography (ECoG) signals stored in NWB files, for Python.
A collaboration with with Chang Lab.
To clone the repository and set up a conda environment, do:
$ git clone https://github.com/ben-dichter-consulting/ecogVIS $ conda env create -f ecogVIS/make_env.yml $ source activate ecog_vis
Alternatively, to install ecogVIS directly in an existing environment:
$ pip install git+https://github.com/ben-dichter-consulting/ecogVIS
After activating the correct environment, ecogVIS can be imported and run from python. If the file does not exist (or if you provide an empty string ''), you'll be prompted to choose a file from a dialog.
from ecogvis.ecogvis import main import os fpath = os.path.join('path_to','file.nwb') main(fpath)
ecogVIS makes it intuitive and simple to viualize and process ECoG signals. It currently features:
NavigationSeamless visual navigation through long signals from large arrays of electrodes, by mouse-dragging visualization window, control buttons, value fields and keyboard keys.
AnnotationsAdd, delete, save and load annotations for meaningful comments anywhere in the visualization.
IntervalsAdd, delete, save, load and create custom intervals types to mark specific points in time, with simple click-drag-release mouse movements.
Bad ChannelsMark and un-mark bad channels. Choices are saved in the electrodes group of the current NWB file.
Signal preprocessingPreprocessing of raw voltage signals, including user-defined Downsampling, CAR and Notch filtering. The resulting processed signals are stored as an LFP object, in the processing group of the current NWB file.
Events detectionAutomatic detection of events in audio recordings for Consonant-Vowel tasks. The audio data should be stored in the NWB file in the following way:
- Speaker audio - As a TimeSeries object, named 'Speaker CV', in the stimulus group.
- Microphone audio - As a TimeSeries object, named 'Microphone CV', in the acquisition group.
High GammaEstimation of high gamma analytic amplitude, with the average of user-defined specific bands. The results are saved as a TimeSeries object, named 'high_gamma', in the processing group of the current or of a new NWB file.
Event-Related PotentialsGrid visualization of high gamma ERP calculated in reference to:
- Stimulus (speaker) or response (microphone) time intervals
- Onset or offset points
PeriodogramsGrid visualization of Periodograms:
- Raw and preprocessed data
- FFT and Welch methods
- Individual devices
Spectral DecompositionAnalytic signal amplitude estimation by Hilbert transform of user-defined frequency bands.
WARNING: This function will manipulate an array of size (nSamples, nChannels, nBands), which might be in the order of gigabytes and demand a large memory to operate and is likely to produce a large file.
- Select electrodes from specific brain areas
- Easy moving between block files for the same subject