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#
Simulates leadfield matrices based on a configuration dictionary. |
|
Simulate synthetic source coefficients for three settings: |
|
Simulates synthetic sensor-level measurements from source-level activity. |
|
Uncertainty estimator for fixed- and free-orientation source estimates. |
|
Uncertainty Calibrator |
|
Evaluator aligned with the updated UncertaintyEstimator. |
|
Unified sFLEX + gamma-lambda MAP. |
|
BMN estimate with optional sLORETA normalization. |
|
BMN estimate with optional sLORETA normalization and optional adaptive common-noise learning. |
Top-level public API
- calibrain.LeadfieldBuilder
- calibrain.SourceSimulator
- calibrain.SensorSimulator
- calibrain.SourceEstimator
- calibrain.UncertaintyEstimator
- calibrain.UncertaintyCalibrator
- calibrain.MetricEvaluator
- calibrain.Visualizer
- calibrain.DataGenerator
- calibrain.gamma_map_sflex
- calibrain.gamma_lambda_map_sflex
- calibrain.BMN
- calibrain.BMN_joint
Workflow entrypoints#
Data model helpers#
Typed view of a single manifest CSV row. |
|
Container describing a saved posterior summary file and metadata. |
|
Load a single posterior summary file produced by the data-generation workflow. |
|
Persist calibration payload alongside metadata in JSON format. |
|
Data model helpers
- calibrain.run_manifest.ManifestRow
- calibrain.run_manifest.load_manifest_csv
- calibrain.run_manifest.summaries_from_manifest
- calibrain.calibration_dataset.PosteriorSummary
- calibrain.calibration_dataset.load_posterior_summary
- calibrain.calibration_dataset.filter_summaries_by_metadata
- calibrain.calibration_dataset.concatenate_summaries
- calibrain.calibration_storage.save_calibration_record
- calibrain.calibration_storage.load_calibration_record
- calibrain.calibration_storage.iter_calibration_records
- calibrain.calibration_storage.stack_empirical_curves
Metric and utility helpers#
Get subset-aligned source coordinates for EMD and other source-space metrics. |
|
Lift reduced coordinates back to the retained local 3D source basis. |
|
Get the path to CaliBrain data directory. |
|
Load the configuration from a YAML file. |
|
Execute a Python config file and return its CONFIG dict. |