API Reference#

This page documents the public API exposed by calibrain and the workflow entrypoints used by the current pipeline. Internal helpers are intentionally not listed here unless they define a stable data contract.

Top-level public API#

LeadfieldBuilder

Simulates leadfield matrices based on a configuration dictionary.

SourceSimulator

Simulate synthetic source coefficients for three settings:

SensorSimulator

Simulates synthetic sensor-level measurements from source-level activity.

SourceEstimator

UncertaintyEstimator

Uncertainty estimator for fixed- and free-orientation source estimates.

UncertaintyCalibrator

Uncertainty Calibrator

MetricEvaluator

Evaluator aligned with the updated UncertaintyEstimator.

Visualizer

DataGenerator

gamma_map_sflex

gamma_lambda_map_sflex

Unified sFLEX + gamma-lambda MAP.

BMN

BMN estimate with optional sLORETA normalization.

BMN_joint

BMN estimate with optional sLORETA normalization and optional adaptive common-noise learning.

Workflow entrypoints#

Data model helpers#

Metric and utility helpers#

metric_evaluation.get_subset_source_rr

Get subset-aligned source coordinates for EMD and other source-space metrics.

uncertainty_estimation.lift_reduced_sources_to_3d

Lift reduced coordinates back to the retained local 3D source basis.

utils.get_data_path

Get the path to CaliBrain data directory.

utils.load_config

Load the configuration from a YAML file.

utils.load_python_config

Execute a Python config file and return its CONFIG dict.