Experiment Module
Experiment module for DRIADA.
This module provides the core Experiment class and utilities for loading, saving, and generating synthetic experimental data.
Core data structures and utilities for managing neural experiments, including data loading/saving, spike reconstruction, wavelet analysis, and synthetic data generation.
Module Components
Quick Links
- Core Classes
Experiment- Main experiment containerNeuron- Single neuron analysisCore Experiment Classes - Experiment management
- Loading and Saving
load_experiment()- Load from various formatsload_exp_from_aligned_data()- Load pre-aligned datasave_exp_to_pickle()- Save experimentsload_exp_from_pickle()- Load pickled experimentsData Loading and Saving - All I/O functions
- Spike Reconstruction
reconstruct_spikes()- Main reconstruction functionwavelet_reconstruction()- Wavelet-based methodthreshold_reconstruction()- Threshold-based methodSpike Reconstruction Methods - Spike deconvolution methods
- Wavelet Analysis
extract_wvt_events()- Extract wavelet eventsget_cwt_ridges()- Find CWT ridgesWavelet Event Detection - Wavelet event detection
- Synthetic Data Generation
generate_synthetic_exp()- Basic synthetic datagenerate_circular_manifold_exp()- Head direction cellsgenerate_2d_manifold_exp()- 2D place cellsgenerate_mixed_population_exp()- Mixed populationsSynthetic Data Generation - All synthetic data generators
Usage Example
from driada.experiment import Experiment, load_exp_from_pickle
# Load saved experiment
# Replace with your actual experiment file path
# sample_pkl_path = "path/to/your/experiment.pkl"
# exp = load_exp_from_pickle(sample_pkl_path)
# Or create synthetic data
from driada.experiment import generate_circular_manifold_exp
exp = generate_circular_manifold_exp(
n_neurons=50,
duration=600,
noise_std=0.1
)
# Access data
calcium_data = exp.calcium # MultiTimeSeries
# Reconstruct spikes
from driada.experiment import reconstruct_spikes
spikes = reconstruct_spikes(exp.calcium, fps=exp.fps, method='wavelet')