## **PhasePrecession**
This repository contains MATLAB routines used to calculate temporal phase precession by the spike phase spectrum method, described in [Sloin et al., 2023](https://www.biorxiv.org/content/10.1101/2023.08.19.553985v1).
## **Overview**
The spike phase temporal precession algorithm described by [Sloin et al. (2023)](https://www.biorxiv.org/content/10.1101/2023.08.19.553985v1) is designed to detect and quantify temporal phase precession of spikes. The approach minizes (1) false detections, created by phase locking; and (2) misses (false negatives) created by units that exhibit both phase locking and phase precession.
The core algorithm is implemented by the MATLAB routine **spk\_phs\_spec.m**. All the sub-routines necessary for spk\_phs\_spec.m are included in the **Analysis** and **Utilities** folders.
## **Code**
### **Analysis**
- calc\_cycle.m
- generates a vector of theta cycle from a theta phase vector
- RandCyclePhs.m
- randomize the phase of spikes
- spike\_spectra.m
- calculates the spectrum of spike phases
- spk\_phs\_spec.m
- computes spike phase spectrum and indicates the occurrence of temporal precession
### **Demo**
- spk\_phs\_spec\_demo.m
- demonstrates the calculation using example data
### **Utilities**
- inranges
- determine which elements of a vector are in which range
- mixmat
- mix matrix elements
- my\_spectrum
- Welch spectrum for multiple signals
- myjet
- modified jet with extreme values in pure R,B
- ParseArgPairs
- flexible argument assigning
- resampleranges
- resample ranges from one Fs to another, while keeping the total duration fixed
- resort
- indices to recover original order
- sortranges
- to be a set of non-overlapping [ small large ] pairs
## **Data**
The sample data are used to demonstrate the calculation of spike phase spectra and deriving quatification and statistical significance. The data include spike trains and theta phases corresponding to three well-isolated pyramidal cells recorded from hippocampal region CA1 of freely-moving mice. The same examples are described in [Fig. S2](https://www.biorxiv.org/content/biorxiv/early/2023/08/21/2023.08.19.553985/F7.large.jpg) of [Sloin et al., 2023](https://www.biorxiv.org/content/10.1101/2023.08.19.553985v1). One example unit exhibits phase precession (1\_precession\_only.mat; Fig. S2A), a second unit exhibits phase locking (2\_lock only.mat; Fig. S2B), and a third exhibits both phase locking and phase precession (3\_precession\_lock.mat; Fig. S2C).
In all cases, the *.mat file contains three variables, all sampled at 1250 Hz:
- spk: spike times
- phs: LFP theta theta phases in radians
- periods: start and end time of every crossing of the unit’s place field
The data are available at [Zenodo](https://doi.org/10.5281/zenodo.10405019).
## **Demo**
The routine **spk\_phs\_spec\_demo.m** demonstrates the calculation of spike phase spectra by using data from three example units recorded from hippocampal region CA1 of freely-moving mice. One example unit exhibits phase locking, a second unit exhibits phase precession, and a third exhibits both phase locking and phase precession.
### To run the demo
To demonstrate the algorithm for spike phase temporal precession using real data:
- Download all routines (m files) from this repository
- Download the data (mat files) from Zenodo
- In MATLAB, write spk\_phs\_spec\_demo
## **Demo results**
### Precession only
![Precession only](sloin2023_demo1.png)
### Phase locking only
![Phase locking only](sloin2023_demo2.png)
### Phase locking and precession
![Phase locking only](sloin2023_demo3.png)
没有合适的资源?快使用搜索试试~ 我知道了~
用于使用尖峰相位谱方法计算时间相位进动的例程matlab代码.zip
共17个文件
m:13个
png:3个
md:1个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 164 浏览量
2024-03-31
13:17:27
上传
评论
收藏 402KB ZIP 举报
温馨提示
1.版本:matlab2014/2019a/2021a 2.附赠案例数据可直接运行matlab程序。 3.代码特点:参数化编程、参数可方便更改、代码编程思路清晰、注释明细。 4.适用对象:计算机,电子信息工程、数学等专业的大学生课程设计、期末大作业和毕业设计。
资源推荐
资源详情
资源评论
收起资源包目录
用于使用尖峰相位谱方法计算时间相位进动的例程matlab代码.zip (17个子文件)
用于使用尖峰相位谱方法计算时间相位进动的例程matlab代码
calc_cycle.m 2KB
ParseArgPairs.m 4KB
sortranges.m 3KB
resort.m 318B
sloin2023_demo2.png 138KB
resampleranges.m 3KB
spike_spectra.m 13KB
RandCyclePhs.m 13KB
my_spectrum.m 5KB
mixmat.m 2KB
spk_phs_spec.m 18KB
sloin2023_demo3.png 138KB
sloin2023_demo1.png 142KB
spk_phs_spec_demo.m 307B
inranges.m 6KB
README.md 4KB
myjet.m 1KB
共 17 条
- 1
资源评论
matlab科研助手
- 粉丝: 1w+
- 资源: 1994
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功