Package: ecogvis
ecogVISTimeseries visualizer and data processing tools for Electrocorticography (ECoG) signals stored inNWBfiles, for Python.A collaboration with theChang Lab.Installation$ pip install ecogVISAfter activating the correct environment,ecogVIScan be started from the terminal:$ ecogvisYou can also directly pass a file to be opened:$ ecogvis --source 'filename.nwb'ecogVIScan be imported and run from python scripts. If the file does not exist (or if you provide an empty string ''), you'll be prompted to choose a file from a dialog.fromecogvisimportmainimportosfpath=os.path.join('path_to','file.nwb')main(fpath)FeaturesecogVISmakes 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 theelectrodesgroup 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 anLFPobject, in theprocessinggroup 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 aTimeSeriesobject, named 'Speaker CV', in thestimulusgroup.Microphone audio - As aTimeSeriesobject, named 'Microphone CV', in theacquisitiongroup.The resulting detected intervals, 'TimeIntervals_mic' and 'TimeIntervals_speaker', are saved asTimeIntervalsobjects in theintervalsgroup of the current NWB file and can be used later for ERP analysis. A preview allows for testing of the detection parameters before running it for the whole duration of the audio signals.High GammaEstimation of high gamma analytic amplitude, with the average of user-defined specific bands. The results are saved as aTimeSeriesobject, named 'high_gamma', in theprocessinggroup 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 intervalsOnset or offset pointsThe grid items are coloured to mark specific cortical areas and can be rotated to correspond anatomically to them. Emphasis can be given to specific areas of interest and double-clicking an item allows for fast inspection of the single electrode's ERP in detail.PeriodogramsGrid visualization of Periodograms:Raw and preprocessed dataFFT and Welch methodsIndividual devicesThe grid items are coloured to mark specific cortical areas and can be rotated to correspond anatomically to them. Emphasis can be given to specific areas of interest and double-clicking an item allows for fast inspection of the single electrode's Periodogram in detail.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.PlusSelect electrodes from specific brain areasEasy moving between block files for the same subject