BecAnalysis

BecAnalysis#

class BecAnalysis(becExp)#

Bases: handle, matlab.mixin.SetGetExactNames

BecAnalysis abstract base for BEC experiment analysis modules.

Provides a common lifecycle API (initialize(), update(), finalize(), save(), show(), refresh(), close()) and helpers for 2D scans (reshape, validation, axis data). Subclasses implement updateData() and updateFigure().

Example:

bx = BecExp("Test");
an = Od(bx);  % :class:`Od` is a :class:`BecAnalysis`
an.initialize();
an.update(1);
an.finalize();
Constructor Summary
BecAnalysis(becExp)#

Construct BecAnalysis base analyzer.

Parameters:

becExp (BecExp) – Owning experiment trial

Property Summary
BecExp BecExp#

Owning BecExp trial instance that contains this analysis module

Chart Chart#

One or more Chart figure instances managed by this analysis module

Gui Gui#

One or more Gui panel or app instances managed by this analysis module

Method Summary
browserShow()#

Display charts and GUIs in browser-style layout across monitors.

Arranges analysis windows on secondary monitor (if available) in browser-like tiled layout for multi-monitor workflows. Falls back to primary monitor if control panel is not running on secondary.

close()#

Close all GUI panels and chart windows.

Properly closes and cleans up all GUI panels and chart figures associated with this analysis module.

finalize()#

Override in subclasses for final processing after all runs.

Implement any post-processing steps that require all run data to be available, such as final plots or summary calculations.

initialize()#

Initialize charts and GUI panels.

Calls Chart.initialize() and Gui.initialize() for all registered objects.

refresh()#

Recompute data for all runs and refresh visualization.

Reinitializes the analysis, reprocesses all completed runs, updates figures with the latest run, and performs finalization.

refreshData()#
save()#

Save all charts associated with this analysis module.

Calls the save method on each Chart instance to persist figures to disk in the trial’s analysis directory.

show()#

Display GUI panels and chart windows.

Initializes and shows all GUI panels and chart figures associated with this analysis module on the current monitor.

toggle(isEnabled)#

Enable or disable all GUIs and charts in this analysis module.

Controls the enabled state of all associated GUI panels and chart figures, affecting their visibility and interaction capabilities.

Parameters:

isEnabled (logical) – Flag to enable (true) or disable (false) components

update(runIdx)#

Process and render data for a specific run.

Parameters:

runIdx (double) – Run index to process

updateData(runIdx)#

Override in subclasses for specific data processing.

Implement analysis-specific data computation and storage in subclasses. This method is called for each new run to process raw data.

Parameters:

runIdx (double) – Run index to process

updateFigure(runIdx)#

Override in subclasses for specific plotting and visualization.

Implement analysis-specific figure updates in subclasses. This method is called after data processing to refresh visual displays.

Parameters:

runIdx (double) – Run index to render