Skip to content

StevenFAU/AutomatePhi

Repository files navigation

AutomatePhi

A CLI and library for computing Φ_spectral (spectral integrated information) over time-series data such as EEG recordings and simulated neural networks.

Based on the work of Mark M. Bailey:

  • Source: Spectral-Integrated-Information
  • Papers: "When Wholes Resist Decomposition" (Bailey & Schneider, 2025); "Superpsychism" (Schneider & Bailey, forthcoming JCS)

Quickstart

# Bootstrap the project (creates venv, installs dependencies)
bash phi_spectral_bootstrap.sh

# Activate the environment
source .venv/bin/activate

# Run the full pipeline
bash scripts/run_pipeline.sh --simulate-all

# Compute Φ_spectral on your own data
phispectral compute --input data/raw/eeg.csv --window 10 --step 1 --bins 3 --outdir runs/my_run

# Parameter sweep
phispectral sweep --input data/raw/eeg.csv --windows 5,10,20,50 --overlay --errorbars --outdir runs/sweep

Data

Place input files in data/raw/. Supported formats:

  • .csv — wide format (rows = time, columns = nodes)
  • .json
  • .npy — shape (n_nodes, T)

Paper Parameters

Parameter Value
n (nodes) 50
T (timesteps) 150
window 10
step 1
bins 3

CTLN simulation: θ=1.0, ε=0.25, δ=0.5, dt=0.1

Outputs

compute command

File Description
phi_timeseries.csv Time-centered Φ_spectral values (raw and normalized)
phi_timeseries.png Φ_spectral over time plot
traces.png Input signal traces
mi_final.png Mutual information matrix heatmap (final window)
mi_final.npy MI matrix as NumPy array (with --save-mi-final)

sweep command

File Description
window_N/phi_timeseries.csv Per-window Φ time series
window_N/phi_timeseries.png Per-window Φ plot
phi_overlay.png All window sizes overlaid (with --overlay)
phi_vs_window.png Mean Φ vs window size (with optional error bars)
phi_vs_window.csv Mean and std Φ per window size

simulate command

Generates synthetic time-series data (.csv or .npy) for models: random, transitional, synchronized, ctln. CTLN can also save the network graph as .gml with --save-graph.

License

MIT — see LICENSE. Core library by Mark M. Bailey.

About

Automated CLI and doc tree for Phi Spectral. Based on Mark M. Bailey and Susan L. Schneider, When Wholes Resist Decomposition: A Spectral Measure of Epistemic Emergence. PhilPapers, https://philpapers.org/rec/BAIWWR

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors