navigate.controller.sub_controllers.adaptive_optics.AdaptiveOpticsPopupController
- class navigate.controller.sub_controllers.adaptive_optics.AdaptiveOpticsPopupController(view, parent_controller)
Bases:
GUIController
Controller for the Adaptive Optics popup window
- __init__(view, parent_controller)
Initialize the Adaptive Optics popup controller
- Parameters:
view (AdaptiveOpticsPopupView) – The view for this controller
parent_controller (Controller) – The parent controller for this controller
Methods
__init__
(view, parent_controller)Initialize the Adaptive Optics popup controller
change_camera
(evt)Change the camera to the selected camera
Clear all coefficients
Deselect all modes
execute
(command, *args)This function is called when a command is passed from a child process.
Flatten the mirror
Get the coefficients from the widgets
This function is called when the controller is initialized
plot_mirror
(data)Plot the mirror data.
plot_tonywilson
(data)Plot the tony wilson data.
Plot the tony wilson trace data.
Populate the experiment values
register_event_listener
(event_name, ...)Register event listener in the parent_controller
Run the tony wilson routine
save_report_to_file
(report)Save the wcs file
Select all modes
Sets values of widgets based on experiment setting
Set the mirror from the wcs file
set_highlighted_mode
(evt, mode)Set the highlighted mode
Set the mirror
set_widgets_from_coef
(coef)Set the widgets from the coefficients
show_verbose_info
(*info)Prints verbose information to the console
showup
([popup_window])Show the popup window.
Update the experiment values
Zero the mirror
Attributes
Custom events for this controller
list of dicts containing trace data
dictionary of widgets
dictionary of armed modes
dictionary of mode labels
list of cameras
figure for mirror plot
figure for tony wilson plot
figure for peaks plot
figure for trace plot
figure for mirror image
figure for coefs bar
- change_camera(evt)
Change the camera to the selected camera
- Parameters:
evt (Event) – The event that triggered this function
- clear_all_coefs()
Clear all coefficients
- deselect_all_modes()
Deselect all modes
- execute(command, *args)
This function is called when a command is passed from a child process.
- Parameters:
command (str) – command name
args (tuple) – command arguments
- flatten_mirror()
Flatten the mirror
- get_coef_from_widgets()
Get the coefficients from the widgets
- Returns:
The coefficients
- Return type:
list
- initialize()
This function is called when the controller is initialized
This function initializes GUI based on configuration setting parameter: configuration_controller set range value for entry or spinbox widgets; add values to combobox get other necessary information for configuration.yml
- plot_mirror(data)
Plot the mirror data.
- Parameters:
data (dict) – The data to plot
- plot_tonywilson(data)
Plot the tony wilson data.
Displays a plot of [focus, entropy] with data from autofocus routine
- Parameters:
data (dict) – The data to plot
- plot_tw_trace()
Plot the tony wilson trace data.
- populate_experiment_values()
Populate the experiment values
- register_event_listener(event_name, event_handler)
Register event listener in the parent_controller
- Parameters:
event_name (str) – event name
event_handler (function) – event handler
- run_tony_wilson()
Run the tony wilson routine
- save_wcs_file()
Save the wcs file
- select_all_modes()
Select all modes
- set_experiment_values()
Sets values of widgets based on experiment setting
setting_dict is a dictionary
- set_from_wcs_file()
Set the mirror from the wcs file
- set_highlighted_mode(evt, mode)
Set the highlighted mode
- Parameters:
evt (Event) – The event that triggered this function
mode (str) – The mode to highlight
- set_mirror()
Set the mirror
- set_widgets_from_coef(coef)
Set the widgets from the coefficients
- Parameters:
coef (list) – The coefficients
- show_verbose_info(*info)
Prints verbose information to the console
- Parameters:
info (tuple) – information to be printed
- showup(popup_window=None)
Show the popup window.
- update_experiment_values()
Update the experiment values
- zero_mirror()
Zero the mirror
- camera_list
list of cameras
- Type:
list
- coefs_bar
figure for coefs bar
- Type:
Figure
- property custom_events
Custom events for this controller
- Type:
dict
- fig
figure for mirror plot
- Type:
Figure
- fig_tw
figure for tony wilson plot
- Type:
Figure
- mirror_img
figure for mirror image
- Type:
Figure
- mode_labels
dictionary of mode labels
- Type:
dict
- modes_armed
dictionary of armed modes
- Type:
dict
- parent_controller
parent controller
- Type:
- peaks_plot
figure for peaks plot
- Type:
Figure
- trace_list
list of dicts containing trace data
- Type:
list of dicts
- trace_plot
figure for trace plot
- Type:
Figure
- view
GUI view
- Type:
tkinter.Tk
- widgets
dictionary of widgets
- Type:
dict