Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

195 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cued Taste Experiment System

This repository contains software for running behavioral experiments with visual cues and taste rewards, primarily designed for neuroscience research. The system integrates Pygame-based visual stimuli with hardware control for nose pokes and reward delivery.

System Overview

This project consists of two main components:

  1. Visual Cue System: Pygame-based visual stimuli displayed on a screen
  2. Behavioral Control System: Hardware interface for nose pokes, reward delivery, and experiment control

Key Components

Visual Cue Types

  • Vertical Bars: Moving vertical bars (most common cue type)
  • Horizontal Bars: Moving horizontal bars
  • Diagonal Bars: Moving diagonal lines
  • Block Sets: Configurable patterns of moving elements

Hardware Interface

  • NosePoke Class: Controls LED indicators and IR beam detection for animal interaction
  • Cue Class: Manages cue presentation and timing
  • GPIO Integration: Interfaces with Raspberry Pi GPIO for hardware control
  • Intan Integration: Optional integration with Intan recording systems

Directory Structure

  • May_2021/: Early versions of the cue and behavioral systems
  • May_2022/: Updated versions with improved functionality
  • dec_2021/: Intermediate development versions
  • official_experiment/: Production-ready experiment implementations
    • official_cuedtaste.py: Main behavioral control script
    • official_cues.py: Main visual cue presentation script
    • intan_official_cuedtaste.py: Version with Intan recording integration
    • water_cue.py: Water reward variant
    • against_water_cues.py: Alternative water reward paradigm
    • cue_forward_training.py: Training protocol script

Core Classes

Block Class

The fundamental visual element used to create cues:

class Block(pg.sprite.Sprite):
    """
    Represents a moving visual element that derives from Pygame's Sprite class.
    """

NosePoke Class

Interfaces with hardware for animal interaction:

class NosePoke:
    """
    Controls a nose poke port with LED indicator and IR beam detection.
    """

Usage Examples

Running a Basic Experiment

  1. Start the cue display on the stimulus computer:
python official_experiment/official_cues.py
  1. Start the behavioral control on the control computer:
python official_experiment/official_cuedtaste.py

Training Protocol

For animal training sessions:

python official_experiment/cue_forward_training.py

Hardware Requirements

  • Raspberry Pi (for behavioral control)
  • Display monitor (for visual cues)
  • GPIO-connected nose poke ports with IR beams
  • Solenoid valves for taste delivery
  • Optional: Intan recording system

Communication

The system uses inter-process communication between the visual cue display and the behavioral control components, allowing synchronized experiment control.

Development History

The repository contains multiple iterations of the system, with progressive improvements in functionality and reliability. The most current and stable versions are in the official_experiment/ directory.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages