camacq.plugins.leica package¶
Leica microscope API specific modules.
-
class
camacq.plugins.leica.
LeicaApi
(center, config, client)¶ Bases:
camacq.plugins.api.Api
Represent the Leica API.
-
property
name
¶ Return the name of the API.
-
async
receive
(replies)¶ Receive replies from CAM server and fire an event per reply.
- Parameters
replies (list) – A list of replies from the CAM server.
-
async
send
(command, **kwargs)¶ Send a command to the Leica API.
- Parameters
command (list of tuples or string) – 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
start_listen
()¶ Receive from the microscope socket.
-
async
stop_imaging
()¶ Send a command to the microscope to stop the imaging.
-
property
-
class
camacq.plugins.leica.
LeicaCommandEvent
(data=None)¶ Bases:
camacq.plugins.api.CommandEvent
Leica CommandEvent class.
-
property
command
¶ Return the command string.
-
data
¶
-
event_type
= 'leica_command_event'¶
-
property
-
class
camacq.plugins.leica.
LeicaImageEvent
(data=None)¶ Bases:
camacq.plugins.api.ImageEvent
Leica ImageEvent class.
-
property
channel_id
¶ Return channel id of the image.
- Type
int
-
data
¶
-
event_type
= 'leica_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
job_id
¶ Return job id 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
-
property
-
class
camacq.plugins.leica.
LeicaStartCommandEvent
(data=None)¶ Bases:
camacq.plugins.api.StartCommandEvent
,camacq.plugins.leica.LeicaCommandEvent
Leica StartCommandEvent class.
-
property
command
¶ Return the command string.
-
data
¶
-
event_type
= 'leica_start_command_event'¶
-
property
-
class
camacq.plugins.leica.
LeicaStopCommandEvent
(data=None)¶ Bases:
camacq.plugins.api.StopCommandEvent
,camacq.plugins.leica.LeicaCommandEvent
Leica StopCommandEvent class.
-
property
command
¶ Return the command string.
-
data
¶
-
event_type
= 'leica_stop_command_event'¶
-
property
-
async
camacq.plugins.leica.
setup_module
(center, config)¶ Set up Leica api package.
- Parameters
center (Center instance) – The Center instance.
config (dict) – The config dict.
Submodules¶
camacq.plugins.leica.command module¶
Handle commands.
-
camacq.plugins.leica.command.
cam_com
(exp, wellu, wellv, fieldx, fieldy, dxcoord, dycoord)¶ Add a field to the cam list.
Return a list with parts for the cam command.
-
camacq.plugins.leica.command.
camstart_com
(afjob=None, afrange=None, afsteps=None)¶ Start the cam scan with selected AF job and AF settings.
Return a list with parts for the cam command.
-
camacq.plugins.leica.command.
camstop_com
()¶ Stop the cam scan.
Return a list with parts for the cam command.
-
camacq.plugins.leica.command.
del_com
()¶ Delete the cam list.
Return a list with parts for the cam command.
-
camacq.plugins.leica.command.
enable_com
(wellu, wellv, fieldx, fieldy, enable)¶ Enable a field in a well.
Return a list with parts for the cam command.
-
camacq.plugins.leica.command.
gain_com
(exp, num, value)¶ Change the pmt gain in a job.
Return a list with parts for the cam command.
-
camacq.plugins.leica.command.
start
()¶ Start the scan.
Return a list with parts for the cam command.
-
camacq.plugins.leica.command.
stop
()¶ Stop the scan.
Return a list with parts for the cam command.
camacq.plugins.leica.helper module¶
Helper functions for Leica api.
-
camacq.plugins.leica.helper.
find_image_path
(relpath, root)¶ Parse the relpath from the server to find file path from root.
Convert from windows path to posix path.
- Parameters
relpath (str) – A relative path to the image.
root (str) – Path to directory where path should start.
- Returns
Return path to image.
- Return type
str
-
camacq.plugins.leica.helper.
get_field
(path)¶ Get path to field from image path.
- Parameters
path (string) – Path to image.
- Returns
Return path to field directory of image.
- Return type
str
-
camacq.plugins.leica.helper.
get_imgs
(path, img_type='tif', search='')¶ Get all images below path.
- Parameters
path (string) – Path to directory where to search for images.
img_type (string) – A string representing the image file type extension.
path – A glob pattern string to use in the search.
- Returns
Return paths of all images found.
- Return type
list
-
camacq.plugins.leica.helper.
get_well
(path)¶ Get path to well from image path.
- Parameters
path (string) – Path to image.
- Returns
Return path to well directory of image.
- Return type
str