controllers
Module Contents
Classes
Functions
|
Attributes
- class controllers.IntController(main_window: main.MainWindow)[source]
Bases:
PyQt5.QtCore.QObject- setup_plot(plot_item: pyqtgraph.PlotItem, is_int_hist: bool = False, is_group_hist: bool = False, is_lifetime: bool = False)[source]
- gui_apply_bin()[source]
Changes the bin size of the data of the current particle and then displays the new trace.
- get_bin() int[source]
Returns current GUI value for bin size in ms.
- Returns:
The value of the bin size on the GUI in spbBinSize.
- Return type:
int
- set_bin(new_bin: int)[source]
Sets the GUI value for the bin size in ms
- Parameters:
new_bin (int) – Value to set bin size to, in ms.
- gui_apply_bin_all()[source]
Changes the bin size of the data of all the particles and then displays the new trace of the current particle.
- gui_resolve_selected()[source]
Resolves the levels of the selected particles and displays the levels of the current particle.
- gui_resolve_all()[source]
Resolves the levels of the all the particles and then displays the levels of the current particle.
- plot_trace(particle: smsh5.Particle = None, for_export: bool = False, export_path: str = None, lock: bool = False) None[source]
Used to display the trace from the absolute arrival time data of the current particle.
- plot_levels(particle: smsh5.Particle = None, for_export: bool = False, export_path: str = None, lock: bool = False)[source]
Used to plot the resolved intensity levels of the current particle.
- plot_hist(particle: smsh5.Particle = None, for_export: bool = False, export_path: str = None, for_levels: bool = False, for_groups: bool = False)[source]
- update_level_info(particle: smsh5.Particle = None)[source]
- plot_group_bounds(particle: smsh5.Particle = None, for_export: bool = False, export_path: str = None, lock: bool = False)[source]
- start_resolve_thread(mode: str = 'current', thread_finished=None, end_time_s=None) None[source]
Creates a worker to resolve levels.
Depending on the
current_selected_allparameter the worker will be given the necessary parameter to fit the current, selected or all particles.- Parameters:
end_time_s (float)
thread_finished
mode ({'current', 'selected', 'all'}) – Possible values are ‘current’ (default), ‘selected’, and ‘all’.
- gather_replace_results(results: List[threads.ProcessTaskResult] | threads.ProcessTaskResult)[source]
- resolve_thread_complete(thread: threads.ProcessThread)[source]
- class controllers.LifetimeController(main_window: main.MainWindow)[source]
Bases:
PyQt5.QtCore.QObject- gui_load_irf()[source]
Allow the user to load a IRF instead of the IRF that has already been loaded.
- gui_fit_param()[source]
Opens a dialog to choose the setting with which the decay curve will be fitted.
- gui_fit_current()[source]
Fits the currently selected level’s decay curve using the provided settings.
- gui_fit_selected()[source]
Fits the all the levels decay curves in the all the selected particles using the provided settings.
- gui_fit_all()[source]
Fits the all the levels decay curves in the all the particles using the provided settings.
- test_need_roi_apply(particle: smsh5.Particle = None, update_buttons: bool = True)[source]
- update_results(use_selected: bool = False, selected_level_or_group: change_point.Level | grouping.GlobalLevel | grouping.Group = None, particle: smsh5.Particle = None, for_export: bool = False, str_return: bool = False) str | None[source]
- plot_decay_and_convd(particle: smsh5.Particle, export_path: str, has_groups: bool, only_groups: bool = False, lock: bool = False)[source]
- plot_decay_convd_and_hist(particle: smsh5.Particle, export_path: str, has_groups: bool, only_groups: bool = False, lock: bool = False)[source]
- plot_decay(selected_level_or_group: None | change_point.Level | grouping.GlobalLevel | grouping.Group = None, use_selected: bool = False, particle: smsh5.Particle = None, remove_empty: bool = False, for_export: bool = False, export_path: str = None, lock: bool = False) None[source]
Used to display the histogram of the decay data of the current particle.
- plot_convd(selected_level_or_group: change_point.Level | grouping.GlobalLevel | grouping.Group = None, use_selected: bool = False, particle: smsh5.Particle = None, remove_empty: bool = False, for_export: bool = False, export_path: str = None, lock: bool = False) None[source]
Used to display the histogram of the decay data of the current particle.
- plot_residuals(selected_level_or_group: change_point.Level | grouping.GlobalLevel | grouping.Group = None, use_selected: bool = False, particle: smsh5.Particle = None, for_export: bool = False, export_path: str = None, lock: bool = False) None[source]
Used to display the histogram of the decay data of the current particle.
- start_fitting_thread(mode: str = 'current') None[source]
For now, doesn’t actually use threads. This is due to high memory consumption.
Depending on the
current_selected_allparameter the worker will be given the necessary parameter to fit the current, selected or all particles.- Parameters:
mode ({'current', 'selected', 'all'}) – Possible values are ‘current’ (default), ‘selected’, and ‘all’.
- class controllers.GroupingController(main_widow: main.MainWindow)[source]
Bases:
PyQt5.QtCore.QObject- plot_group_bic(particle: smsh5.Particle = None, for_export: bool = False, export_path: str = None, lock: bool = False, is_global_group=False)[source]
- start_grouping_thread(mode: str = 'current') None[source]
Creates a worker to resolve levels.
Depending on the
current_selected_allparameter the worker will be given the necessary parameter to fit the current, selected or all particles.- Parameters:
thread_finished
mode ({'current', 'selected', 'all'}) – Possible values are ‘current’ (default), ‘selected’, and ‘all’.
- class controllers.SpectraController(main_window: main.MainWindow)[source]
Bases:
PyQt5.QtCore.QObject- plot_spectra(particle: smsh5.Particle = None, for_export: bool = False, export_path: str = None, lock: bool = False)[source]
- class controllers.MyCrosshairOverlay(pos=None, size=None, **kargs)[source]
Bases:
pyqtgraph.CrosshairROI
- class controllers.RasterScanController(main_window: main.MainWindow)[source]
Bases:
PyQt5.QtCore.QObject- static create_crosshair_item(pos: Tuple[int, int], pixelsize) MyCrosshairOverlay[source]
- plot_raster_scan(particle: smsh5.Particle = None, raster_scan: smsh5.RasterScan = None, for_export: bool = False, export_path: str = None, lock: bool = False)[source]
- class controllers.AntibunchingController(mainwindow: main.MainWindow, corr_widget: pyqtgraph.PlotWidget, corr_sum_widget: pyqtgraph.PlotWidget)[source]
Bases:
PyQt5.QtCore.QObject- plot_corr(particle: smsh5.Particle = None, for_export: bool = False, export_path: str = None, lock: bool = False) None[source]
- start_corr_thread(mode: str = 'current') None[source]
Creates a worker to calculate correlations.
Depending on the
current_selected_allparameter the worker will be given the necessary parameter to correlate the current, selected or all particles.- Parameters:
mode ({'current', 'selected', 'all'}) – Possible values are ‘current’ (default), ‘selected’, and ‘all’.
- class controllers.FilteringController(main_window: main.MainWindow)[source]
Bases:
PyQt5.QtCore.QObject- static _get_label(feature: PlotFeature = None) tuple[source]
- setup_plot(feature_x: PlotFeature, feature_y: PlotFeature = None, clear_plot: bool = True, is_first_setup: bool = False)[source]
- change_plot_type(feature_x: PlotFeature | str = None, feature_y: PlotFeature | str = None)[source]
- plot_features(feature_x: PlotFeature | str = None, feature_y: PlotFeature | str = None, use_current_plot: bool = False, use_selected_two_features: bool = False)[source]
- static _filter_numeric_data(feature_data: numpy.ndarray, are_used_flags: List[bool], test_min: bool = False, test_max: bool = False, min_value=None, max_value=None)[source]
- get_feature_data(feature: PlotFeature | str) tuple[source]
- get_all_feature_data() tuple[dict[Any, dict[str, Any]], list[bool] | Any, list[bool] | Any][source]
- set_limits(feature_x: PlotFeature | str = None, feature_y: PlotFeature | str = None)[source]