Quick Start Guide¶
Get up and running with CLoPy in minutes.
Running Your First Experiment¶
CLNF Experiment (Single ROI)¶
cd clopy
python brain/cla_reward_punish_1roi.py
CLNF Experiment (Dual ROI)¶
cd clopy
python brain/cla_reward_punish_2roi.py
CLMF Experiment¶
cd clopy
python behavior/cla_dlc_trials_speed.py
What Happens Next¶
-
Mouse ID Prompt: Enter your mouse identifier
Please enter mouse ID: M001 -
Preview Window: A preview window appears showing:
- Live camera feed
- ROI positions (draggable rectangles)
- DFF (ΔF/F) visualization
- Luminosity sparklines
-
Verify Setup: Ensure:
- Camera is properly positioned
- ROI covers the target brain region
- Bregma landmark is visible
- Lighting is adequate
-
Start Session: Press
Escto begin the experiment -
During Experiment:
- Trials start automatically after initial rest period
- Audio tones play during active trials
- Green LED flashes on successful trials
- Red LED flashes on failed trials
-
End Session: Press
Escto stop early, or let it complete
Understanding the Trial Flow¶
┌─────────────────────────────────────────────────────────────┐
│ Trial Structure │
├─────────────────────────────────────────────────────────────┤
│ │
│ ┌──────────┐ ┌──────────────┐ ┌────────────┐ │
│ │ Rest │───▶│ Trial │───▶│ Outcome │ │
│ │ Period │ │ (max 30s) │ │ │ │
│ └──────────┘ └──────────────┘ └────────────┘ │
│ 10-15 seconds │ │
│ ▼ │
│ ┌───────┴───────┐ │
│ │ │ │
│ Success Fail │
│ (reward) (buzzer) │
│ │ │ │
│ ▼ ▼ │
│ 10s rest 15s rest │
│ │
└─────────────────────────────────────────────────────────────┘
Key Controls¶
| Key | Action |
|---|---|
Esc |
Start/Stop experiment |
| Mouse Drag | Move ROI positions |
Esc (during trial) |
Abort session |
Data Output¶
After each session, data is saved to:
data_root/mouse_id/YYYYMMDDHHMMSS/
├── config.ini # Session configuration
├── image_stream.hdf5 # Raw imaging data (CLNF)
├── video.mp4 # Behavior video (CLMF)
└── VideoTimestamp.txt # Trial-by-trial log
Configuration First¶
Before running experiments, you'll need to configure:
- Camera settings in
config.ini - ROI positions (brain regions)
- Reward thresholds
- Trial parameters
See Configuration Guide for details.