navigate.controller.sub_controllers.camera_map.CameraMapSettingPopupController
- class navigate.controller.sub_controllers.camera_map.CameraMapSettingPopupController(view, parent_controller=None)
Bases:
GUIControllerController for the camera map setting popup.
- __init__(view, parent_controller=None)
Controller for the camera map setting popup.
Popup used to generate offset and variance maps of a camera from a series of dark frames. The maps are useful for estimating signal- to-noise ratios.
- Parameters:
view (navigate.view.sub_views.camera_map_setting_popup.CameraMapSettingPopup) – View for the camera map setting popup.
parent_controller (navigate.controller.main_controller.MainController) – Parent controller of this controller.
Methods
__init__(view[, parent_controller])Controller for the camera map setting popup.
Create offset and variance maps from a series of dark frames.
Display the offset and variance maps.
execute(command, *args)This function is called when a command is passed from a child process.
Return list of serial numbers of available cameras.
This function is called when the controller is initialized
Open a file dialog to select a series of dark frames.
register_event_listener(event_name, ...)Register event listener in the parent_controller
Sets values of widgets based on experiment setting
show_verbose_info(*info)Prints verbose information to the console
showup()Show the popup.
update_experiment_values(*args)Collects all the values of widgets
Attributes
Custom events for the controller
Path to the camera maps directory.
Offset map.
Variance map.
- create_camera_maps()
Create offset and variance maps from a series of dark frames.
- display_plot()
Display the offset and variance maps.
- 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
- get_camera_menu()
Return list of serial numbers of available cameras.
- Returns:
menu – Serial numbers of available cameras.
- 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
- open_frames()
Open a file dialog to select a series of dark frames.
- 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
- set_experiment_values()
Sets values of widgets based on experiment setting
setting_dict is a dictionary
- show_verbose_info(*info)
Prints verbose information to the console
- Parameters:
info (tuple) – information to be printed
- showup()
Show the popup.
This method is called by the parent controller.
- update_experiment_values(*args)
Collects all the values of widgets
setting_dict is a reference of experiment dictionary update the dictionary directly
- property custom_events
Custom events for the controller
- map_path
Path to the camera maps directory.
- Type:
str
- off
Offset map.
- Type:
np.ndarray
- parent_controller
parent controller
- Type:
- var
Variance map.
- Type:
np.ndarray
- view
GUI view
- Type:
tkinter.Tk