How shianghu/xi-pi works
Project type and purpose
• This is an open-source MATLAB toolbox (“XiPi toolbox”) for separating periodic and aperiodic neural activity in spectral data, plus a set of figure-generation scripts that reproduce results from a research paper.
File structure
• Top-level folders:
• Figure – eight subfolders (Figure1…Figure8), each containing data, handler (scripts), and results (.fig or .mat).
• SharedData – common .mat files used by multiple figures.
• XiPi_toolbox – the core toolbox, subdivided into:
– XiPeaks-master/unim (core scmem_unim algorithm and fitting routines)
– appDesigner (MATLAB .mlapp GUIs)
– standalone functions (xp_importdata, xp_calculateSpec, xp_separateSpec, xp_parameterize, etc.)
• third_party_toolbox – two MATLAB toolboxes (auto-axis and barplot) that XiPi leverages for plotting.
• tutorial – a simple demo script and data for users.
• assets – images used in README.
Key insights from README
• Core API:
• xp_importdata → xp_calculateSpec → scmem_unim → xp_separateSpec → xp_parameterize
• scmem_unim (in XiPeaks-master/unim) is the algorithm engine.
• Dependencies: MATLAB environment, plus optional FOOOF toolbox.
• Extensibility points: adding new spectral estimators or parameterization methods, replacing the scmem core, or customizing GUIs.
Detail is paramount
• Every major folder or module as a component.
• Shared data sources separately.
• Extension hooks (custom .mlapp GUIs, SLMtools).