Skip to content

API Reference

This section provides complete API documentation for all CoMPASS-Labyrinth modules, automatically generated from docstrings in the source code.

Overview

The CoMPASS-Labyrinth API is organized into several main modules:

Core Module

Core utilities for project initialization, data loading, and figure management.

  • Core Utilities - Project initialization, data loading, configuration

Behavior Module

Tools for behavioral data preprocessing and analysis.

CoMPASS Module

Implementation of the two-level hierarchical probabilistic framework.

Level 1: Motor State Inference

Level 2: Cognitive State Inference

Post-hoc Analysis Module

Tools for analyzing model outputs.

Quick Import Reference

# Core functions
from compass_labyrinth import init_project, load_project

# Behavior analysis
from compass_labyrinth.behavior.preprocessing import preprocessing_utils
from compass_labyrinth.behavior.behavior_metrics.task_performance_analysis import (
    performance_metrics,
    success_metrics,
    trajectory_analysis
)

# CoMPASS Level 1
from compass_labyrinth.compass.level_1 import prep_data, momentu, visualization

# CoMPASS Level 2
from compass_labyrinth.compass.level_2 import datastreams, model, plots, utils

# Post-hoc analysis
from compass_labyrinth.post_hoc_analysis.level_1 import (
    spatial_analysis,
    temporal_analysis,
    bout_analysis,
    grid_heatmap
)

Documentation Conventions

  • Parameters Function parameters with type hints and descriptions
  • Returns: Return values with type information
  • Examples: Usage examples where available
  • Source: Link to view source code on GitHub

All documentation is auto-generated from numpy-style docstrings in the source code.