Giter Club home page Giter Club logo

generalized-phase's Introduction

Generalized Phase

This repository contains code and demonstrations implementing the "generalized phase" (GP) representation introduced in:

Davis*, Muller*, Martinez-Trujillo, Sejnowski, Reynolds. Spontaneous travelling cortical waves gate perception in behaving primates. Nature, 2020 (*equal contribution)

The GP representation is a comprehensive numerical implementation of the "analytic signal" paradigm originally introduced by Denis Gabor in 1946 (ref). This paradigm established the concepts of "instantaneous frequency" and "instantaneous phase"; however, in practice, technical limitations can cause breakdowns of the representation. Specifically, low-frequency intrusions effectively shift the analytic signal representation by a constant in the complex plane, which in turn can strongly distort angles estimated by the four-quadrant arctangent function. High-frequency intrusions can introduce negative-frequency components, in which estimated phase progression reverses direction. We correct these technical limitations by (1) ensuring the representation remains centered in the complex plane and (2) detecting and correcting negative frequency components.

This approach, along with quantitative statistics for assessing the quality of the GP representation, constitutes a numerical implementation of the analytic signal paradigm suitable for analyzing wideband signals without first applying narrowband filters, which can introduce significant waveform distortion. For this reason, we call our updated approach "generalized phase" (GP). The file gp_demo.m creates an example timeseries plot demonstrating the GP representation on an LFP trace recorded in visual cortex:

Dependencies

You will need the wave toolbox from our lab to run the demonstrations in this repository. This can be added to the MATLAB path manually or using the command:

>> addpath( '/path/to/wave-matlab' )

The functions in this repository also use CircStat by Philipp Berens and smoothn by Damien Garcia. Note that the file gp_demo.m uses cline and colorcet to create the plot.

Installation

First, download or clone the repository:

git clone https://github.com/mullerlab/generalized-phase

Then navigate to the installation. Once you have all dependencies ready on the MATLAB path (see above), you will be able to run the demonstrations in this repository.

Spontaneous Waves Demo

spontaneous_wave_demo.m demonstrates the GP representation applied to Utah multielectrode array recordings in extrastriate visual cortex of the marmoset. The code loads a set of trials (spikes + LFP), calculates GP (line 44), implements the algorithm for detection of spontaneous traveling waves (lines 47-68), and calculates the GP at which spikes occur during fixation (lines 73-79). Note that in the example wave plots (line 71), no smoothing is applied to the data. To visualize the same data with randomized spatial structure, "options.shuffle_channels" can be set to "true".

Developers

Lyle Muller (Western University) and Zac Davis (Salk Institute)

generalized-phase's People

Contributors

jakewesterberg avatar lmuller2 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.