Skip to content

Taurus-Ai-Corp/taurus-gcfd-tracker

taurus-gcfd-tracker

License: Apache 2.0 Python 3.9+ HuggingFace Space CI JOSS Dataset

Generalized Cross-Frequency Decomposition (GCFD) for EEG/MEG phase synchronization.

Quantifies theta-gamma coupling using Phase Locking Value (PLV) to measure global neural coherence. Built by TAURUS AI Corp as part of the Global Bio-Foundry initiative.

Live Demo | Enterprise Licensing | Citation


Overview

taurus-gcfd-tracker implements the Global Coherence Field Decomposition algorithm, which measures the consistency of phase relationships between theta (4-8 Hz) and gamma (30-100 Hz) oscillations in EEG/MEG recordings.

Method:

Raw EEG -> Butterworth bandpass (order 3, zero-phase) -> Hilbert transform
        -> Phase extraction -> Phase Locking Value -> Sliding window analysis
        -> Global Coherence Score [0.5 - 1.0]

Clinical interpretation:

Score Status Meaning
0.90+ HEALTHY Strong theta-gamma coupling
0.70-0.89 MODERATE Partial synchronization
< 0.70 LOW Weak coupling / potential pathology

Scores above 0.95 may indicate pathological hypersynchronization (e.g., epileptic ictal states).

Installation

pip install numpy scipy matplotlib
git clone https://github.com/Taurus-Ai-Corp/taurus-gcfd-tracker.git
cd taurus-gcfd-tracker

Quick Start

from taurus_gcfd import CoherenceTracker, datasets

# Load simulated EEG data
data = datasets.load_sample_eeg('patient_01_mdd')

# Initialize tracker
tracker = CoherenceTracker(sampling_rate=250)

# Calculate Global Coherence Ratio
score = tracker.calculate_global_coherence(data)
print(f"Global Coherence: {score:.3f}")

# Plot spatio-spectral eigenmodes
tracker.plot_eigenmodes(data, target_frequency='theta_gamma')

PAC Analysis Module

The pac_analysis module provides publication-standard Phase-Amplitude Coupling analysis with robust artifact rejection.

Features

  • Tort Modulation Index (Tort et al. 2010) — KL-divergence-based PAC metric, the peer-reviewed standard
  • Normalized Mean Vector Length (Cohen 2008) — O(n) real-time coupling metric
  • 4-Stage Artifact Rejection addressing Aru et al. (2015) criticisms:
    1. Butterworth bandpass filtering (waveform shape control)
    2. Time-shift surrogate statistics (200 surrogates, 95th percentile)
    3. Phase-shuffle null model (tonic vs phasic coupling test)
    4. Effect-size thresholding (MI > 0.01)
  • Comodulogram visualization — frequency-sweep heatmap for manuscript figures

Usage

from pac_analysis import PACAnalyzer, plot_comodulogram

# Analyze EEG with full artifact rejection
analyzer = PACAnalyzer(fs=250)
result = analyzer.analyze(eeg_data)
print(f"MI: {result['mi']:.4f}, Genuine: {result['is_genuine']}")

# Generate publication-ready comodulogram
fig = plot_comodulogram(eeg_data, fs=250)
fig.savefig("comodulogram.png", dpi=150)

Live Demo

Try the interactive Gradio app with 8 clinical presets:

Launch on HuggingFace Spaces

Presets: Healthy Adult, MDD, MCI/Alzheimer's, Epilepsy, Meditation, Anesthesia, ADHD, Custom

API Access:

from gradio_client import Client

client = Client("Taurus-Ai-Corp/gcfd-coherence-tracker")
result = client.predict(
    preset="Major Depressive Disorder (MDD)",
    duration=10, fs=250,
    theta_amp=0.5, gamma_amp=0.3, noise_level=2.0, seed=101,
    theta_low=4.0, theta_high=8.0, gamma_low=30.0, gamma_high=100.0,
    csv_file=None,
    api_name="/run_analysis"
)

API Reference

CoherenceTracker(sampling_rate=250)

Method Returns Description
calculate_global_coherence(eeg_data, band1=(4,8), band2=(30,100)) float [0-1] PLV-based coherence score
plot_eigenmodes(data, target_frequency) matplotlib figure Frequency-domain visualization

datasets.load_sample_eeg(patient_id) -> np.ndarray

Generates synthetic EEG data (2500 samples at 250 Hz) for testing.

Datasets

Synthetic EEG datasets for 7 clinical conditions are available on HuggingFace:

Bio-Quantum Eigenmodes: Healthy Brainwave Signatures for Therapeutic Entrainment

Each CSV contains a 10-second, single-channel EEG signal at 250 Hz with theta-gamma phase-amplitude coupling. Conditions: Healthy Adult, MDD, MCI/Alzheimer's, Epileptic Seizure, Meditation, Anesthesia (Propofol), ADHD.

# Generate datasets locally
python scripts/generate_dataset.py

# Generate and upload to HuggingFace
python scripts/generate_dataset.py --upload

Testing

pip install pytest
python -m pytest tests/ -v

The test suite covers core coherence computation, bandpass filtering, PLV calculation, sliding window analysis, and all clinical presets.

Community Validation

We invite the neuro-tech and neuroscience communities to test this tool against clinical datasets to independently verify theta-gamma phase synchronization patterns using the PLV methodology.

Enterprise & Commercial Use

This library is Apache 2.0 for individual, academic, and research use.

Enterprise License is required for:

  • Clinical software products (FDA/CE-marked devices)
  • SaaS platforms redistributing this tracker as a service
  • Integration into proprietary neurotechnology pipelines
  • Government contracts and defense applications

API Tiers:

Tier Rate Price
Free 50 req/day $0
Researcher 1,000 req/day $29/mo
Clinical 10,000 req/day + batch $149/mo
Enterprise Unlimited + SLA Contact us

Contact: admin@taurusai.io See LICENSE-ENTERPRISE for terms.

Contributing

See CONTRIBUTING.md. We welcome:

  • Additional frequency band presets
  • Dataset integrations (EEGLAB, MNE-Python)
  • Performance optimizations
  • Clinical validation case studies

Citation

@software{taurus_gcfd_2026,
  author       = {TAURUS AI Corp},
  title        = {taurus-gcfd-tracker: Generalized Cross-Frequency Decomposition for EEG/MEG Coherence},
  year         = 2026,
  version      = {1.0.0},
  publisher    = {GitHub},
  url          = {https://github.com/Taurus-Ai-Corp/taurus-gcfd-tracker}
}

References

  1. Lachaux et al. (1999) -- Measuring phase synchrony in brain signals
  2. Canolty et al. (2006) -- High gamma power is phase-locked to theta oscillations
  3. Tort et al. (2010) -- Measuring phase-amplitude coupling between neuronal oscillations
  4. Tort, A.B.L. et al. (2010) -- Measuring phase-amplitude coupling. J Neurophysiol 104:1195-1210.
  5. Canolty, R.T. et al. (2006) -- High gamma power is phase-locked to theta. Science 313:1626-1628.
  6. Cohen, M.X. (2008) -- Assessing transient cross-frequency coupling. J Neurosci Methods 168:494-499.
  7. Aru, J. et al. (2015) -- Untangling cross-frequency coupling. Curr Opin Neurobiol 31:51-61.

License

Apache License 2.0 -- see LICENSE. Commercial use requires an Enterprise License -- see LICENSE-ENTERPRISE.


Maintained by TAURUS AI Corp -- pioneering quantum-safe biological signal analysis.

About

Generalized Cross-Frequency Decomposition (GCFD) for EEG/MEG phase synchronization. Open-source theta-gamma coherence tracker by TAURUS AI Corp.

Topics

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
LICENSE-ENTERPRISE

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors