Shiang Hu, Zhihao Zhang, BRAIT-LAB
[Paper
] [[Biorxiv
]()]
2024-May highlights paper - Journal of Biomedical and Health Informatics [Click this
]
The ξ-π (XiPi) algorithm separates periodic and aperiodic neural activity using nonparametric model. It works in the spectral domain, like FOOOF, IRASA, SpriNt etc.
**Cover Photo**
**Graphic Abstract**
The code requires matlab enviroment
. If you want to compare it with FOOOF, you also need to install FOOOF
here.
Install XiPi (ξ-π)
git clone https://github.com/annie-jpg/XiPeaks-study
Add XiPi_toolbox
directory into your matlab
cd $home/XiPeaks-study; addpath(genpath("XiPi_toolbox"))
The XiPi
work in the spectral domain. You should calculate the spectral first through power spectrum density estimation method[Welch,Multitaper].
Using matlab command doc pwelch
to check, or function xp_calculateSpec
(see later).
Then, using the core function :
[psd_ftd,components] = scmem_unim(freq,spt);
Now, you have separate a aperiodic component (AC) and some periodic components (PCs). psd_ftd
represents the sum of all components, and components
[column 1] represents the AC, [other column] represent the PCs.
For scmem_unim
function, you can set some parameters to limit the peak fitting. According to your datasets, you can set it empirically.
If the peak setting is null, we tend to set default for you.
The peak setting includes:
peak_min_width
: The peak whose bandwidth < peak_min_width
will be not found.
peak_min_value
: The peak whose power proportion < peak_min_value
will be not found.
peak_num_limt
: The number of peak detection will <= peak_num_limt
settings = [1 0.05 3] % peak_min_width=1;peak_min_value=0.05;peak_num_limt=3;
[psd_ftd,components] = scmem_unim(freq,spt,settings);
For convenience, we provide additional function, including
[import data: xp_importdata
]
[calculate PSD: xp_calculateSpec
]
[batch excute ξ-π: xp_separateSpec
]
[parameterization: xp_parameterize
]
XiPi = xp_importdata([]) % import data.
XiPi = xp_calculateSpec(XiPi,[1 30],50,'select_chan',[1 2]) % calculate spectral in channel 1,2 and 1-30s.
XiPi = xp_separateSepc(XiPi) % using ξ-π to separate neural PSD.
XiPi = xp_parameterize(XiPi) % using power-law function and Gaussian function [defalut] to parameterize components.
Please use doc
command to check more function parameter input.
The ξ-π algorithm can be:
Shiang Hu (shu@adu.edu.cn), Zhihao Zhang (zhihaozhang98@outlook.com), Jie Ruan, Borsh, Pedro A. Valdes-Sosa
This work was supported by the NSFC Project Number 62101003.