Skip to content

ephys_link

Models for the Ephys Link Socket.IO API.

Used by Ephys Link and Pinpoint.

AngularResponse

Bases: VBLBaseModel

Manipulator axis angles.

This is not very standardized and its usage is platform-specific.

Attributes:

Name Type Description
angles Vector3

Position of the manipulator.

error str

Error message if any.

Source code in src/vbl_aquarium/models/ephys_link.py
class AngularResponse(VBLBaseModel):
    """Manipulator axis angles.

    This is not very standardized and its usage is platform-specific.

    Attributes:
        angles: Position of the manipulator.
        error: Error message if any.
    """

    angles: Vector3 = Vector3()
    error: str = ""

BooleanStateResponse

Bases: VBLBaseModel

Boolean state from an event.

Attributes:

Name Type Description
state bool

State of the event.

error str

Error message if any.

Source code in src/vbl_aquarium/models/ephys_link.py
class BooleanStateResponse(VBLBaseModel):
    """Boolean state from an event.

    Attributes:
        state: State of the event.
        error: Error message if any.
    """

    state: bool = False
    error: str = ""

EphysLinkOptions

Bases: VBLBaseModel

Options for running Ephys Link.

Attributes:

Name Type Description
background bool

Whether to skip the GUI and run using CLI arguments.

ignore_updates bool

Whether to ignore updates.

type str

Type of manipulator platform to use.

debug bool

Whether to print debug messages.

use_proxy bool

Whether to use VBL proxy service.

proxy_address str

Address of the proxy service.

mpm_port int

Port for New Scale MPM HTTP server.

serial str

Serial port for emergency stop.

Source code in src/vbl_aquarium/models/ephys_link.py
class EphysLinkOptions(VBLBaseModel):
    """Options for running Ephys Link.

    Attributes:
        background: Whether to skip the GUI and run using CLI arguments.
        ignore_updates: Whether to ignore updates.
        type: Type of manipulator platform to use.
        debug: Whether to print debug messages.
        use_proxy: Whether to use VBL proxy service.
        proxy_address: Address of the proxy service.
        mpm_port: Port for New Scale MPM HTTP server.
        serial: Serial port for emergency stop.
    """

    background: bool = False
    ignore_updates: bool = False
    type: str = "ump-4"
    debug: bool = False
    use_proxy: bool = False
    proxy_address: str = "proxy2.virtualbrainlab.org"
    mpm_port: int = Field(default=8080, ge=1024, le=49151)
    serial: str = "no-e-stop"

GetManipulatorsResponse

Bases: VBLBaseModel

List the IDs of available manipulators from the active platform.

Attributes:

Name Type Description
manipulators list[str]

List of manipulators by ID.

error str

Error message if any.

Source code in src/vbl_aquarium/models/ephys_link.py
class GetManipulatorsResponse(VBLBaseModel):
    """List the IDs of available manipulators from the active platform.

    Attributes:
        manipulators: List of manipulators by ID.
        error: Error message if any.
    """

    # noinspection PyDataclass
    manipulators: list[str] = Field(default_factory=list)
    error: str = ""

PlatformInfo

Bases: VBLBaseModel

General metadata information about the manipulator platform

Attributes:

Name Type Description
name str

Name of the manipulator platform.

cli_name str

CLI identifier for the manipulator platform (for the -t flag).

axes_count int

Number of axes on a manipulator.

dimensions Vector4

Dimensions of the manipulators (3-axis manipulators should set w to 0).

Source code in src/vbl_aquarium/models/ephys_link.py
class PlatformInfo(VBLBaseModel):
    """General metadata information about the manipulator platform

    Attributes:
        name: Name of the manipulator platform.
        cli_name: CLI identifier for the manipulator platform (for the `-t` flag).
        axes_count: Number of axes on a manipulator.
        dimensions: Dimensions of the manipulators (3-axis manipulators should set w to 0).
    """

    name: str = Field(min_length=1)
    cli_name: str = Field(min_length=1)
    axes_count: int = Field(default=0, ge=-1)
    dimensions: Vector4 = Vector4()

PositionalResponse

Bases: VBLBaseModel

Position of a manipulator.

Attributes:

Name Type Description
position Vector4

Position of the manipulator.

error str

Error message if any.

Source code in src/vbl_aquarium/models/ephys_link.py
class PositionalResponse(VBLBaseModel):
    """Position of a manipulator.

    Attributes:
        position: Position of the manipulator.
        error: Error message if any.
    """

    position: Vector4 = Vector4()
    error: str = ""

SetDepthRequest

Bases: VBLBaseModel

Depth to drive a manipulator to.

These are the absolute positions of the manipulator stages.

Attributes:

Name Type Description
manipulator_id str

ID of the manipulator to move.

depth float

Depth to drive to in mm.

speed float

Speed to drive at in mm/s.

Source code in src/vbl_aquarium/models/ephys_link.py
class SetDepthRequest(VBLBaseModel):
    """Depth to drive a manipulator to.

    These are the absolute positions of the manipulator stages.

    Attributes:
        manipulator_id: ID of the manipulator to move.
        depth: Depth to drive to in mm.
        speed: Speed to drive at in mm/s.
    """

    manipulator_id: str = Field(min_length=1)
    depth: float
    speed: float = Field(gt=0)

SetDepthResponse

Bases: VBLBaseModel

Final depth a manipulator is at after a drive.

Attributes:

Name Type Description
depth float

Depth the manipulator is at in mm.

error str

Error message if any.

Source code in src/vbl_aquarium/models/ephys_link.py
class SetDepthResponse(VBLBaseModel):
    """Final depth a manipulator is at after a drive.

    Attributes:
        depth: Depth the manipulator is at in mm.
        error: Error message if any.
    """

    depth: float = 0
    error: str = ""

SetInsideBrainRequest

Bases: VBLBaseModel

Set the "inside brain" state of a manipulator.

Attributes:

Name Type Description
manipulator_id str

ID of the manipulator to move.

inside bool

Whether the manipulator is inside the brain.

Source code in src/vbl_aquarium/models/ephys_link.py
class SetInsideBrainRequest(VBLBaseModel):
    """Set the "inside brain" state of a manipulator.

    Attributes:
        manipulator_id: ID of the manipulator to move.
        inside: Whether the manipulator is inside the brain.
    """

    manipulator_id: str = Field(min_length=1)
    inside: bool

SetPositionRequest

Bases: VBLBaseModel

Position to set a manipulator to.

These are the absolute positions of the manipulator stages.

Attributes:

Name Type Description
manipulator_id str

ID of the manipulator to move.

position Vector4

Position to move to in mm (X, Y, Z, W).

speed float

Speed to move at in mm/s.

Source code in src/vbl_aquarium/models/ephys_link.py
class SetPositionRequest(VBLBaseModel):
    """Position to set a manipulator to.

    These are the absolute positions of the manipulator stages.

    Attributes:
        manipulator_id: ID of the manipulator to move.
        position: Position to move to in mm (X, Y, Z, W).
        speed: Speed to move at in mm/s.
    """

    manipulator_id: str = Field(min_length=1)
    position: Vector4
    speed: float = Field(gt=0)

ShankCountResponse

Bases: VBLBaseModel

Number of electrode shanks on a manipulator.

Attributes:

Name Type Description
shank_count int

Number of shanks.

error str

Error message if any.

Source code in src/vbl_aquarium/models/ephys_link.py
class ShankCountResponse(VBLBaseModel):
    """Number of electrode shanks on a manipulator.

    Attributes:
        shank_count: Number of shanks.
        error: Error message if any.
    """

    shank_count: int = Field(default=1, ge=1)
    error: str = ""