etho-python 0.22.0__tar.gz → 0.23.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- etho_python-0.23.0/.github/workflows/python-package.yml +41 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/.gitignore +1 -1
- etho_python-0.23.0/CONTRIBUTING.md +2 -0
- etho_python-0.23.0/PKG-INFO +229 -0
- etho_python-0.23.0/README.md +181 -0
- etho_python-0.23.0/docs/Makefile +32 -0
- etho_python-0.23.0/docs/README.md +4 -0
- etho_python-0.23.0/docs/_templates/api_head.rst +13 -0
- etho_python-0.23.0/docs/_templates/autosummary/module.rst +5 -0
- etho_python-0.23.0/docs/api/etho.app.rst +5 -0
- etho_python-0.23.0/docs/api/etho.cli.rst +5 -0
- etho_python-0.23.0/docs/api/etho.client.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.BLTZeroService.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.DAQZeroService.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.GCMZeroService.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.GOVZeroService.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.NICounterZeroService.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.TemplateZeroService.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.ZeroService.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.camera.base.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.camera.basler.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.camera.dummy.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.camera.hamamatsu.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.camera.spinnaker.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.camera.ximea.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.dlp.dlp_make_warpfiles.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.utils.concurrent_task.rst +5 -0
- etho_python-0.23.0/docs/api/etho.services.utils.log_exceptions.rst +5 -0
- etho_python-0.23.0/docs/api/etho.utils.calibration.rst +5 -0
- etho_python-0.23.0/docs/api/etho.utils.config.rst +5 -0
- etho_python-0.23.0/docs/api/etho.utils.runner.rst +5 -0
- etho_python-0.23.0/docs/api/etho.utils.shuffled_cycle.rst +5 -0
- etho_python-0.23.0/docs/api/etho.utils.sound.rst +5 -0
- etho_python-0.23.0/docs/api/etho.utils.tui.rst +5 -0
- etho_python-0.23.0/docs/api/etho.utils.zeroclient.rst +5 -0
- etho_python-0.23.0/docs/api_etho.rst +42 -0
- etho_python-0.23.0/docs/callbacks.md +91 -0
- etho_python-0.23.0/docs/cli.md +122 -0
- etho_python-0.23.0/docs/conf.py +105 -0
- etho_python-0.23.0/docs/configuration/calibration_led.md +30 -0
- etho_python-0.23.0/docs/configuration/calibration_speaker.md +62 -0
- etho_python-0.23.0/docs/configuration/configuration.rst +24 -0
- etho_python-0.23.0/docs/configuration/global.md +38 -0
- etho_python-0.23.0/docs/configuration/playlist.md +74 -0
- etho_python-0.23.0/docs/configuration/protocol.md +158 -0
- etho_python-0.23.0/docs/hardware/camera.md +49 -0
- etho_python-0.23.0/docs/hardware/hardware.rst +19 -0
- etho_python-0.23.0/docs/hardware/nidaq.md +57 -0
- etho_python-0.23.0/docs/hardware/projector.md +31 -0
- etho_python-0.23.0/docs/hardware/scanimage.md +45 -0
- etho_python-0.23.0/docs/index.rst +27 -0
- etho_python-0.23.0/docs/install.md +93 -0
- etho_python-0.23.0/docs/logging.md +45 -0
- etho_python-0.23.0/docs/make.bat +35 -0
- etho_python-0.23.0/docs/make_api_doctree.py +46 -0
- etho_python-0.23.0/docs/quickstart.md +93 -0
- etho_python-0.23.0/docs/tutorial.md +143 -0
- etho_python-0.23.0/paper/paper.md +1 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/pyproject.toml +6 -5
- etho_python-0.23.0/src/etho/__init__.py +17 -0
- etho_python-0.23.0/src/etho/assets/etho_icon1_pipeline_dark.svg +23 -0
- etho_python-0.23.0/src/etho/assets/etho_icon1_pipeline_light.svg +30 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/utils/config.py +10 -10
- etho_python-0.23.0/tests/test_config.py +23 -0
- etho_python-0.22.0/PKG-INFO +0 -49
- etho_python-0.22.0/README.md +0 -3
- etho_python-0.22.0/src/etho/__init__.py +0 -9
- etho_python-0.22.0/tests/test_config.py +0 -8
- {etho_python-0.22.0 → etho_python-0.23.0}/.github/workflows/static.yml +0 -0
- {etho_python-0.22.0/src/etho/assets → etho_python-0.23.0/docs/_static}/etho_icon1_pipeline_dark.svg +0 -0
- {etho_python-0.22.0/src/etho/assets → etho_python-0.23.0/docs/_static}/etho_icon1_pipeline_light.svg +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/app.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/cli.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/client.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/ANAZeroService.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/BLTZeroService.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/DAQZeroService.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/DLPZeroService.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/GCMZeroService.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/GOVZeroService.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/NICounterZeroService.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/NITriggerZeroService.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/TemplateZeroService.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/ZeroService.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/__init__.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/callbacks/__init__.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/callbacks/_base.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/callbacks/_image.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/callbacks/_trace.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/camera/__init__.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/camera/base.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/camera/basler.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/camera/dummy.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/camera/hamamatsu.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/camera/spinnaker.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/camera/ximea.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/daq/IOTask.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/daq/ai.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/dlp/dlp_make_warpfiles.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/dlp/dlp_runners.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/utils/__init__.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/utils/concurrent_task.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/services/utils/log_exceptions.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/utils/__init__.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/utils/calibration.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/utils/runner.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/utils/shuffled_cycle.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/utils/sound.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/utils/tui.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/src/etho/utils/zeroclient.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/tests/test_config.yaml +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/tests/test_gov_service.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/tests/test_import.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/tests/test_services.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/tests/test_shuffled_cycle.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/tests/test_sound.py +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/tests/test_sound_playlist_mirrorled.txt +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/tests/test_sound_playlist_mono.txt +0 -0
- {etho_python-0.22.0 → etho_python-0.23.0}/tests/test_sound_playlist_stereo.txt +0 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
|
3
|
+
|
|
4
|
+
name: Test
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ "master" ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ "master" ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
|
|
15
|
+
runs-on: windows-latest
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
python-version: ["3.10"] # , "3.13", "3.14"]
|
|
20
|
+
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v4
|
|
23
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
24
|
+
uses: actions/setup-python@v3
|
|
25
|
+
with:
|
|
26
|
+
python-version: ${{ matrix.python-version }}
|
|
27
|
+
- name: Install dependencies
|
|
28
|
+
run: |
|
|
29
|
+
python -m pip install --upgrade pip uv
|
|
30
|
+
uv pip install flake8 pytest --system
|
|
31
|
+
uv pip install ".[dev,docs]" --upgrade --system
|
|
32
|
+
|
|
33
|
+
- name: Lint with flake8
|
|
34
|
+
run: |
|
|
35
|
+
# stop the build if there are Python syntax errors or undefined names
|
|
36
|
+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
|
37
|
+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
38
|
+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
39
|
+
- name: Test with pytest
|
|
40
|
+
run: |
|
|
41
|
+
pytest
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: etho-python
|
|
3
|
+
Version: 0.23.0
|
|
4
|
+
Summary: etho
|
|
5
|
+
Author-email: Jan Clemens <clemensjan@googlemail.com>
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Requires-Dist: numpy
|
|
10
|
+
Requires-Dist: scipy
|
|
11
|
+
Requires-Dist: h5py
|
|
12
|
+
Requires-Dist: opencv-python-headless
|
|
13
|
+
Requires-Dist: bleak
|
|
14
|
+
Requires-Dist: pandas
|
|
15
|
+
Requires-Dist: pyzmq
|
|
16
|
+
Requires-Dist: gevent
|
|
17
|
+
Requires-Dist: future
|
|
18
|
+
Requires-Dist: pillow
|
|
19
|
+
Requires-Dist: msgpack-python
|
|
20
|
+
Requires-Dist: pyyaml
|
|
21
|
+
Requires-Dist: ipython
|
|
22
|
+
Requires-Dist: defopt
|
|
23
|
+
Requires-Dist: msgpack-numpy
|
|
24
|
+
Requires-Dist: rich
|
|
25
|
+
Requires-Dist: psutil
|
|
26
|
+
Requires-Dist: tables
|
|
27
|
+
Requires-Dist: pydaqmx
|
|
28
|
+
Requires-Dist: pyqtgraph
|
|
29
|
+
Requires-Dist: qtpy
|
|
30
|
+
Requires-Dist: PySide6-Essentials
|
|
31
|
+
Requires-Dist: zarr
|
|
32
|
+
Requires-Dist: zerorpc-numpy
|
|
33
|
+
Requires-Dist: pytest ; extra == "dev"
|
|
34
|
+
Requires-Dist: flit>=3.2,<4 ; extra == "dev"
|
|
35
|
+
Requires-Dist: sphinx ; extra == "doc"
|
|
36
|
+
Requires-Dist: furo ; extra == "doc"
|
|
37
|
+
Requires-Dist: sphinx-inline-tabs ; extra == "doc"
|
|
38
|
+
Requires-Dist: sphinx-copybutton ; extra == "doc"
|
|
39
|
+
Requires-Dist: ghp-import ; extra == "doc"
|
|
40
|
+
Requires-Dist: myst-nb ; extra == "doc"
|
|
41
|
+
Requires-Dist: sphinx-panels ; extra == "doc"
|
|
42
|
+
Requires-Dist: sphinxcontrib-images ; extra == "doc"
|
|
43
|
+
Project-URL: documentation, https://janclemenslab.org/etho/
|
|
44
|
+
Project-URL: source, https://github.com/janclemenslab/etho
|
|
45
|
+
Provides-Extra: dev
|
|
46
|
+
Provides-Extra: doc
|
|
47
|
+
|
|
48
|
+
# `etho`: A Python framework for coordinating stimuli, data acquisition, and hardware control in neuroscience experiments
|
|
49
|
+
|
|
50
|
+
[](https://github.com/janclemenslab/etho/actions/workflows/python-package.yml)
|
|
51
|
+
[](https://janclemenslab.org/etho)
|
|
52
|
+
[](LICENSE)
|
|
53
|
+
|
|
54
|
+
`etho` is an open-source Python framework for running behavioral neuroscience experiments that require coordinated stimulus presentation, hardware control, data acquisition, and experiment logging.
|
|
55
|
+
|
|
56
|
+
It was developed for experiments on acoustic communication and social behavior, where multiple hardware devices must operate together with reproducible timing. `etho` coordinates cameras, National Instruments DAQ hardware, acoustic and optogenetic stimulation, environmental sensors, and external imaging systems through a modular service-based architecture.
|
|
57
|
+
|
|
58
|
+
The software is designed to make experiments reproducible, configurable, and maintainable by separating:
|
|
59
|
+
- experiment logic (`protocol.yaml`)
|
|
60
|
+
- stimulus definitions (`playlist.txt`)
|
|
61
|
+
- hardware calibration
|
|
62
|
+
- acquisition callbacks
|
|
63
|
+
- service-level logs
|
|
64
|
+
|
|
65
|
+
from the underlying device code.
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Features
|
|
70
|
+
|
|
71
|
+
- Modular service-based architecture
|
|
72
|
+
- Coordinated control of heterogeneous hardware
|
|
73
|
+
- Human-readable YAML experiment protocols
|
|
74
|
+
- Playlist-based stimulus specification
|
|
75
|
+
- Acoustic and optogenetic stimulus generation
|
|
76
|
+
- National Instruments DAQ integration
|
|
77
|
+
- Multiple camera backends
|
|
78
|
+
- Trigger synchronization with external systems (e.g. ScanImage)
|
|
79
|
+
- Per-service experiment logging
|
|
80
|
+
- HDF5 / Zarr / video data export
|
|
81
|
+
- Command-line and GUI interfaces
|
|
82
|
+
- Calibration workflows for speakers and LEDs
|
|
83
|
+
- Callback system for online display and data processing
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Typical use cases
|
|
88
|
+
|
|
89
|
+
`etho` is intended for experiments requiring synchronized:
|
|
90
|
+
- stimulus playback
|
|
91
|
+
- analog/digital acquisition
|
|
92
|
+
- video recording
|
|
93
|
+
- optogenetic stimulation
|
|
94
|
+
- trigger generation
|
|
95
|
+
- environmental monitoring
|
|
96
|
+
|
|
97
|
+
Typical applications include:
|
|
98
|
+
- acoustic communication experiments
|
|
99
|
+
- behavioral neuroscience
|
|
100
|
+
- sensory stimulation
|
|
101
|
+
- closed-loop experiments
|
|
102
|
+
- imaging synchronization
|
|
103
|
+
- multimodal behavioral assays
|
|
104
|
+
|
|
105
|
+
Although originally developed for *Drosophila* experiments, the framework is not species-specific.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Software architecture
|
|
110
|
+
|
|
111
|
+
The experiment workflow in `etho` is organized around protocols, playlists, services, callbacks, data outputs, and logs.
|
|
112
|
+
|
|
113
|
+

|
|
114
|
+
|
|
115
|
+
1. The user selects an experiment protocol and stimulus playlist.
|
|
116
|
+
2. The experiment controller initializes the requested hardware services.
|
|
117
|
+
3. Services coordinate acquisition and stimulation during the experiment.
|
|
118
|
+
4. Callbacks save and visualize acquired data.
|
|
119
|
+
5. Each service writes detailed logs for debugging and provenance tracking.
|
|
120
|
+
6. Data, configuration, and logs together form a reproducible experiment record.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Installation
|
|
125
|
+
|
|
126
|
+
See the full installation guide:
|
|
127
|
+
|
|
128
|
+
https://janclemenslab.org/etho/install.html
|
|
129
|
+
|
|
130
|
+
Typical installation:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
conda create -n etho -y python=3.13 uv pip
|
|
134
|
+
uv venv etho
|
|
135
|
+
source etho/bin/activate
|
|
136
|
+
uv pip install etho-python
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Some hardware backends require additional vendor SDKs and drivers.
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Quick start
|
|
144
|
+
|
|
145
|
+
### Launch GUI
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
etho gui
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Run an experiment
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
etho run protocol.yaml
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Example protocol structure
|
|
158
|
+
|
|
159
|
+
```yaml
|
|
160
|
+
maxduration: 600
|
|
161
|
+
|
|
162
|
+
DAQ:
|
|
163
|
+
samplingrate: 10000
|
|
164
|
+
device: Dev1
|
|
165
|
+
|
|
166
|
+
CAMERAS:
|
|
167
|
+
frame_rate: 100
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Documentation
|
|
173
|
+
|
|
174
|
+
Full documentation is available at:
|
|
175
|
+
|
|
176
|
+
https://janclemenslab.org/etho
|
|
177
|
+
|
|
178
|
+
Documentation includes:
|
|
179
|
+
- installation
|
|
180
|
+
- hardware configuration
|
|
181
|
+
- protocol format
|
|
182
|
+
- playlists
|
|
183
|
+
- calibration
|
|
184
|
+
- callbacks
|
|
185
|
+
- logging
|
|
186
|
+
- API documentation
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Development status
|
|
191
|
+
|
|
192
|
+
`etho` has been under active development since 2018 and is used in ongoing behavioral neuroscience experiments in the Clemens laboratory.
|
|
193
|
+
|
|
194
|
+
The repository contains:
|
|
195
|
+
- automated tests
|
|
196
|
+
- continuous integration
|
|
197
|
+
- documentation
|
|
198
|
+
- example protocols
|
|
199
|
+
- public issue tracking
|
|
200
|
+
|
|
201
|
+
Contributions and bug reports are welcome.
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Contributing
|
|
206
|
+
|
|
207
|
+
Please see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
208
|
+
|
|
209
|
+
If you encounter problems or would like to request features, please open an issue:
|
|
210
|
+
https://github.com/janclemenslab/etho/issues
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Citation
|
|
215
|
+
|
|
216
|
+
If you use `etho` in research, please cite:
|
|
217
|
+
|
|
218
|
+
```bibtex
|
|
219
|
+
TODO
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
A JOSS paper describing the software is currently in preparation.
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## License
|
|
227
|
+
|
|
228
|
+
MIT License.
|
|
229
|
+
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# `etho`: A Python framework for coordinating stimuli, data acquisition, and hardware control in neuroscience experiments
|
|
2
|
+
|
|
3
|
+
[](https://github.com/janclemenslab/etho/actions/workflows/python-package.yml)
|
|
4
|
+
[](https://janclemenslab.org/etho)
|
|
5
|
+
[](LICENSE)
|
|
6
|
+
|
|
7
|
+
`etho` is an open-source Python framework for running behavioral neuroscience experiments that require coordinated stimulus presentation, hardware control, data acquisition, and experiment logging.
|
|
8
|
+
|
|
9
|
+
It was developed for experiments on acoustic communication and social behavior, where multiple hardware devices must operate together with reproducible timing. `etho` coordinates cameras, National Instruments DAQ hardware, acoustic and optogenetic stimulation, environmental sensors, and external imaging systems through a modular service-based architecture.
|
|
10
|
+
|
|
11
|
+
The software is designed to make experiments reproducible, configurable, and maintainable by separating:
|
|
12
|
+
- experiment logic (`protocol.yaml`)
|
|
13
|
+
- stimulus definitions (`playlist.txt`)
|
|
14
|
+
- hardware calibration
|
|
15
|
+
- acquisition callbacks
|
|
16
|
+
- service-level logs
|
|
17
|
+
|
|
18
|
+
from the underlying device code.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Features
|
|
23
|
+
|
|
24
|
+
- Modular service-based architecture
|
|
25
|
+
- Coordinated control of heterogeneous hardware
|
|
26
|
+
- Human-readable YAML experiment protocols
|
|
27
|
+
- Playlist-based stimulus specification
|
|
28
|
+
- Acoustic and optogenetic stimulus generation
|
|
29
|
+
- National Instruments DAQ integration
|
|
30
|
+
- Multiple camera backends
|
|
31
|
+
- Trigger synchronization with external systems (e.g. ScanImage)
|
|
32
|
+
- Per-service experiment logging
|
|
33
|
+
- HDF5 / Zarr / video data export
|
|
34
|
+
- Command-line and GUI interfaces
|
|
35
|
+
- Calibration workflows for speakers and LEDs
|
|
36
|
+
- Callback system for online display and data processing
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Typical use cases
|
|
41
|
+
|
|
42
|
+
`etho` is intended for experiments requiring synchronized:
|
|
43
|
+
- stimulus playback
|
|
44
|
+
- analog/digital acquisition
|
|
45
|
+
- video recording
|
|
46
|
+
- optogenetic stimulation
|
|
47
|
+
- trigger generation
|
|
48
|
+
- environmental monitoring
|
|
49
|
+
|
|
50
|
+
Typical applications include:
|
|
51
|
+
- acoustic communication experiments
|
|
52
|
+
- behavioral neuroscience
|
|
53
|
+
- sensory stimulation
|
|
54
|
+
- closed-loop experiments
|
|
55
|
+
- imaging synchronization
|
|
56
|
+
- multimodal behavioral assays
|
|
57
|
+
|
|
58
|
+
Although originally developed for *Drosophila* experiments, the framework is not species-specific.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Software architecture
|
|
63
|
+
|
|
64
|
+
The experiment workflow in `etho` is organized around protocols, playlists, services, callbacks, data outputs, and logs.
|
|
65
|
+
|
|
66
|
+

|
|
67
|
+
|
|
68
|
+
1. The user selects an experiment protocol and stimulus playlist.
|
|
69
|
+
2. The experiment controller initializes the requested hardware services.
|
|
70
|
+
3. Services coordinate acquisition and stimulation during the experiment.
|
|
71
|
+
4. Callbacks save and visualize acquired data.
|
|
72
|
+
5. Each service writes detailed logs for debugging and provenance tracking.
|
|
73
|
+
6. Data, configuration, and logs together form a reproducible experiment record.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Installation
|
|
78
|
+
|
|
79
|
+
See the full installation guide:
|
|
80
|
+
|
|
81
|
+
https://janclemenslab.org/etho/install.html
|
|
82
|
+
|
|
83
|
+
Typical installation:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
conda create -n etho -y python=3.13 uv pip
|
|
87
|
+
uv venv etho
|
|
88
|
+
source etho/bin/activate
|
|
89
|
+
uv pip install etho-python
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Some hardware backends require additional vendor SDKs and drivers.
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Quick start
|
|
97
|
+
|
|
98
|
+
### Launch GUI
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
etho gui
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### Run an experiment
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
etho run protocol.yaml
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### Example protocol structure
|
|
111
|
+
|
|
112
|
+
```yaml
|
|
113
|
+
maxduration: 600
|
|
114
|
+
|
|
115
|
+
DAQ:
|
|
116
|
+
samplingrate: 10000
|
|
117
|
+
device: Dev1
|
|
118
|
+
|
|
119
|
+
CAMERAS:
|
|
120
|
+
frame_rate: 100
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## Documentation
|
|
126
|
+
|
|
127
|
+
Full documentation is available at:
|
|
128
|
+
|
|
129
|
+
https://janclemenslab.org/etho
|
|
130
|
+
|
|
131
|
+
Documentation includes:
|
|
132
|
+
- installation
|
|
133
|
+
- hardware configuration
|
|
134
|
+
- protocol format
|
|
135
|
+
- playlists
|
|
136
|
+
- calibration
|
|
137
|
+
- callbacks
|
|
138
|
+
- logging
|
|
139
|
+
- API documentation
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## Development status
|
|
144
|
+
|
|
145
|
+
`etho` has been under active development since 2018 and is used in ongoing behavioral neuroscience experiments in the Clemens laboratory.
|
|
146
|
+
|
|
147
|
+
The repository contains:
|
|
148
|
+
- automated tests
|
|
149
|
+
- continuous integration
|
|
150
|
+
- documentation
|
|
151
|
+
- example protocols
|
|
152
|
+
- public issue tracking
|
|
153
|
+
|
|
154
|
+
Contributions and bug reports are welcome.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Contributing
|
|
159
|
+
|
|
160
|
+
Please see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
161
|
+
|
|
162
|
+
If you encounter problems or would like to request features, please open an issue:
|
|
163
|
+
https://github.com/janclemenslab/etho/issues
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Citation
|
|
168
|
+
|
|
169
|
+
If you use `etho` in research, please cite:
|
|
170
|
+
|
|
171
|
+
```bibtex
|
|
172
|
+
TODO
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
A JOSS paper describing the software is currently in preparation.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## License
|
|
180
|
+
|
|
181
|
+
MIT License.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SPHINXENV ?= LC_ALL=C.UTF-8 LANG=C.UTF-8
|
|
9
|
+
SOURCEDIR = .
|
|
10
|
+
BUILDDIR = _build
|
|
11
|
+
|
|
12
|
+
# Put it first so that "make" without argument is like "make help".
|
|
13
|
+
help:
|
|
14
|
+
@$(SPHINXENV) $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
15
|
+
|
|
16
|
+
.PHONY: help Makefile
|
|
17
|
+
|
|
18
|
+
push:
|
|
19
|
+
ghp-import -n -p -f _build/html -r https://github.com/janclemenslab/etho/
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
23
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
24
|
+
clean:
|
|
25
|
+
rm -rf api/*
|
|
26
|
+
rm -rf api_etho*.rst
|
|
27
|
+
@$(SPHINXENV) $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
28
|
+
|
|
29
|
+
%: Makefile
|
|
30
|
+
|
|
31
|
+
python ./make_api_doctree.py
|
|
32
|
+
@$(SPHINXENV) $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# Documentation
|
|
2
|
+
- _Install_ etho with the `doc` extra: `uv pip install etho[doc]`.
|
|
3
|
+
- _Build_ the docs via `make clean html`. A fully-rendered HTML version will be built in `docs/_build/html/`.
|
|
4
|
+
- _Publish_ the book by running `make clean html push`. This will build the book, push the static HTML files to [gh-pages](https://github.com/janclemenslab/etho/tree/gh-pages), and make it accessible at [janclemenslab.org/etho](https://janclemenslab.org/etho/).
|