Recent Releases of https://github.com/braindatalab/calibrain

https://github.com/braindatalab/calibrain - v0.1.2

CaliBrain v0.1.2 – Major Refactor, Unit Consistency, new Inverse Solver and Evaluation Metrics

This release introduces a complete codebase refactor, improved physical unit handling, and an expanded evaluation framework. This version simplifies the API, improves simulation realism, and adds extensive tools for uncertainty and accuracy analysis.


Highlights

New Features

  • Modular class-based architecture:
    • SourceSimulator, SensorSimulator, MetricEvaluator, Visualizer
  • Added new evaluation metrics:
    • Uncertainty: mean_posterior_std
    • Calibration: mean_calibration_error, max_underconfidence_deviation, max_overconfidence_deviation, mean_absolute_deviation, mean_signed_deviation
    • Spatial Accuracy: emd, jaccard_error, mse
    • Detection Performance: euclidean_distance, f1, accuracy
  • Integrated eLORETA as a distributed inverse solution
  • Unit-aware plotting with auto-scaled labels for EEG, MEG, and source signals
  • Comprehensive tutorials and example notebooks
  • Fully restructured and expanded documentation

Improvements

  • Refactored simulation pipeline for clarity and modularity
  • Improved ERP waveform generation and parameter handling
  • Leadfield projection now supports channel filtering and orientation types

Bug Fixes

  • Resolved inconsistent unit usage across simulation pipeline (#18):
    • Converted source dipole values from nAm to Am
    • Standardized EEG/MEG output to SI units (V, T)
    • Visualizations now infer appropriate scale (e.g., microvolts, femtotesla)

What's Changed

  • Feat: Integrate Real Subject Leadfields by @orabe in https://github.com/braindatalab/CaliBrain/pull/9
  • Enhance UncertaintyEstimator class by @orabe in https://github.com/braindatalab/CaliBrain/pull/11
  • Spatial cv by @AliHashemi-ai in https://github.com/braindatalab/CaliBrain/pull/14
  • All Metrics by @IsmailHuseynov in https://github.com/braindatalab/CaliBrain/pull/13
  • Implement Calibration and Uncertainty Metrics for Inverse Solver by @orabe in https://github.com/braindatalab/CaliBrain/pull/15
  • Implement Multiple Top-Level Seeds for Benchmark Generalization by @orabe in https://github.com/braindatalab/CaliBrain/pull/16
  • Add Alpha-SNR-Based Noise Model for Sensor Signal Simulation by @orabe in https://github.com/braindatalab/CaliBrain/pull/17
  • Major Refactor and Feature Expansion of CaliBrain Framework by @orabe in https://github.com/braindatalab/CaliBrain/pull/19

Full Changelog: https://github.com/braindatalab/CaliBrain/compare/v0.1.1...v0.1.2

- Python
Published by orabe 11 months ago

https://github.com/braindatalab/calibrain - v0.1.1

ERP-like EEG Data Simulation & Enhancements

This release introduces enhancement to the data simulation for a more realistic ERP-like EEG signals. It also includes improvements to noise handling and refactoring of the data simulation pipeline by @orabe (see PR #7).

Key Enhancements:

  • ERP-like EEG Data Simulation (Closes #6):
    • Source-Level ERP Generation: Implemented a pipeline to generate plausible ERP signals at selected sources. This involves:
      • Generating band-limited, temporally windowed white noise.
      • Applying Butterworth bandpass filtering.
      • Windowing with a Hanning window (now supporting random length and duration) for smooth onsets/offsets.
      • Normalization and amplitude scaling.
    • Sensor-Level Projection: Projecting simulated source activity to the sensor level using the leadfield matrix.
    • Noise Modeling: Added Gaussian noise to achieve specified Signal-to-Noise Ratios (SNR).
    • Multi-Trial Simulation: Refactored DataSimulator to support multi-trial simulations.
  • Improved Noise Handling: Enhanced noise handling in both data simulation and source estimation processes.
  • Refactoring:
    • Refactored the ERP signal generation within DataSimulator.
    • Refactored the data parameter grid for more flexible experiment configuration.

Affected Files:

  • calibrain/data_simulation.py
  • calibrain/benchmark.py
  • examples/run_experiments.py

Full Changelog: v0.1.0...v0.1.1

- Python
Published by orabe about 1 year ago

https://github.com/braindatalab/calibrain - v0.1.0 - Initial Release

Initial public release of CaliBrain (v0.1.0)!

This version establishes the core foundation of CaliBrain, a Python package designed for simulating EEG/MEG data and benchmarking Brain Source Imaging (BSI) methods, with a focus on uncertainty estimation.

Core Components:

  • LeadfieldSimulator: For simulating leadfield matrices (developed by @orabe).
  • DataSimulator: For generating synthetic EEG/MEG data (developed by @orabe).
  • SourceEstimator: For estimating source activity, with initial support for the Gamma-MAP method (developed by @orabe).
  • UncertaintyEstimator: For estimating uncertainty in source activity (developed by @orabe).
  • Benchmark: A class for systematically benchmarking source estimation methods (developed by @orabe).
  • utils: A collection of utility functions (developed by @orabe).
  • vbfa.py: Implementing Variational Bayes Factor Analysis for noise learning (#2 by @AliHashemi-ai).
  • eLORETA_caliBrain.py: eLORETA implementation with posterior covariance matrix estimation (#3 by @IsmailHuseynov).
  • Contributors:

  • @orabe

  • @AliHashemi-ai

  • @IsmailHuseynov

Full Changelog: https://github.com/braindatalab/CaliBrain/commits/v0.1.0

- Python
Published by orabe about 1 year ago