Generate the figures in my paper Phantom oscillations in principal component analysis.
Standard scientific Python stack:
pip install numpy scipy scikit-learn matplotlib seaborn statsmodels scikit-image imageio
CanD for pretty scientific figures:
pip install cand
Colorednoise for easy 1/f noise simulations:
pip install colorednoise
Networkx for the branching manifold:
pip install networkx
Wbplot for rendering the MRI images:
pip install wbplot
I used Python 3.6 but it should work on a more modern version.
Run each Python script from the terminal. After running all scripts, edit the "REVERSE = False" line to be "REVERSE = True" to generate the remaining figures.
Missing data files can in theory be rendered by uncommenting the commented-out sections of each file, but that requires installing more software (specifically this for fMRI and this for NHP electrophysiology) so I uploaded the pre-generated data.
Data from Roitman and Shadlen (2002) is available from the authors.
All code copyright 2024 Max Shinn, available under the GNU GPLv3.
ames-task.png is copyright Ames and Churchland 2019 from their eLife paper.