ephys_link.common
Commonly used functions and dictionaries
Contains globally used helper functions and typed dictionaries (to be used as callback parameters)
Functions
Print message if debug is enabled. |
Classes
Output format for manipulator angle requests. |
|
Data format for setting can write state. |
|
Data format for depth driving requests. |
|
Output format for depth driving. |
|
Output format for get manipulators request. |
|
Data format for positional requests. |
|
Data format for setting inside brain state. |
|
Output format for positional requests. |
|
Output format for number of shanks. |
|
Output format for boolean state requests. |
- dprint(message: str) None [source]
Print message if debug is enabled.
- Parameters:
message (str) – Message to print.
- Returns:
None
- class GotoPositionInputDataFormat[source]
Bases:
TypedDict
Data format for positional requests.
- Parameters:
manipulator_id (str) – ID of the manipulator to move.
pos (list[float]) – Position to move to in mm (X, Y, Z, W).
speed (float) – Speed to move at in mm/s.
- manipulator_id: str
- pos: list[float]
- speed: float
- class InsideBrainInputDataFormat[source]
Bases:
TypedDict
Data format for setting inside brain state.
- Parameters:
manipulator_id (str) – ID of the manipulator to move.
inside (bool) – Whether the manipulator is inside the brain.
- manipulator_id: str
- inside: bool
- class DriveToDepthInputDataFormat[source]
Bases:
TypedDict
Data format for depth driving requests.
- Parameters:
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.
- manipulator_id: str
- depth: float
- speed: float
- class CanWriteInputDataFormat[source]
Bases:
TypedDict
Data format for setting can write state.
- Parameters:
manipulator_id (str) – ID of the manipulator to move.
can_write (bool) – Whether the manipulator can write.
hours (float) – Number of hours the manipulator can write for.
- manipulator_id: str
- can_write: bool
- hours: float
- class GetManipulatorsOutputData(manipulators: list, num_axes: int, dimensions: list, error: str)[source]
Bases:
dict
Output format for get manipulators request.
- Parameters:
manipulators (list) – List of manipulator IDs (as strings).
num_axes (int) – Number of axes this manipulator has.
dimensions (list) – Size of the movement space in mm (first 3 axes).
error (str) – Error message.
- Example:
Example generated dictionary
{"manipulators": ["1", "2"], "num_axes": 4, "dimensions": [20, 20, 20], "error": ""}
- class PositionalOutputData(position: list, error: str)[source]
Bases:
dict
Output format for positional requests.
- Parameters:
position (list) – Position in mm (as a list, empty on error) in X, Y, Z, W order.
error (str) – Error message.
- Example:
Example generated dictionary
{"position": [10.429, 12.332, 2.131, 12.312], "error": ""}
- class AngularOutputData(angles: list, error: str)[source]
Bases:
dict
Output format for manipulator angle requests.
- Parameters:
angles (list) – Angles in degrees (as a list, can be empty) in yaw, pitch, roll order.
error (str) – Error message.
- class ShankCountOutputData(shank_count: int, error: str)[source]
Bases:
dict
Output format for number of shanks.
- Parameters:
shank_count (int) – Number of shanks on the probe (-1 if error).
error (str) – Error message.