multiScale_main module
- class multiScale_main.MultiScale_Microscope_Controller
Bases:
object
This is the controller in an MVC-scheme for mediating the interaction between the View (GUI, MultiScope_MainGui) and the model (multiScope.py).
- __init__()
Initialize the MultiScale_Microscope_Controller.
- abort_stack(event)
Set flag to abort stack acquisition after pressing button in the Viewer.
- Parameters:
event – Variable of the Tkinter event (press button).
- abort_timelapse(event)
Set flag to stop time-lapse imaging after pressing button in the Viewer.
- Parameters:
event – Variable of the Tkinter event (press button).
- acquire_stack(event)
Start a stack acquisition thread after pressing button in the Viewer
- Parameters:
event – Variable of the Tkinter event (press button).
- acquire_stack_task()
Acquire a stack acquisition. This is its own thread to not stop GUI from working.
- acquire_timelapse(event)
Start a time-lapse acquisition thread after pressing button in the Viewer. A thread is called to not freeze the GUI.
- Parameters:
event – Variable of the Tkinter event (press button).
- acquire_timelapse_task()
Thread that controls time-lapse acquisitions, started from the function acquire_timelapse called from the GUI.
- changeROI(event)
Updates the ROI settings of the camera with options (‘Full Chip’, ‘1024x1024’, ‘512x512’, ‘256x256’, ‘Custom’, ‘Usual’) by reading the viewer values and updating the corresponding model parameters.
- Parameters:
event – Variable of the Tkinter event (press button).
- changefilter(event, laser)
Changes the filter wheel filter position and the current_laser in the model upon pressing the corresponding button in the Viewer.
- Parameters:
event – Variable of the Tkinter event (press button).
laser – String, which laser to change to (488, 552, 594, 640, LED).
- close()
Close the model.
- disable_keyboard_movement(event)
Disable keyboard to move stages upon button press in the Viewer.
- Parameters:
event – Variable of the Tkinter event (button pressed).
- enable_keyboard_movement(event)
Enable keyboard to move stages upon button press in the Viewer.
- Parameters:
event – Variable of the Tkinter event (button pressed).
- key_pressed(event)
Key board assignment of keys (w, s, a, d, q, e and up/down, left/right) to control stage movement.
- Parameters:
event – Variable of the Tkinter event (keys pressed).
- movestage(var, indx, mode)
Moves the translational and rotational stage to the current position by reading the current stage values from the viewer and calling the corresponding model function.
- Parameters:
var – Variable of the Tkinter trace_add function.
indx – Variable of the Tkinter trace_add function.
mode – Variable of the Tkinter trace_add function.
- movestageToPosition(event)
Moves the stage to a previously saved position by reading in the position number (user input field in GUI), updating the values of the stage position correspondingly and calling the model function to move the stage.
- Parameters:
event – Variable of the Tkinter event (press button).
- run()
Run the Tkinter GUI in the main loop
- run_highrespreview(event)
Connects the viewer button to run a high-resolution preview (SPIM or ASLM) with the corresponding model function (SPIM or ASLM). Before starting a preview, it checks whether the mirror position (changeLRtoHR) needs to change and sets the model.continue_preview_highres value to True
- Parameters:
event – Variable of the Tkinter event (press button).
- run_lowrespreview(event)
Connects the viewer button to run a low-resolution preview with the corresponding model function. Before starting a preview, it checks whether the mirror position (changeHRtoLR) needs to change and sets the model.continue_preview_lowres value to True
- Parameters:
event – Variable of the Tkinter event (press button).
- run_stop_preview(event)
Stops the running preview and resets the profile of the preview buttons that were sunken after starting a preview
- Parameters:
event – Variable of the Tkinter event (press button).
- updateDriftCorrectionSettings(var, indx, mode)
Update settings for the self-driving microscope module such as which channel should guide the high-resolution imaging and whether to apply self-driving microscopy by reading the viewer values and updating the corresponding model parameters.
- Parameters:
var – Variable of the Tkinter trace_add function.
indx – Variable of the Tkinter trace_add function.
mode – Variable of the Tkinter trace_add function.
- updateExposureParameters(var, indx, mode)
Updates the camera exposure time by reading the viewer values and updating the model exposure_time values.
- Parameters:
var – Variable of the Tkinter trace_add function.
indx – Variable of the Tkinter trace_add function.
mode – Variable of the Tkinter trace_add function.
- updateHighResLaserParameters(var, indx, mode)
Updates the high-resolution laser power by reading the viewer values and calls the high-resolution laser power setting function in the model.
- Parameters:
var – Variable of the Tkinter trace_add function.
indx – Variable of the Tkinter trace_add function.
mode – Variable of the Tkinter trace_add function.
- updateLowResLaserParameters(var, indx, mode)
Updates the low-resolution laser power by reading the viewer values and calls the laser power setting function in the model.
- Parameters:
var – Variable of the Tkinter trace_add function.
indx – Variable of the Tkinter trace_add function.
mode – Variable of the Tkinter trace_add function.
- update_ASLMParameters(var, indx, mode)
Updates the axially-swept parameters such as minimal and maximal scan voltage, scan voltage for each wavelength, scan direction, or scan width by reading the viewer values and updating the corresponding model parameters.
- Parameters:
var – Variable of the Tkinter trace_add function.
indx – Variable of the Tkinter trace_add function.
mode – Variable of the Tkinter trace_add function.
- update_stack_aq_parameters(var, indx, mode)
Updates the stack acquisition parameters such as plane spacing, plane number, stage velocity and acceleration and camera trigger delay by taking the viewer values and updates the corresponding model parameters.
- Parameters:
var – Variable of the Tkinter trace_add function.
indx – Variable of the Tkinter trace_add function.
mode – Variable of the Tkinter trace_add function.
- updatefilename()
Construct the filename used to save data, based on the information from the GUI
- updatepreview(var, indx, mode)
Updates preview functionalities: auto-scaling of intensity values
- Parameters:
var – Variable of the Tkinter trace_add function.
indx – Variable of the Tkinter trace_add function.
mode – Variable of the Tkinter trace_add function.