Skip to content

Ethopy Analysis

Ethopy Analysis

A comprehensive Python package for analyzing and visualizing behavioral data from Ethopy experiments.

Overview

Ethopy Analysis provides a modern, modular approach to behavioral data analysis with the following key features:

  • DataFrame-based: Plotting functions work with pandas DataFrames
  • Modular Design: Composable functions for different analysis levels (animal, session, comparison)
  • DataJoint-based: Works with DataJoint databases and provides DataFrame interfaces
  • Extensible: Modular function-based architecture for easy extension
  • Production Ready: Command-line interface, proper packaging, and configuration management

Package Architecture

The package is organized into focused modules:

  • data/ - Data loading and processing functions
  • plots/ - Plotting functions (DataFrame-based, DataJoint-sourced)
  • db/ - Database connectivity
  • config/ - Configuration management
  • cli.py - Command-line interface

Getting Started

  1. Install the package - Set up your environment
  2. Configure your database - Set up database connection (optional)
  3. Try the quick start - Run your first analysis
  4. Explore examples - Check out the Jupyter notebooks

Example Usage

# Basic animal analysis
from ethopy_analysis.data.loaders import get_sessions
from ethopy_analysis.plots.animal import plot_session_performance

# Load data
sessions = get_sessions(animal_id=123, min_trials=20)

# Create visualization
fig, ax = plot_session_performance(123, sessions['session'].values)

Support

  • Issues: Report bugs and request features on GitHub
  • Documentation: Complete API reference and examples
  • Examples: Jupyter notebooks with real analysis workflows