Skip to content

HSNPipeline/SimPlaceCells

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimPlaceCells

is a simulation and analysis framework for studying hippocampal place cells and evaluating the performance of spatial tuning metrics under controlled conditions. It allows researchers to generate synthetic neural data with customizable tuning properties, apply standard place cell detection methods, and visualize their behavior across varied parameter regimes.


📌 Key Features

  • Flexible Place Cell Simulation Generate synthetic neurons with configurable spatial tuning, peak firing rates, background activity, and noise.

  • Evaluation of Spatial Metrics Compare detection performance of spatial information, ANOVA, across simulated conditions.

  • Modular Design Code is organized into distinct modules for simulation, analysis, plotting, and utilities.

  • Reproducible Analysis Pipelines Includes Jupyter notebooks and figure scripts used for generating analyses and manuscript figures.


🗂 Repository Structure

code/sim/ — Core Simulation Engine

Simulates spike trains and tuning properties.

  • cells.py: Simulated place cell models
  • noise.py: Noise injection and variability
  • placefield.py: Place field generation
  • params.py: Parameter definitions
  • occupancy.py: Occupancy simulation
  • trials.py: Simulating Trial Structure
  • peak.py: Place Cell Peak Models
  • config.py: Centralized configuration file for simulation and analysis settings (e.g., default parameters).
  • param_vals.py: Defines sets of parameter values and sweeps for systematic exploration of simulation conditions.

code/plts/ — Analysis & Visualization

Functions for computing metrics and visualizing results.

  • methods.py: Visualize comparison between spatial info and ANOVA.
  • firingrate.py: Visualize Firing rate.
  • stats.py: Visualize parameter vs metric stats
  • trial.py: Trial-level data visualizations
  • cell.py: Single-cell visualizations
  • settings.py: Plotting configs
  • pca.py: Principal component analysis visualization

code/utils/ — Shared Utilities

  • utils.py: Helper functions

code/models.py: ANOVA Model

  • Defines helper functions and model specifications for running ANOVA-based spatial tuning analyses.

INTRO_SIM/ — Interactive Workflows

Step-by-step simulation pipelines and experiments.

  • 00-Sim_PlaceField_Components.ipynb: Place field components
  • 01-Sim_PeakModels.ipynb: Peak modulation
  • 02-Sim_PlaceFields.ipynb: Complete field simulation
  • 03-Sim_Trials.ipynb: Trial-based spike generation
  • 04-Sim_Cells_wParam_Updates.ipynb: Parametric sweeps

FIGURES_SIM/ — Manuscript Figures

Jupyter notebooks for generating main and supplemental figures:

  • FIGURE_1a_SimPlaceField.ipynb: Simulates and visualizes example single place fields (Figure 1a).
  • FIGURE_5a_PlaceFieldSimulation.ipynb: Runs place field simulations across conditions (Figure 5a).
  • FIGURE_5bc_SimParams.ipynb: Explores simulation parameters (e.g., tuning width, noise) and summarizes effects (Figures 5b, 5c).
  • FIGURE_6a_PlaceFieldParams.ipynb: Analyzes place field parameters (e.g., peak rate, field size) and generates plots (Figure 6a).
  • FIGURE_6bc_ParamsMethods.ipynb: Compares parameter estimation/statistical methods (Figures 6b, 6c).
  • FIGURE_FeatureEstimate.ipynb: Computes feature estimates.
  • FIGURE_PCA.ipynb: Performs PCA on simulated features to visualize high-dimensional relationships.

🚀 Getting Started

  1. Clone the repository:

    git clone https://github.com/HSNPipeline/SimPlaceCells
    cd SimPlaceCells
  2. Install dependencies:

    pip install -r requirements.txt

🧪 Example Use Cases

  • Analyze how tuning properties affect place cell detection.
  • Test detection metrics across different parameter regimes.
  • Visualize simulated rate maps, and tuning curves.
  • Reproduce figures for publication or presentations.

📫 Contact

For questions or contributions, please open an issue or contact the maintainers.

About

Simulation project exploring place cells & place-related analyses.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •