navigate.controller.configuration_controller.ConfigurationController
- class navigate.controller.configuration_controller.ConfigurationController(configuration: DictProxy)
Bases:
objectConfiguration Controller - Used to get the configuration of the microscope.
- __init__(configuration: DictProxy) → None
Initialize the Configuration Controller
- Parameters:
configuration (DictProxy) – The configuration dictionary.
Methods
__init__(configuration)Initialize the Configuration Controller
change_microscope([microscope_name])Get the new microscope configuration dict according to the name.
Return microscope configuration dictionary
get_stage_position_limits(suffix)Return the position limits of the stage
get_stages_by_axis([axis_prefix])Return a list of all stage names.
get_zoom_pixel_sizes(microscope_name)Return a dictionary of pixel sizes
get_zoom_value_list(microscope_name)Return a list of zoom values
is_same_camera(microscope_name)Check if the current microscope uses the same camera as the given microscope.
Update the microscope configuration to reflect any changes made to it.
Attributes
- change_microscope(microscope_name=None) → bool
Get the new microscope configuration dict according to the name.
Gets the name of the microscope, retrieves its configuration, and updates the Configuration Controller’s attributes.
- Returns:
result
- Return type:
bool
- get_microscope_configuration_dict() → dict
Return microscope configuration dictionary
- Returns:
microscope_configuration_dict
- Return type:
dict
- get_stage_position_limits(suffix: str) → dict
Return the position limits of the stage
- Parameters:
suffix (str) – ‘_min’ or ‘_max’
- Returns:
position_limits – Depending on suffix, min or max stage limits, e.g. {‘x’: 2000, ‘y’: 2000, ‘z’: 2000, ‘theta’: 0, ‘f’: 2000}.
- Return type:
dict
- get_stages_by_axis(axis_prefix: Optional[str] = 'z')
Return a list of all stage names.
- Parameters:
axis_prefix (str) – The axis prefix to get the stage names for.
- Returns:
stages – A list of stage names.
- Return type:
list
- get_zoom_pixel_sizes(microscope_name: str) → dict
Return a dictionary of pixel sizes
- Returns:
pixel_size_dict – A dictionary of pixel sizes: {zoom_value : pixel_size}
- Return type:
dict
- get_zoom_value_list(microscope_name: str) → list
Return a list of zoom values
- Returns:
zoom_value_list – List of zoom values.
- Return type:
list
- is_same_camera(microscope_name: str) → bool
Check if the current microscope uses the same camera as the given microscope.
- Parameters:
microscope_name (str) – The name of the microscope to compare with.
- Returns:
is_same – True if the cameras are the same, False otherwise.
- Return type:
bool
- update_configuration() → None
Update the microscope configuration to reflect any changes made to it.
- property all_stage_axes: list[str]
Return all the axes of the stage
- Returns:
axes – List of all axes, e.g. [‘x’, ‘y’, ‘z’, ‘theta’, ‘f’].
- Return type:
list
- property camera_config_dict: dict
Get camera configuration dict
- Returns:
camera_setting – Camera Setting, e.g. {
}
- Return type:
dict
- property camera_flip_flags: dict[str, bool]
Return the flip flags of the camera
- Returns:
flip_flags – {‘x’: bool, ‘y’: bool}.
- Return type:
dict
- property camera_pixels: list[int]
Get default pixel values from camera
- Returns:
x_pixels (int) – Number of x pixels
y_pixels (int) – Number of y pixels
- property channels_info: dict
Return the channels info
Populate the channel combobox with the channels that are available in the configuration
- Returns:
setting –
- Channel settings, e.g. {
‘laser’: [‘488nm’, ‘561nm’, ‘642nm’], ‘filter’: [‘Empty-Alignment’, ‘GFP - FF01-515/30-32’, ‘…}
- Return type:
dict
- configuration
The configuration dictionary.
- Type:
DictProxy
- property daq_sample_rate: int
Return daq sample rate.
- Returns:
daq_sample_rate – Sample rate of the daq.
- Return type:
int
- property filter_wheel_names: list[str]
Return a list of filter wheel names
- Returns:
filter_wheel_names – List of filter wheel names.
- Return type:
list
- property filter_wheel_setting_dict: dict
Return filter wheel setting dict.
- Returns:
filter_wheel_setting_dict – Dictionary with the filter wheel settings.
- Return type:
dict
- property filter_wheel_types: list[str]
Return a list of filter wheel hardware types.
- Returns:
filter_wheel_types – List of filter wheel hardware types.
- Return type:
list
- property filter_wheel_visibility: list[bool]
Return a list indicating which filter wheels are native to microscope.
- Returns:
filter_wheel_visibility –
Truefor wheels that are defined for this microscope.- Return type:
list
- galvo_num
The number of galvos.
- Type:
int
- property galvo_parameter_dict: dict
Return galvo parameter dict.
- Returns:
galvo_parameter_dict – Dictionary with the galvo parameters.
- Return type:
dict
- property gui_setting: dict
Return the GUI settings
- Returns:
gui_setting – Dictionary with the GUI settings.
- Return type:
dict
- property has_analog_stage: bool
Check to see if the has_ni_galvo_stage flag is set in the configuration.
- Returns:
has_ni_galvo_stage – True if the microscope has an NI galvo stage, False otherwise.
- Return type:
bool
- property lasers_info: list
Return the lasers info
Populate the laser combobox with the lasers that are available in the configuration
- Returns:
laser_list – List of lasers, e.g. [‘488nm’, ‘561nm’, ‘642nm’]
- Return type:
list
- microscope_config
The microscope configuration dictionary.
- Type:
dict
- property microscope_list: list[str]
Return a list of microscope names
- Returns:
microscope_list – List of microscope names.
- Return type:
list
- microscope_name
The microscope name.
- Type:
str
- property number_of_channels: int
Return number of channels.
- Returns:
number_of_channels – Number of channels.
- Return type:
int
- property number_of_filter_wheels: int
Return number of filter wheels
- Returns:
number_of_filter_wheels – Number of filter wheels
- Return type:
int
- property remote_focus_dict: dict
Return delay_percent, pulse_percent.
- Returns:
remote_focus_parameters – Dictionary with the remote focus percent delay and pulse percent.
- Return type:
dict
- property stage_axes: list[str]
Return the axes of the stage
- Returns:
axes – List of axes, e.g. [‘x’, ‘y’, ‘z’, ‘theta’, ‘f’].
- Return type:
list
- property stage_default_position: dict
Get current position of the stage
- Returns:
position – Dictionary with x, y, z, theta, and f positions.
- Return type:
dict
- property stage_flip_flags: dict[str, bool]
Return the flip flags of the stage
- Returns:
flip_flags – {‘x’: bool, ‘y’: bool, ‘z’: bool, ‘theta’: bool, ‘f’: bool}.
- Return type:
dict
- property stage_home_position: dict
Get the home position of the stage. If not set, return None.
- Returns:
position – Dictionary with all stage home positions.
- Return type:
dict
- property stage_offsets: dict
Get the offsets of the stage
- Returns:
offsets – Offsets in x, y, z, theta, and f.
- Return type:
dict
- property stage_setting_dict: dict
Return stage setting dict.
- Returns:
stage_setting_dict – Dictionary with the stage settings.
- Return type:
dict
- property stage_step: dict
Get the step size of the stage
- Returns:
steps – Step size in x (same step size for y), z, theta, and f.
- Return type:
dict