Setup Configuration in EthoPy¶
The setup configuration system in EthoPy is managed through the setup_conf_idx
(Setup Configuration Index) and associated tables. This system allows users to define and manage different hardware configurations for experimental setups.
Setup Configuration Index (setup_conf_idx
)¶
The setup_conf_idx
is a unique identifier that links together all components of a particular setup configuration. It's defined in the main SetupConfiguration
table and referenced by all related configuration tables.
Main Configuration Table¶
1 2 3 4 5 |
|
Component Configuration Tables¶
1. Port Configuration (SetupConfiguration.Port
)¶
Defines the configuration for input/output ports.
1 2 3 4 5 6 7 8 9 |
|
Port Types and Flags¶
- Types:
Lick
: For lick detectionProximity
: For proximity detection
- Flags:
ready
: Port can be used for is_ready function which indicate that the port is being activate for specific durationresponse
: Port can register responsesreward
: Port can deliver rewardsinvert
: Invert port signal
2. Screen Configuration (SetupConfiguration.Screen
)¶
Defines display settings for visual stimuli.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
3. Ball Configuration (SetupConfiguration.Ball
)¶
Defines settings for ball-based interfaces (e.g., virtual reality).
1 2 3 4 5 6 |
|
4. Speaker Configuration (SetupConfiguration.Speaker
)¶
Defines audio output settings.
1 2 3 4 5 6 7 |
|
5. Camera Configuration (SetupConfiguration.Camera
)¶
Defines camera settings for behavioral recording.
1 2 3 4 5 6 7 8 9 10 11 |
|
Creating a New Setup Configuration¶
To create a new setup configuration:
-
Add Main Configuration Entry
1 2 3 4 5 6
# Add to SetupConfiguration.contents [ setup_conf_idx, # Unique identifier interface_type, # e.g., "RPPorts" description # Setup description ]
-
Add Component Configurations
1 2 3 4 5 6 7 8 9 10 11
# Example: Adding port configuration SetupConfiguration.Port.insert1({ 'setup_conf_idx': your_idx, 'port': port_number, 'type': 'Lick', 'ready': 0, 'response': 1, 'reward': 1, 'invert': 0, 'discription': 'Reward port' })
-
Add Required Components
- Add entries to relevant component tables (Screen, Camera, etc.)
- Each component must reference the same
setup_conf_idx
Usage Example¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
|
Troubleshooting¶
- Component Initialization Failures
- Check
setup_conf_idx
references - Verify hardware connections
- Check
Default Configuration¶
EthoPy includes a default simulation configuration:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|