Od

Od#

class Od(becExp)#

Bases: BecAnalysis

Od compute optical depth (OD) and related plots per run.

Reads ROI images (atom/light/dark), computes absorption and OD, applies optional fringe removal, and renders OD mix and GIF animations. Also stores background-subtracted light for downstream imaging analysis.

Associated Charts:
  • Chart(1): “OdMix” - Horizontal mosaic or 2D density plot of OD

  • Chart(2): “OdAnimation” - Animated GIF showing OD evolution

Associated GUIs:
  • Gui(1): “FringeRemoval” - Interface for fringe removal configuration

Constructor Summary
Od(becExp)#

Construct Od analyzer.

Parameters:

becExp (BecExp) – Owning experiment

Property Summary
CLim double = [0,4]#

Color axis limits for optical depth plots [OD_min, OD_max]

CameraLightData double#

Background-subtracted light images after fringe removal processing

Colormap = jet#

Colormap function handle for optical depth visualization

FringeRemovalMask double#

Background region coordinates as 2×N matrix [\(y\); \(x\)] in pixels

FringeRemovalMethod string = "LSR"#

Fringe removal algorithm: “LSR” (least squares regression) or “None”

ImageRatio double#

Atom-to-light intensity ratio \(I_\mathrm{atom}/I_\mathrm{light}\) for phase contrast imaging

OdData double#

Optical depth maps \(\mathrm{OD} = -\ln(I_\mathrm{atom}/I_\mathrm{light})\) per run

RoiData double#

Raw ROI image stack with shape (\(N_y\), \(N_x\), \(N_\mathrm{run}\), [atom, light, dark])

Method Summary
doFringeRemoval()#

Perform optional fringe removal and update processed data.

Applies fringe removal algorithm (if configured) to reduce systematic intensity variations. Updates optical depth, image ratio, and camera light data with the corrected values.

finalize()#

Apply fringe removal and generate final OD visualizations.

Performs fringe removal processing (if configured), then creates the OD mosaic plot and animated GIF showing temporal evolution.

static handlePropEvents(src, evnt)#

Listener callback to propagate CLim changes.

initialize()#

Initialize internal data arrays and property change listeners.

Sets up storage arrays for ROI data, optical depth maps, image ratios, and processed light images. Establishes listener for color limit changes.

plotOdAnimation()#

Generate animated GIF showing OD evolution across parameter values.

Creates an animated visualization with the main OD image and cross-sectional profiles, stepping through parameter values to show temporal or parametric evolution.

plotOdMix()#

Generate OD mosaic plot for 1D scans or 2D parameter map.

Creates either a horizontal mosaic of OD images (for 1D parameter scans) or a 2D density map (for 2D parameter scans) showing the spatial distribution of optical depth.

plotOdMix1D(fig)#

Create horizontal mosaic of OD images for 1D parameter scans.

Concatenates OD images from all runs side-by-side, sorted by parameter value, with proper axis labeling and colorbar.

Parameters:

fig (matlab.ui.Figure) – Target figure handle

plotOdMix2D(fig)#

Create 2D parameter density map from OD data.

Generates a 2D density plot showing OD variation across the two-dimensional parameter space, using a representative slice through the ROI.

Parameters:

fig (matlab.ui.Figure) – Target figure handle

Plot OD Data

refresh()#

Reload all ROI data from disk and regenerate OD analysis.

Clears temporary data, reloads all run images from disk, and recomputes the complete OD analysis including fringe removal and visualization.

show()#

Display OD mosaic and animation charts with property listeners.

Makes the OD visualization charts visible and establishes property change listeners for real-time color limit updates.

update(runIdx)#

Read run data and compute optical depth without fringe removal.

Loads raw images for the specified run, computes optical depth using the absorption-to-OD conversion, and updates camera light data for downstream analysis modules.

Parameters:

runIdx (double) – Run index to process