navigate Logo

Getting Started

  • Computer Considerations
  • Computer Power Configuration
  • Software Installation
  • Launching Navigate
  • Configuring Navigate
  • Acquiring Data
  • Smart Acquisition Routines

User Guide

  • Supported Hardware
  • Supported File Formats
  • User Interface Walkthrough
  • Setting Up a Microscope
  • Acquiring Data
  • Case Studies

Development

  • Contributing Guidelines
  • Developer Install
  • Software Architecture
  • Developer Architecture Concepts
  • Feature Container
  • REST API
  • Plugin Architecture
  • Adding New Hardware

Troubleshooting & Known Issues

  • Troubleshooting
  • Known Issues

Plugins

  • navigate Plugin Template
  • navigate Confocal Projection
  • navigate at Scale
  • navigate Constant Velocity Acquisition
  • navigate MMCore
  • navigate ilastik Server
  • navigate Photoactivation

Reference

  • Implemented Microscopes
  • Software API
    • navigate.config
    • navigate.controller
      • navigate.controller.autofocus_calibration
      • navigate.controller.configuration_controller
      • navigate.controller.configurator
      • navigate.controller.controller
      • navigate.controller.sub_controllers
        • navigate.controller.sub_controllers.acquire_bar
        • navigate.controller.sub_controllers.adaptive_optics
        • navigate.controller.sub_controllers.autofocus
        • navigate.controller.sub_controllers.camera_map
        • navigate.controller.sub_controllers.camera_settings
        • navigate.controller.sub_controllers.camera_view
        • navigate.controller.sub_controllers.channels_settings
        • navigate.controller.sub_controllers.channels_tab
        • navigate.controller.sub_controllers.diagnostics_popup
        • navigate.controller.sub_controllers.feature_advanced_setting
        • navigate.controller.sub_controllers.features_popup
        • navigate.controller.sub_controllers.gui
        • navigate.controller.sub_controllers.gui_settings_popup
        • navigate.controller.sub_controllers.histogram
        • navigate.controller.sub_controllers.ilastik
        • navigate.controller.sub_controllers.keystrokes
        • navigate.controller.sub_controllers.menus
        • navigate.controller.sub_controllers.microscope_popup
        • navigate.controller.sub_controllers.multiposition
        • navigate.controller.sub_controllers.plugins
        • navigate.controller.sub_controllers.stages
        • navigate.controller.sub_controllers.stages_advanced
        • navigate.controller.sub_controllers.tiling
        • navigate.controller.sub_controllers.waveform_popup
        • navigate.controller.sub_controllers.waveform_tab
      • navigate.controller.thread_pool
    • navigate.controller.configurator
    • navigate.log_files
    • navigate.model
    • navigate.tools
    • navigate.view
navigate
  • Software API
  • navigate.controller
  • navigate.controller.sub_controllers
  • navigate.controller.sub_controllers.autofocus
  • navigate.controller.sub_controllers.autofocus.AutofocusPopupController
  • View page source

navigate.controller.sub_controllers.autofocus.AutofocusPopupController

class navigate.controller.sub_controllers.autofocus.AutofocusPopupController(view: AutofocusPopup, parent_controller: Controller)

Bases: GUIController

Class creates the popup to configure autofocus parameters.

__init__(view: AutofocusPopup, parent_controller: Controller) → None
Parameters:
  • view (AutofocusPopup) – The view of the autofocus popup.

  • parent_controller (navigate.controller.controller.Controller) – The parent controller of the autofocus popup.

Methods

__init__(view, parent_controller)

param view:

The view of the autofocus popup.

close_popup(*_)

Close the popup window

display_autofocus_progress(data)

Queue the latest autofocus measurements for a Tk-thread update.

display_plot(data_and_flags)

Display autofocus data, handling segmentation, plot mode, and redraw.

execute(command, *args)

This function is called when a command is passed from a child process.

handle_autofocus_complete(payload)

Handle autofocus completion metadata for defocus calibration.

initialize()

This function is called when the controller is initialized

populate_experiment_values()

Populate Experiment Values

refresh_bounds_validation()

Refresh advisory scan bounds feedback from current stage state.

register_event_listener(event_name, ...)

Register event listener in the parent_controller

set_acquisition_state(state)

Update the acquisition lifecycle state and popup actions.

set_autofocus_state(is_active)

Update autofocus activity and popup actions.

set_experiment_values()

Sets values of widgets based on experiment setting

show_autofocus_setting(*_)

Show Autofocus Parameters

show_verbose_info(*info)

Prints verbose information to the console

showup()

Shows the popup window

start_autofocus()

Starts the autofocus process.

stop_acquisition()

Stop the active acquisition through the main controller.

update_device_ref(*_)

Update device reference name

update_experiment_values(*args)

Collects all the values of widgets

update_setting_dict(parameter)

Show Autofocus Parameters

Attributes

CALIBRATION_ACTIONS

custom_events

Custom events for this controller

defocus_calibration_reference

Return popup-independent defocus calibration reference state.

widgets

The autofocus setting dictionary.

microscope_name

The microscope name.

setting_dict

The autofocus setting dictionary.

autofocus_fig

The autofocus figure.

autofocus_coarse

The autofocus coarse plot.

coarse_plot

The autofocus coarse plot.

close_popup(*_: tuple[str]) → None

Close the popup window

Parameters:

_ (tuple[str]) – The event arguments.

display_autofocus_progress(data) → None

Queue the latest autofocus measurements for a Tk-thread update.

display_plot(data_and_flags: tuple[numpy.ndarray, bool, bool]) → None

Display autofocus data, handling segmentation, plot mode, and redraw.

This method unpacks and normalizes incoming data, splits it into coarse and fine segments according to the current autofocus settings, renders scatter and/or line plots on the coarse axes, optionally clears previous data, marks the detected maximum(s), and schedules a non-blocking canvas redraw.

Parameters:

data_and_flags (tuple[np.ndarray, bool, bool]) – Tuple of (data, line_plot, clear_data). data contains sample rows with stage positions in column 0 and signal values in column 1. line_plot overlays a continuous red line when true, and clear_data clears the axes and draws peak indicators when true.

Raises:

ValueError – May be raised if data is empty or has fewer than two columns (propagated from internal processing or from _plot_maxima).

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

handle_autofocus_complete(payload: dict) → None

Handle autofocus completion metadata for defocus calibration.

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

populate_experiment_values() → None

Populate Experiment Values

Populates the experiment values from the experiment settings dictionary

refresh_bounds_validation() → list[str]

Refresh advisory scan bounds feedback from current stage state.

Returns:

Immediately knowable bounds diagnostics.

Return type:

list[str]

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_acquisition_state(state: str) → None

Update the acquisition lifecycle state and popup actions.

set_autofocus_state(is_active: bool) → None

Update autofocus activity and popup actions.

set_experiment_values()

Sets values of widgets based on experiment setting

setting_dict is a dictionary

show_autofocus_setting(*_: tuple[str]) → None

Show Autofocus Parameters

Parameters:

_ (tuple[str]) – The event arguments.

show_verbose_info(*info)

Prints verbose information to the console

Parameters:

info (tuple) – information to be printed

showup() → None

Shows the popup window

start_autofocus() → None

Starts the autofocus process.

stop_acquisition() → None

Stop the active acquisition through the main controller.

update_device_ref(*_: tuple[str]) → None

Update device reference name

Parameters:

_ (tuple[str]) – The event arguments.

update_experiment_values(*args)

Collects all the values of widgets

setting_dict is a reference of experiment dictionary update the dictionary directly

update_setting_dict(parameter: str) → callable

Show Autofocus Parameters

Parameters:

parameter (str) – The parameter to be updated.

Returns:

The function to update the parameter

Return type:

callable

autofocus_coarse

The autofocus coarse plot.

Type:

object

autofocus_fig

The autofocus figure.

Type:

object

coarse_plot

The autofocus coarse plot.

Type:

object

property custom_events: dict[str, callable]

Custom events for this controller

Returns:

The custom events for this controller.

Return type:

dict[str, callable]

property defocus_calibration_reference: Optional[dict]

Return popup-independent defocus calibration reference state.

microscope_name

The microscope name.

Type:

str

parent_controller

parent controller

Type:

Controller

setting_dict

The autofocus setting dictionary.

Type:

dict

view

GUI view

Type:

tkinter.Tk

widgets

The autofocus setting dictionary.

Type:

dict

Previous Next

© Copyright 2026, Dean Lab, UT Southwestern Medical Center.