camacq.plugins.api package

Microscope API specific modules.

class camacq.plugins.api.Api

Bases: object

Represent the microscope API.

property name

Return the name of the API.

async send(command, **kwargs)

Send a command to the microscope API.

Parameters:

command (str) – The command to send.

async send_many(commands, **kwargs)

Send multiple commands to the microscope API.

Parameters:

commands (list) – A list of commands to send.

async start_imaging()

Send a command to the microscope to start the imaging.

async stop_imaging()

Send a command to the microscope to stop the imaging.

class camacq.plugins.api.CommandEvent(data=None)

Bases: Event

An event received from the API.

Notify with this event when a command is received via API.

property command

Return the command string.

Type:

str

data
event_type = 'command_event'
class camacq.plugins.api.ImageEvent(data=None)

Bases: Event

An event received from the API.

Notify with this event when an image is saved via API.

property channel_id

Return channel id of the image.

Type:

int

data
event_type = 'image_event'
property field_x

Return x coordinate of the well of the image.

Type:

int

property field_y

Return y coordinate of the well of the image.

Type:

int

property path

Return absolute path to the image.

Type:

str

property plate_name

Return plate name of the image.

Type:

str

property well_x

Return x coordinate of the well of the image.

Type:

int

property well_y

Return y coordinate of the well of the image.

Type:

int

property z_slice_id

Return z index of the image.

Type:

int

class camacq.plugins.api.StartCommandEvent(data=None)

Bases: CommandEvent

An event received from the API.

Notify with this event when imaging starts via API.

property command

Return the command string.

Type:

str

data
event_type = 'start_command_event'
class camacq.plugins.api.StopCommandEvent(data=None)

Bases: CommandEvent

An event received from the API.

Notify with this event when imaging stops via API.

property command

Return the command string.

Type:

str

data
event_type = 'stop_command_event'
camacq.plugins.api.register_api(center, api)

Register api.

async camacq.plugins.api.setup_module(center, config)

Set up the microscope API package.

Parameters:
  • center (Center instance) – The Center instance.

  • config (dict) – The config dict.

camacq.plugins.api.validate_commands(value)

Validate a template string via JSON.