Virtual Brain Lab

Pinpoint

  • Installation and Use
  • Tutorial
  • in vivo Alignment
  • Ephys Link
    • Installation
      • Prerequisites
      • Install for use
    • Usage
      • “New Scale” vs “New Scale via Pathfinder HTTP server”
      • Options

Urchin

  • Installation and Use
  • Tutorials
  • IBL Tools

About the VBL

  • About
  • Lab
  • Development
  • Custom features

API Reference

  • Urchin API
  • Ephys Link API
Virtual Brain Lab
  • Ephys Link
  • View page source

Ephys Link

PyPI version CodeQL Dependency Review Code style: black

The Electrophysiology Manipulator Link (or Ephys Link for short) is a Python Socket.IO server that allows any Socket.IO-compliant application (such as Pinpoint) to communicate with manipulators used in electrophysiology experiments.

Currently, Ephys Link only supports Sensapex uMp-4 Micromanipulators and New Scale 3-axis manipulators. However, this platform is designed to be extensible to other manipulators and more may be added in the future.

For more information regarding the server’s implementation and how the code is organized, see the package’s development documentation.

For detailed descriptions of the server’s API, see the API reference.

Installation

Prerequisites

  1. Python 3.8+ and pip.

  2. An x86 Windows PC is required to run the server.

  3. 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.

  4. To use the emergency stop feature, ensure an Arduino with the StopSignal sketch is connected to the computer. Follow the instructions on that repo for how to set up the Arduino.

Using a Python virtual environment is encouraged.

Create a virtual environment by running python -m venv ephys_link

Activate the environment by running .\ephys_link\scripts\activate

A virtual environment helps to isolate installed packages from other packages on your computer and ensures a clean installation of Ephys Link

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.

Install for use

Run the following command to install the server:

pip install ephys-link

Update the server like any other Python package:

pip install --upgrade ephys-link

Usage

Run the following commands in a terminal to start the server for the desired manipulator platform:

Manipulator Platform

Command

Sensapex

ephys-link

New Scale

ephys-link -t new_scale

New Scale via Pathfinder HTTP server

ephys-link -t new_scale_pathfinder

There are a couple additional aliases for the Ephys Link executable: ephys_link and el.

By default, the server will broadcast with its local IP address on port 8081. Copy this information into Pinpoint to connect.

For example, if the server is running on the same computer that Pinpoint is, use

  • Server: localhost

  • Port: 8081

“New Scale” vs “New Scale via Pathfinder HTTP server”

New Scale manipulators have two methods of connection. The first method is through a direct hardware connection (-t new_scale) and the second is via the HTTP server broadcast by the Pathfinder software (-t new_scale_pathfinder). The latter method is only available if Pathfinder is running on the same computer as Ephys Link. New Scale manipulators should be connected to the Pathfinder software first and the HTTP server should be running.

Note: Currently (July 2023), Ephys Copilot automation and manual control within Pinpoint is not supported when connected to New Scale via Pathfinder HTTP server Pinpoint is not supported. Only positional data can be queried.

Options

All options can be viewed with python -m ephys_link --help.

Option

Input

Default

Description

-h, --help

Show help message and options

-t TYPE, --type TYPE

sensapex or new_scale or new_scale_pathfinder

sensapex

Select manipulator type

-p PORT, --port PORT

Valid HTTP port number

8081

HTTP port to serve on

--pathfinder_port

Valid HTTP port number

8080

HTTP port Pathfinder’s server is running on

-s [SERIAL], --serial [SERIAL]

Serial port name (i.e. COM3) or empty

no-e-stop

Emergency stop serial port. Auto searches if no port specified

-d, --debug

Enable verbose logging for debugging

--version

Version number of server

Previous Next

© Copyright 2023, Daniel Birman.

Built with Sphinx using a theme provided by Read the Docs.