# Electrophysiology Manipulator Link
[![PyPI version](https://badge.fury.io/py/ephys-link.svg)](https://badge.fury.io/py/ephys-link)
[![CodeQL](https://github.com/VirtualBrainLab/ephys-link/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/VirtualBrainLab/ephys-link/actions/workflows/codeql-analysis.yml)
[![Dependency Review](https://github.com/VirtualBrainLab/ephys-link/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/VirtualBrainLab/ephys-link/actions/workflows/dependency-review.yml)
[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
<!-- [![Build](https://github.com/VirtualBrainLab/ephys-link/actions/workflows/build.yml/badge.svg)](https://github.com/VirtualBrainLab/ephys-link/actions/workflows/build.yml) -->
<img width="100%" src="https://github.com/VirtualBrainLab/ephys-link/assets/82800265/0c7c60b1-0926-4697-a461-221554f82de1" alt="Manipulator and probe in pinpoint moving in sync">
The [Electrophysiology Manipulator Link](https://github.com/VirtualBrainLab/ephys-link)
(or Ephys Link for short) is a Python [Socket.IO](https://socket.io/docs/v4/#what-socketio-is) server that allows any
Socket.IO-compliant application (such
as [Pinpoint](https://github.com/VirtualBrainLab/Pinpoint))
to communicate with manipulators used in electrophysiology experiments.
**Supported Manipulators:**
| Manufacturer | Model |
|--------------|-------------------------------------------------------------------------|
| Sensapex | <ul> <li>uMp-4</li> <li>uMp-3</li> </ul> |
| New Scale | <ul> <li>Pathfinder MPM Control v2.8+</li> <li>M3-USB-3:1-EP</li> </ul> |
Ephys Link is an open and extensible platform. It is designed to easily support integration with other manipulators.
For more information regarding the server's implementation and how the code is organized, see
the [package's development documentation](https://virtualbrainlab.org/ephys_link/development.html).
For detailed descriptions of the server's API, see
the [API reference](https://virtualbrainlab.org/api_reference_ephys_link.html).
# Installation
## Prerequisites
1. An **x86 Windows PC is required** to run the server.
2. For Sensapex devices, the controller unit must be connected via an ethernet
cable and powered. A USB-to-ethernet adapter is acceptable. For New Scale manipulators,
the controller unit must be connected via USB and be powered by a 6V power
supply.
3. To use the emergency stop feature, ensure an Arduino with
the [StopSignal](https://github.com/VirtualBrainLab/StopSignal) sketch is
connected to the computer. Follow the instructions on that repo for how to
set up the Arduino.
**NOTE:** Ephys Link is an HTTP server without cross-origin support. The server
is currently designed to interface with local/desktop instances of Pinpoint. It
will not work with the web browser versions of Pinpoint at this time.
## Launch from Pinpoint (Recommended)
Pinpoint comes bundled with the correct version of Ephys Link. If you are using Pinpoint on the same computer your
manipulators are connected to, you can launch the server from within Pinpoint. Follow the instructions in
the [Pinpoint documentation](https://virtualbrainlab.org/pinpoint/tutorials/tutorial_ephys_link.html#configure-and-launch-ephys-link).
## Install as Standalone Executable
1. Download the latest executable from
the [releases page](https://github.com/VirtualBrainLab/ephys-link/releases/latest).
2. Double-click the executable file to launch the configuration window.
1. Take note of the IP address and port. **Copy this information into Pinpoint to connect**.
3. Select the desired configuration and click "Launch Server".
The configuration window will close and the server will launch. Your configurations will be saved for future use.
To connect to the server from Pinpoint, provide the IP address and port. For example, if the server is running on the
same computer that Pinpoint is, use
- Server: `localhost`
- Port: `8081`
If the server is running on a different (local) computer, use the IP address of that computer as shown in the startup
window instead of `localhost`.
## Install as a Python package
```bash
pip install ephys-link
```
Import the modules you need and launch the server.
```python
from ephys_link.server import Server
server = Server()
server.launch("sensapex", args.proxy_address, 8081)
```
## Install for Development
1. Clone the repository.
2. Install [Hatch](https://hatch.pypa.io/latest/install/)
3. In a terminal, navigate to the repository's root directory and run
```bash
hatch shell
```
This will create a virtual environment, install Python 12 (if not found), and install the package in editable mode.
If you encounter any dependency issues (particularly with `aiohttp`), try installing the latest Microsoft Visual C++
(MSVC v143+ x86/64) and the Windows SDK (10/11)
via [Visual Studio Build Tools Installer](https://visualstudio.microsoft.com/visual-cpp-build-tools/).
# Documentation and More Information
Complete documentation including API usage and development installation can be
found on the [Virtual Brain Lab Documentation page][docs] for Ephys Link.
# Citing
If this project is used as part of a research project you should cite
the [Pinpoint repository][Pinpoint]. Please email
Dan ([dbirman@uw.edu](mailto:dbirman@uw.edu)) if you have questions.
Please reach out to Kenneth ([kjy5@uw.edu](mailto:kjy5@uw.edu)) for questions
about the Electrophysiology Manipulator Link server. Bugs may be reported
through the issues tab.
[Pinpoint]: https://github.com/VirtualBrainLab/Pinpoint
[StopSignal]: https://github.com/VirtualBrainLab/StopSignal
[docs]: https://virtualbrainlab.org/ephys_link/installation_and_use.html
Raw data
{
"_id": null,
"home_page": null,
"name": "ephys-link",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.13,>=3.10",
"maintainer_email": "Kenneth Yang <kjy5@uw.edu>",
"keywords": "electrophysiology, ephys, manipulator, neuroscience, neurotech, new-scale, sensapex, socket-io, virtualbrainlab",
"author": null,
"author_email": "Kenneth Yang <kjy5@uw.edu>",
"download_url": "https://files.pythonhosted.org/packages/4d/e9/e08774c05a43614d6eaaacc1f4a076c95ea71e2cdd0bc6c178296a06604b/ephys_link-1.3.3.tar.gz",
"platform": null,
"description": "# Electrophysiology Manipulator Link\n\n[![PyPI version](https://badge.fury.io/py/ephys-link.svg)](https://badge.fury.io/py/ephys-link)\n[![CodeQL](https://github.com/VirtualBrainLab/ephys-link/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/VirtualBrainLab/ephys-link/actions/workflows/codeql-analysis.yml)\n[![Dependency Review](https://github.com/VirtualBrainLab/ephys-link/actions/workflows/dependency-review.yml/badge.svg)](https://github.com/VirtualBrainLab/ephys-link/actions/workflows/dependency-review.yml)\n[![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch)\n[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n\n<!-- [![Build](https://github.com/VirtualBrainLab/ephys-link/actions/workflows/build.yml/badge.svg)](https://github.com/VirtualBrainLab/ephys-link/actions/workflows/build.yml) -->\n\n<img width=\"100%\" src=\"https://github.com/VirtualBrainLab/ephys-link/assets/82800265/0c7c60b1-0926-4697-a461-221554f82de1\" alt=\"Manipulator and probe in pinpoint moving in sync\">\n\nThe [Electrophysiology Manipulator Link](https://github.com/VirtualBrainLab/ephys-link)\n(or Ephys Link for short) is a Python [Socket.IO](https://socket.io/docs/v4/#what-socketio-is) server that allows any\nSocket.IO-compliant application (such\nas [Pinpoint](https://github.com/VirtualBrainLab/Pinpoint))\nto communicate with manipulators used in electrophysiology experiments.\n\n**Supported Manipulators:**\n\n| Manufacturer | Model |\n|--------------|-------------------------------------------------------------------------|\n| Sensapex | <ul> <li>uMp-4</li> <li>uMp-3</li> </ul> |\n| New Scale | <ul> <li>Pathfinder MPM Control v2.8+</li> <li>M3-USB-3:1-EP</li> </ul> |\n\nEphys Link is an open and extensible platform. It is designed to easily support integration with other manipulators.\n\nFor more information regarding the server's implementation and how the code is organized, see\nthe [package's development documentation](https://virtualbrainlab.org/ephys_link/development.html).\n\nFor detailed descriptions of the server's API, see\nthe [API reference](https://virtualbrainlab.org/api_reference_ephys_link.html).\n\n# Installation\n\n## Prerequisites\n\n1. An **x86 Windows PC is required** to run the server.\n2. For Sensapex devices, the controller unit must be connected via an ethernet\n cable and powered. A USB-to-ethernet adapter is acceptable. For New Scale manipulators,\n the controller unit must be connected via USB and be powered by a 6V power\n supply.\n3. To use the emergency stop feature, ensure an Arduino with\n the [StopSignal](https://github.com/VirtualBrainLab/StopSignal) sketch is\n connected to the computer. Follow the instructions on that repo for how to\n set up the Arduino.\n\n**NOTE:** Ephys Link is an HTTP server without cross-origin support. The server\nis currently designed to interface with local/desktop instances of Pinpoint. It\nwill not work with the web browser versions of Pinpoint at this time.\n\n## Launch from Pinpoint (Recommended)\n\nPinpoint comes bundled with the correct version of Ephys Link. If you are using Pinpoint on the same computer your\nmanipulators are connected to, you can launch the server from within Pinpoint. Follow the instructions in\nthe [Pinpoint documentation](https://virtualbrainlab.org/pinpoint/tutorials/tutorial_ephys_link.html#configure-and-launch-ephys-link).\n\n## Install as Standalone Executable\n\n1. Download the latest executable from\n the [releases page](https://github.com/VirtualBrainLab/ephys-link/releases/latest).\n2. Double-click the executable file to launch the configuration window.\n 1. Take note of the IP address and port. **Copy this information into Pinpoint to connect**.\n3. Select the desired configuration and click \"Launch Server\".\n\nThe configuration window will close and the server will launch. Your configurations will be saved for future use.\n\nTo connect to the server from Pinpoint, provide the IP address and port. For example, if the server is running on the\nsame computer that Pinpoint is, use\n\n- Server: `localhost`\n- Port: `8081`\n\nIf the server is running on a different (local) computer, use the IP address of that computer as shown in the startup\nwindow instead of `localhost`.\n\n## Install as a Python package\n\n```bash\npip install ephys-link\n```\n\nImport the modules you need and launch the server.\n\n```python\nfrom ephys_link.server import Server\n\nserver = Server()\nserver.launch(\"sensapex\", args.proxy_address, 8081)\n```\n\n## Install for Development\n\n1. Clone the repository.\n2. Install [Hatch](https://hatch.pypa.io/latest/install/)\n3. In a terminal, navigate to the repository's root directory and run\n\n ```bash\n hatch shell\n ```\n\nThis will create a virtual environment, install Python 12 (if not found), and install the package in editable mode.\n\nIf you encounter any dependency issues (particularly with `aiohttp`), try installing the latest Microsoft Visual C++\n(MSVC v143+ x86/64) and the Windows SDK (10/11)\nvia [Visual Studio Build Tools Installer](https://visualstudio.microsoft.com/visual-cpp-build-tools/).\n\n# Documentation and More Information\n\nComplete documentation including API usage and development installation can be\nfound on the [Virtual Brain Lab Documentation page][docs] for Ephys Link.\n\n# Citing\n\nIf this project is used as part of a research project you should cite\nthe [Pinpoint repository][Pinpoint]. Please email\nDan ([dbirman@uw.edu](mailto:dbirman@uw.edu)) if you have questions.\n\nPlease reach out to Kenneth ([kjy5@uw.edu](mailto:kjy5@uw.edu)) for questions\nabout the Electrophysiology Manipulator Link server. Bugs may be reported\nthrough the issues tab.\n\n[Pinpoint]: https://github.com/VirtualBrainLab/Pinpoint\n\n[StopSignal]: https://github.com/VirtualBrainLab/StopSignal\n\n[docs]: https://virtualbrainlab.org/ephys_link/installation_and_use.html\n",
"bugtrack_url": null,
"license": null,
"summary": "A Python Socket.IO server that allows any Socket.IO-compliant application to communicate with manipulators used in electrophysiology experiments.",
"version": "1.3.3",
"project_urls": {
"Documentation": "https://virtualbrainlab.org/ephys_link/installation_and_use.html",
"Issues": "https://github.com/VirtualBrainLab/ephys-link/issues",
"Source": "https://github.com/VirtualBrainLab/ephys-link"
},
"split_keywords": [
"electrophysiology",
" ephys",
" manipulator",
" neuroscience",
" neurotech",
" new-scale",
" sensapex",
" socket-io",
" virtualbrainlab"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a255329b384140a6ff68ec9dd8285e006527f588ce870449c97b001b82b2f514",
"md5": "e83789832bf36f8be7c83331479d6e84",
"sha256": "bae6dd0857b09825f7fa79c6a86c057ff23eddf789ce60c32dbdec1826283f0c"
},
"downloads": -1,
"filename": "ephys_link-1.3.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e83789832bf36f8be7c83331479d6e84",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13,>=3.10",
"size": 622950,
"upload_time": "2024-06-21T17:02:32",
"upload_time_iso_8601": "2024-06-21T17:02:32.905778Z",
"url": "https://files.pythonhosted.org/packages/a2/55/329b384140a6ff68ec9dd8285e006527f588ce870449c97b001b82b2f514/ephys_link-1.3.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4de9e08774c05a43614d6eaaacc1f4a076c95ea71e2cdd0bc6c178296a06604b",
"md5": "f3e27c1197eeed8f20a1a370ce214d19",
"sha256": "c1d5ef484d94c40cddca1bbdf2251c1e5d652cf948771c58e8eb9e576ed5c68c"
},
"downloads": -1,
"filename": "ephys_link-1.3.3.tar.gz",
"has_sig": false,
"md5_digest": "f3e27c1197eeed8f20a1a370ce214d19",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.13,>=3.10",
"size": 628873,
"upload_time": "2024-06-21T17:08:20",
"upload_time_iso_8601": "2024-06-21T17:08:20.063630Z",
"url": "https://files.pythonhosted.org/packages/4d/e9/e08774c05a43614d6eaaacc1f4a076c95ea71e2cdd0bc6c178296a06604b/ephys_link-1.3.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-06-21 17:08:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "VirtualBrainLab",
"github_project": "ephys-link",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "ephys-link"
}