dystrack.manager.transmitters#
Functions to transmit coordinates to the microscope.
- dystrack.manager.transmitters.send_coords_txt(fpath, z_pos=None, y_pos=None, x_pos=None, msg='_', precision=4)#
Communicate new position for stage movement to the microscope through a text file, which should be monitored by the microscope software’s macro.
A new file with header is generated if the file at the provided path does not exist yet. Otherwise new data is appended at the end of the file.
- Parameters:
fpath (path-like) – Path to the coordinate text file.
z_pos (numeric, optional, default 0.0) – Cooordinates of the new imaging position. For any that are None, the string value “nan” will be written in place of a coordinate number.
y_pos (numeric, optional, default 0.0) – Cooordinates of the new imaging position. For any that are None, the string value “nan” will be written in place of a coordinate number.
x_pos (numeric, optional, default 0.0) – Cooordinates of the new imaging position. For any that are None, the string value “nan” will be written in place of a coordinate number.
msg (str, optional, default "_") – String message to write in 4th column of text file.
precision (int, optional, default 4) – Number of decimal places to write for coordinate values.
- dystrack.manager.transmitters.send_coords_winreg(z_pos=None, y_pos=None, x_pos=None, codeM='focus', errMsg=None)#
Communicate new position for stage movement to the microscope through the Windows registry, then prime it for imaging in the way expected by the MyPiC Pipeline Constructor macro. The actual acquisition will be triggered once the scope is idle.
- Parameters:
z_pos (numeric, optional, default None) – Cooordinates of the new imaging position. For any that are None, the registry entry is left unchanged.
y_pos (numeric, optional, default None) – Cooordinates of the new imaging position. For any that are None, the registry entry is left unchanged.
x_pos (numeric, optional, default None) – Cooordinates of the new imaging position. For any that are None, the registry entry is left unchanged.
codeM (str, optional, default "focus") – Action for the microscope to take. Default is “focus”, which triggers a move to the updated coordinates and acquisition as soon as the scope is idle. See MyPiC documentation for more information.
errMsg (str, optional, default None) – An optional error message for MyPiC to copy to its log file.