The Ethopy plugin system provides a flexible way to extend the functionality by adding custom modules, behaviors, experiments, interfaces, and stimuli. The system supports both core modules and user plugins with intelligent conflict resolution.
Ethopy supports two types of plugins:
- Standalone Modules: Individual Python files in the plugin directory
- Categorized Plugins: Modules organized in specific categories:
-behaviors: Custom behavior implementations
-experiments: Experiment definitions
-interfaces: Hardware interface modules
-stimuli: Stimulus control modules
-
Create a virtual environment and install
EthoPy:Follow instructions in ethopy_package
-
Installation of required packages:
Install any additional required packages, instructions will be provided in the README of the specific plugin
-
Clone the full repository:
mkdir -p ~/.ethopy/ethopy_plugins/ && cd ~/.ethopy/ethopy_plugins/ git clone https://github.com/ef-lab/ethopy_plugins .
Replace
ef-labwith your username if using a fork. -
Set plugin path with environment variable:
Linux/macOS:
export ETHOPY_PLUGIN_PATH=~/.ethopy/ethopy_plugins/your_plugin
Windows:
$env:ETHOPY_PLUGIN_PATH = "$HOME\.ethopy\ethopy_plugins\your_plugin"
Replace
your_pluginwith the actual name of the plugin you want to use (e.g.,openfield,vr_ball).
- Task configuration file
your_plugin_task.py:
The task configuration file sets up the experiment parameters and stimulus conditions. You need to specify the task path, create it if doesn't exist and add the configuration file: /path_to_your_conf_file/your_plugin_task.py
- Start EthoPy with the task:
ethopy -p /path_to_your_conf_file/your_plugin_task.py- Monitor the experiment:
- Check the Control table for experiment status
- Monitor behavioral data in the database
- View log files for detailed information
- Plugin path
# Check plugin path and if it matches the one you used to transfer your files
python -c "from ethopy.plugin_manager import PluginManager; pm = PluginManager(); print(pm._plugin_paths)"- Database Connection
- Verify database credentials
- Check table permissions
- Ensure schema exists
Enable detailed logging:
ethopy --log-console --log-level DEBUG -p /path_to_your_conf_file/plugin_task.pyTask Configuration
- Use descriptive condition names
- Document parameter choices
- Test configurations before experiments
- Documentation
- Source Code
- Support