etho-python 0.22.0__tar.gz → 1.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-1.0/.github/workflows/python-package.yml +41 -0
- {etho_python-0.22.0 → etho_python-1.0}/.gitignore +1 -1
- etho_python-1.0/CITATION.cff +26 -0
- etho_python-1.0/CONTRIBUTING.md +29 -0
- etho_python-1.0/PKG-INFO +121 -0
- etho_python-1.0/README.md +71 -0
- etho_python-1.0/docs/Makefile +32 -0
- etho_python-1.0/docs/README.md +4 -0
- etho_python-1.0/docs/_templates/api_head.rst +13 -0
- etho_python-1.0/docs/_templates/autosummary/module.rst +5 -0
- etho_python-1.0/docs/api/etho.app.rst +5 -0
- etho_python-1.0/docs/api/etho.cli.rst +5 -0
- etho_python-1.0/docs/api/etho.client.rst +5 -0
- etho_python-1.0/docs/api/etho.services.BLTZeroService.rst +5 -0
- etho_python-1.0/docs/api/etho.services.DAQZeroService.rst +5 -0
- etho_python-1.0/docs/api/etho.services.GCMZeroService.rst +5 -0
- etho_python-1.0/docs/api/etho.services.GOVZeroService.rst +5 -0
- etho_python-1.0/docs/api/etho.services.NICounterZeroService.rst +5 -0
- etho_python-1.0/docs/api/etho.services.TemplateZeroService.rst +5 -0
- etho_python-1.0/docs/api/etho.services.ZeroService.rst +5 -0
- etho_python-1.0/docs/api/etho.services.camera.base.rst +5 -0
- etho_python-1.0/docs/api/etho.services.camera.basler.rst +5 -0
- etho_python-1.0/docs/api/etho.services.camera.dummy.rst +5 -0
- etho_python-1.0/docs/api/etho.services.camera.hamamatsu.rst +5 -0
- etho_python-1.0/docs/api/etho.services.camera.spinnaker.rst +5 -0
- etho_python-1.0/docs/api/etho.services.camera.ximea.rst +5 -0
- etho_python-1.0/docs/api/etho.services.dlp.dlp_make_warpfiles.rst +5 -0
- etho_python-1.0/docs/api/etho.services.utils.concurrent_task.rst +5 -0
- etho_python-1.0/docs/api/etho.services.utils.log_exceptions.rst +5 -0
- etho_python-1.0/docs/api/etho.utils.calibration.rst +5 -0
- etho_python-1.0/docs/api/etho.utils.config.rst +5 -0
- etho_python-1.0/docs/api/etho.utils.runner.rst +5 -0
- etho_python-1.0/docs/api/etho.utils.shuffled_cycle.rst +5 -0
- etho_python-1.0/docs/api/etho.utils.sound.rst +5 -0
- etho_python-1.0/docs/api/etho.utils.tui.rst +5 -0
- etho_python-1.0/docs/api/etho.utils.zeroclient.rst +5 -0
- etho_python-1.0/docs/api_etho.rst +42 -0
- etho_python-1.0/docs/callbacks.md +66 -0
- etho_python-1.0/docs/cli.md +122 -0
- etho_python-1.0/docs/conf.py +115 -0
- etho_python-1.0/docs/configuration/calibration_led.md +30 -0
- etho_python-1.0/docs/configuration/calibration_speaker.md +62 -0
- etho_python-1.0/docs/configuration/configuration.rst +24 -0
- etho_python-1.0/docs/configuration/global.md +38 -0
- etho_python-1.0/docs/configuration/playlist.md +74 -0
- etho_python-1.0/docs/configuration/protocol.md +158 -0
- etho_python-1.0/docs/extensions.md +188 -0
- etho_python-1.0/docs/hardware/camera.md +49 -0
- etho_python-1.0/docs/hardware/hardware.rst +22 -0
- etho_python-1.0/docs/hardware/nidaq.md +57 -0
- etho_python-1.0/docs/hardware/projector.md +31 -0
- etho_python-1.0/docs/hardware/scanimage.md +45 -0
- etho_python-1.0/docs/index.rst +68 -0
- etho_python-1.0/docs/install.rst +83 -0
- etho_python-1.0/docs/logging.md +34 -0
- etho_python-1.0/docs/make.bat +35 -0
- etho_python-1.0/docs/make_api_doctree.py +45 -0
- etho_python-1.0/docs/tutorial.md +131 -0
- etho_python-1.0/paper/paper.md +1 -0
- {etho_python-0.22.0 → etho_python-1.0}/pyproject.toml +14 -7
- etho_python-1.0/src/etho/__init__.py +17 -0
- etho_python-1.0/src/etho/assets/etho_icon1_pipeline_dark.svg +23 -0
- etho_python-1.0/src/etho/assets/etho_icon1_pipeline_light.svg +30 -0
- etho_python-1.0/src/etho/client.py +254 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/BLTZeroService.py +45 -19
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/DAQZeroService.py +104 -20
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/DLPZeroService.py +46 -19
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/GCMZeroService.py +53 -16
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/GOVZeroService.py +29 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/NICounterZeroService.py +59 -23
- etho_python-0.22.0/src/etho/services/NITriggerZeroService.py → etho_python-1.0/src/etho/services/ScanImageTriggerZeroService.py +55 -26
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/TemplateZeroService.py +46 -20
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/ZeroService.py +11 -6
- etho_python-1.0/src/etho/services/__init__.py +52 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/callbacks/_trace.py +3 -98
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/dlp/dlp_runners.py +3 -15
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/utils/config.py +10 -10
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/utils/sound.py +2 -2
- etho_python-1.0/tests/test_config.py +23 -0
- {etho_python-0.22.0 → etho_python-1.0}/tests/test_gov_service.py +11 -87
- etho_python-1.0/tests/test_service_client_wiring.py +92 -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/src/etho/client.py +0 -384
- etho_python-0.22.0/src/etho/services/ANAZeroService.py +0 -123
- etho_python-0.22.0/src/etho/utils/__init__.py +0 -0
- etho_python-0.22.0/tests/test_config.py +0 -8
- {etho_python-0.22.0 → etho_python-1.0}/.github/workflows/static.yml +0 -0
- /etho_python-0.22.0/src/etho/assets/etho_icon1_pipeline_dark.svg → /etho_python-1.0/docs/_static/etho_dark.svg +0 -0
- /etho_python-0.22.0/src/etho/assets/etho_icon1_pipeline_light.svg → /etho_python-1.0/docs/_static/etho_light.svg +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/app.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/cli.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/callbacks/__init__.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/callbacks/_base.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/callbacks/_image.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/camera/__init__.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/camera/base.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/camera/basler.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/camera/dummy.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/camera/hamamatsu.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/camera/spinnaker.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/camera/ximea.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/daq/IOTask.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/daq/ai.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/dlp/dlp_make_warpfiles.py +0 -0
- {etho_python-0.22.0/src/etho/services → etho_python-1.0/src/etho/services/utils}/__init__.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/utils/concurrent_task.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/services/utils/log_exceptions.py +0 -0
- {etho_python-0.22.0/src/etho/services → etho_python-1.0/src/etho}/utils/__init__.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/utils/calibration.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/utils/runner.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/utils/shuffled_cycle.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/utils/tui.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/src/etho/utils/zeroclient.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/tests/test_config.yaml +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/tests/test_import.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/tests/test_services.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/tests/test_shuffled_cycle.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/tests/test_sound.py +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/tests/test_sound_playlist_mirrorled.txt +0 -0
- {etho_python-0.22.0 → etho_python-1.0}/tests/test_sound_playlist_mono.txt +0 -0
- {etho_python-0.22.0 → etho_python-1.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,26 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use etho in your research, please cite the software using the metadata below."
|
|
3
|
+
title: "etho"
|
|
4
|
+
abstract: "A Python framework for coordinating stimuli, data acquisition, and hardware control in neuroscience experiments."
|
|
5
|
+
type: software
|
|
6
|
+
|
|
7
|
+
authors:
|
|
8
|
+
- family-names: Clemens
|
|
9
|
+
given-names: Jan
|
|
10
|
+
orcid: "https://orcid.org/0000-0003-4200-8097"
|
|
11
|
+
affiliation: "Carl von Ossietzky University, Oldenburg, Germany"
|
|
12
|
+
|
|
13
|
+
repository-code: "https://github.com/janclemenslab/etho"
|
|
14
|
+
license: MIT
|
|
15
|
+
|
|
16
|
+
preferred-citation:
|
|
17
|
+
type: article
|
|
18
|
+
title: "etho: A Python framework for coordinating stimuli, data acquisition, and hardware control in neuroscience experiments"
|
|
19
|
+
authors:
|
|
20
|
+
- family-names: Clemens
|
|
21
|
+
given-names: Jan
|
|
22
|
+
orcid: "https://orcid.org/0000-0003-4200-8097"
|
|
23
|
+
affiliation: "Carl von Ossietzky University, Oldenburg, Germany"
|
|
24
|
+
journal: "tbd"
|
|
25
|
+
year: 2026
|
|
26
|
+
date-released: 2026-05-10
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thank you for your interest in contributing to `etho`.
|
|
4
|
+
|
|
5
|
+
## Reporting issues
|
|
6
|
+
|
|
7
|
+
Please use the GitHub issue tracker to report bugs, request features, or ask questions. When possible, include:
|
|
8
|
+
|
|
9
|
+
- a minimal reproducible example
|
|
10
|
+
- operating system and Python version
|
|
11
|
+
- output of `etho version`
|
|
12
|
+
- relevant log output or error messages
|
|
13
|
+
|
|
14
|
+
## Development setup
|
|
15
|
+
|
|
16
|
+
Clone the repository and install the package in editable mode:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
|
|
20
|
+
git clone https://github.com/janclemenslab/etho.git
|
|
21
|
+
|
|
22
|
+
cd etho
|
|
23
|
+
|
|
24
|
+
pip install -e ".[dev]"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Running tests
|
|
28
|
+
|
|
29
|
+
Run the test suite locally before submitting changes with `pytest`. Continuous integration (CI) tests are automatically run on all pull requests and must pass before merging.
|
etho_python-1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: etho-python
|
|
3
|
+
Version: 1.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: shibuya ; 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
|
+
Requires-Dist: sphinx-tabs ; extra == "doc"
|
|
44
|
+
Requires-Dist: sphinx-iconify ; extra == "doc"
|
|
45
|
+
Requires-Dist: sphinx-design ; extra == "doc"
|
|
46
|
+
Project-URL: documentation, https://janclemenslab.org/etho/
|
|
47
|
+
Project-URL: source, https://github.com/janclemenslab/etho
|
|
48
|
+
Provides-Extra: dev
|
|
49
|
+
Provides-Extra: doc
|
|
50
|
+
|
|
51
|
+
# `etho`: A Python framework for coordinating stimuli, data acquisition, and hardware control in neuroscience experiments
|
|
52
|
+
|
|
53
|
+
[](https://github.com/janclemenslab/etho/actions/workflows/python-package.yml)
|
|
54
|
+
[](https://janclemenslab.org/etho)
|
|
55
|
+
[](LICENSE)
|
|
56
|
+
[](https://doi.org/10.5281/zenodo.20110619)
|
|
57
|
+
|
|
58
|
+
`etho` is an open-source Python framework for running behavioral neuroscience experiments that require coordinated stimulus presentation, hardware control, data acquisition, and experiment logging.
|
|
59
|
+
|
|
60
|
+
It was developed for neuroscience experiments, 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.
|
|
61
|
+
|
|
62
|
+
The software is designed to make experiments reproducible, configurable, and maintainable by separating:
|
|
63
|
+
- experiment logic and hardware (`protocol.yaml`)
|
|
64
|
+
- stimulus definitions (`playlist.txt`)
|
|
65
|
+
- acquisition callbacks and logs
|
|
66
|
+
|
|
67
|
+
from the underlying device code.
|
|
68
|
+
|
|
69
|
+
See the [documentation](https://janclemenslab.org/etho) for details.
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## Installation
|
|
73
|
+
|
|
74
|
+
Quick installation:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
uv venv --python 3.14
|
|
78
|
+
.venv\Scripts\activate
|
|
79
|
+
uv pip install etho-python
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Some hardware backends require additional vendor SDKs and drivers and specific python versions.
|
|
83
|
+
See the full [installation guide](https://janclemenslab.org/etho/install.html).
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## Usage
|
|
87
|
+
|
|
88
|
+
Etho can be controlled via a GUI. Launch it with:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
etho gui
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Alternatively, experiments can be run from the terminal:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
etho run protocol.yaml
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Data generated by etho can be inspected, annotated, and analyzed with [xarray-behave](https://github.com/janclemenslab/xarray-behave).
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
## Citation
|
|
104
|
+
|
|
105
|
+
If you use `etho`earch, please cite:
|
|
106
|
+
|
|
107
|
+
```bibtex
|
|
108
|
+
TODO
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
A [JOSS paper](paper/paper.md) describing the software is in preparation.
|
|
112
|
+
|
|
113
|
+
The `etho` software has been used in the following publications:
|
|
114
|
+
|
|
115
|
+
- Vijendravarma, R. K., Narasimha, S., Steinfath, E., Clemens, J., & Leopold, P. (2022). *Drosophila* females have an acoustic preference for symmetric males. Proceedings of the National Academy of Sciences, 119(13), e2116136119. https://doi.org/10.1073/pnas.2116136119
|
|
116
|
+
|
|
117
|
+
- Steinfath, E., Khalili, A., Stenger, M., Schultze, B. L., Nair, S. R., Alizadeh, K., & Clemens, J. (2025). A neural circuit for context-dependent multimodal signaling in *Drosophila*. Nature Communications, 16, 9472. https://doi.org/10.1038/s41467-025-64907-9
|
|
118
|
+
|
|
119
|
+
- Palacios-Muñoz, A., & Clemens, J. (2025). *Drosophila* males integrate song and pheromones using context-specific strategies. bioRxiv. https://doi.org/10.1101/2025.07.25.666755
|
|
120
|
+
|
|
121
|
+
- Ravindran Nair, S., Palacios-Muñoz, A., Martineau, S., Nasr, M., & Clemens, J. (2026). Sex-specific behavioral feedback modulates sensorimotor processing and drives flexible social behavior. Nature Communications, 17, 4026. https://doi.org/10.1038/s41467-026-72057-9
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
[](https://doi.org/10.5281/zenodo.20110619)
|
|
7
|
+
|
|
8
|
+
`etho` is an open-source Python framework for running behavioral neuroscience experiments that require coordinated stimulus presentation, hardware control, data acquisition, and experiment logging.
|
|
9
|
+
|
|
10
|
+
It was developed for neuroscience experiments, 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.
|
|
11
|
+
|
|
12
|
+
The software is designed to make experiments reproducible, configurable, and maintainable by separating:
|
|
13
|
+
- experiment logic and hardware (`protocol.yaml`)
|
|
14
|
+
- stimulus definitions (`playlist.txt`)
|
|
15
|
+
- acquisition callbacks and logs
|
|
16
|
+
|
|
17
|
+
from the underlying device code.
|
|
18
|
+
|
|
19
|
+
See the [documentation](https://janclemenslab.org/etho) for details.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
Quick installation:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
uv venv --python 3.14
|
|
28
|
+
.venv\Scripts\activate
|
|
29
|
+
uv pip install etho-python
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Some hardware backends require additional vendor SDKs and drivers and specific python versions.
|
|
33
|
+
See the full [installation guide](https://janclemenslab.org/etho/install.html).
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
Etho can be controlled via a GUI. Launch it with:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
etho gui
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Alternatively, experiments can be run from the terminal:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
etho run protocol.yaml
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Data generated by etho can be inspected, annotated, and analyzed with [xarray-behave](https://github.com/janclemenslab/xarray-behave).
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## Citation
|
|
54
|
+
|
|
55
|
+
If you use `etho`earch, please cite:
|
|
56
|
+
|
|
57
|
+
```bibtex
|
|
58
|
+
TODO
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
A [JOSS paper](paper/paper.md) describing the software is in preparation.
|
|
62
|
+
|
|
63
|
+
The `etho` software has been used in the following publications:
|
|
64
|
+
|
|
65
|
+
- Vijendravarma, R. K., Narasimha, S., Steinfath, E., Clemens, J., & Leopold, P. (2022). *Drosophila* females have an acoustic preference for symmetric males. Proceedings of the National Academy of Sciences, 119(13), e2116136119. https://doi.org/10.1073/pnas.2116136119
|
|
66
|
+
|
|
67
|
+
- Steinfath, E., Khalili, A., Stenger, M., Schultze, B. L., Nair, S. R., Alizadeh, K., & Clemens, J. (2025). A neural circuit for context-dependent multimodal signaling in *Drosophila*. Nature Communications, 16, 9472. https://doi.org/10.1038/s41467-025-64907-9
|
|
68
|
+
|
|
69
|
+
- Palacios-Muñoz, A., & Clemens, J. (2025). *Drosophila* males integrate song and pheromones using context-specific strategies. bioRxiv. https://doi.org/10.1101/2025.07.25.666755
|
|
70
|
+
|
|
71
|
+
- Ravindran Nair, S., Palacios-Muñoz, A., Martineau, S., Nasr, M., & Clemens, J. (2026). Sex-specific behavioral feedback modulates sensorimotor processing and drives flexible social behavior. Nature Communications, 17, 4026. https://doi.org/10.1038/s41467-026-72057-9
|
|
@@ -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/).
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
..
|
|
2
|
+
This file is auto-generated.
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
.. _api:
|
|
6
|
+
|
|
7
|
+
Developer API
|
|
8
|
+
=============
|
|
9
|
+
|
|
10
|
+
.. toctree::
|
|
11
|
+
:caption: API
|
|
12
|
+
:maxdepth: 1
|
|
13
|
+
|
|
14
|
+
.. autosummary::
|
|
15
|
+
:toctree: api
|
|
16
|
+
|
|
17
|
+
etho.app
|
|
18
|
+
etho.cli
|
|
19
|
+
etho.client
|
|
20
|
+
etho.utils.calibration
|
|
21
|
+
etho.utils.config
|
|
22
|
+
etho.utils.runner
|
|
23
|
+
etho.utils.shuffled_cycle
|
|
24
|
+
etho.utils.sound
|
|
25
|
+
etho.utils.tui
|
|
26
|
+
etho.utils.zeroclient
|
|
27
|
+
etho.services.BLTZeroService
|
|
28
|
+
etho.services.DAQZeroService
|
|
29
|
+
etho.services.GCMZeroService
|
|
30
|
+
etho.services.GOVZeroService
|
|
31
|
+
etho.services.NICounterZeroService
|
|
32
|
+
etho.services.TemplateZeroService
|
|
33
|
+
etho.services.ZeroService
|
|
34
|
+
etho.services.camera.base
|
|
35
|
+
etho.services.camera.basler
|
|
36
|
+
etho.services.camera.dummy
|
|
37
|
+
etho.services.camera.hamamatsu
|
|
38
|
+
etho.services.camera.spinnaker
|
|
39
|
+
etho.services.camera.ximea
|
|
40
|
+
etho.services.utils.concurrent_task
|
|
41
|
+
etho.services.utils.log_exceptions
|
|
42
|
+
etho.services.dlp.dlp_make_warpfiles
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Callbacks
|
|
2
|
+
|
|
3
|
+
Callbacks process data produced by services. Camera callbacks receive frames and
|
|
4
|
+
timestamps. DAQ callbacks receive analog input chunks and metadata. Use
|
|
5
|
+
callbacks to save data, display live previews, or stream derived information.
|
|
6
|
+
|
|
7
|
+
## Protocol Syntax
|
|
8
|
+
|
|
9
|
+
Callbacks are configured under a service block:
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
GCM:
|
|
13
|
+
callbacks:
|
|
14
|
+
save_avi:
|
|
15
|
+
save_timestamps:
|
|
16
|
+
disp_fast:
|
|
17
|
+
framerate: 10
|
|
18
|
+
|
|
19
|
+
DAQ:
|
|
20
|
+
callbacks:
|
|
21
|
+
save_h5:
|
|
22
|
+
plot_fast:
|
|
23
|
+
channels_to_plot: [0, 1]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Use an empty value when a callback has no parameters. Use a nested mapping when
|
|
27
|
+
the callback accepts options.
|
|
28
|
+
|
|
29
|
+
## Camera Callbacks
|
|
30
|
+
|
|
31
|
+
| Name | Purpose |
|
|
32
|
+
|------|---------|
|
|
33
|
+
| `disp` | Display frames with OpenCV. |
|
|
34
|
+
| `disp_fast` | Display frames with pyqtgraph. |
|
|
35
|
+
| `save_avi` | Save frames with OpenCV `VideoWriter`. |
|
|
36
|
+
| `save_ffmpegcv` | Save frames with an ffmpegcv backend. |
|
|
37
|
+
| `save_vidgear` | Save frames through VidGear. |
|
|
38
|
+
| `save_avi_fast` | Save video with NVIDIA Video Processing Framework. |
|
|
39
|
+
| `saveimg_h5` | Save image frames to HDF5. |
|
|
40
|
+
| `saveimg_zarr` | Save image frames to Zarr. |
|
|
41
|
+
| `save_timestamps` | Save system and camera timestamps. |
|
|
42
|
+
|
|
43
|
+
Some video writers require optional packages or GPU-specific binaries. Confirm
|
|
44
|
+
support on the rig with `etho version --debug` and a short test run.
|
|
45
|
+
|
|
46
|
+
## DAQ And DLP Callbacks
|
|
47
|
+
|
|
48
|
+
| Name | Purpose |
|
|
49
|
+
|------|---------|
|
|
50
|
+
| `save_h5` | Save analog input chunks and metadata to HDF5. |
|
|
51
|
+
| `save_zarr` | Save analog input chunks and metadata to Zarr. |
|
|
52
|
+
| `plot_fast` | Display traces with pyqtgraph. |
|
|
53
|
+
| `plot` | Display traces with matplotlib. |
|
|
54
|
+
| `savedlp_h5` | Save DLP frame or stimulus metadata. |
|
|
55
|
+
|
|
56
|
+
`plot_fast` and `plot` can limit displayed channels:
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
callbacks:
|
|
60
|
+
plot_fast:
|
|
61
|
+
channels_to_plot: [0, 1, 2]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Writing A Callback
|
|
65
|
+
|
|
66
|
+
See [Extensions](extensions.md).
|