ephys_link.platforms.new_scale_manipulator

New Scale Manipulator class

Handles logic for calling New Scale API functions. Also includes extra logic for safe function calls, error handling, managing per-manipulator attributes, and returning the appropriate callback parameters like in ephys_link.new_scale_handler.

Classes

NewScaleManipulator

class NewScaleManipulator(manipulator_id: str, x_axis: NstCtrlAxis, y_axis: NstCtrlAxis, z_axis: NstCtrlAxis)[source]

Bases: PlatformManipulator

query_all_axes()[source]

Query all axes for their position and status

get_pos() PositionalResponse[source]

Get the current position of the manipulator and convert it into mm.

Returns:

Position of manipulator in (x, y, z, z) in mm (or an empty array on error) and error message (if any).

Return type:

ephys_link.common.PositionalOutputData

async goto_pos(request: GotoPositionRequest) PositionalResponse[source]

Move manipulator to position.

Parameters:

request (vbl_aquarium.models.ephys_link.GotoPositionRequest) – The goto request parsed from the server.

Returns:

Resulting position of manipulator in (x, y, z, z) in mm (or an empty array on error) and error message (if any).

Return type:

ephys_link.common.PositionalOutputData

async drive_to_depth(request: DriveToDepthRequest) DriveToDepthResponse[source]

Drive the manipulator to a certain depth.

Parameters:

request (vbl_aquarium.models.ephys_link.DriveToDepthRequest) – The drive to depth request parsed from the server.

Returns:

Resulting depth of manipulator in mm (or 0 on error) and error message (if any).

Return type:

ephys_link.common.DriveToDepthOutputData

calibrate() bool[source]

Calibrate the manipulator.

Returns:

None

get_calibrated() bool[source]

Return the calibration state of the manipulator.

Returns:

True if the manipulator is calibrated, False otherwise.

Return type:

bool

set_calibrated() None[source]

Set the manipulator to calibrated

Returns:

None

set_can_write(request: CanWriteRequest) None[source]

Set if the manipulator can move.

Parameters:

request (vbl_aquarium.models.ephys_link.CanWriteRequest) – The can write request parsed from the server.

Returns:

None

reset_can_write() None[source]

Reset the can_write flag.

get_can_write() bool[source]

Return if the manipulator can move.

Returns:

True if the manipulator can move, False otherwise.

Return type:

bool

set_inside_brain(inside: bool) None[source]

Set if the manipulator is inside the brain.

Parameters:

inside (bool) – True if the manipulator is inside the brain, False otherwise.

Returns:

None

stop() None[source]

Stop all axes on manipulator.

:returns None