LMTool GUI (pylorenzmie.lmtool)#
For a user-oriented guide to launching and using the application, see LMTool.
- class pylorenzmie.lmtool.LMTool.LMTool(controls, filename=None, normalizer=None)[source]#
Bases:
QMainWindowMain window for the LMTool hologram-fitting application.
- Parameters:
controls (type[LMWidget]) – LMWidget subclass (not an instance) providing parameter controls.
filename (str, optional) – Path to a hologram image to load on startup.
normalizer (Normalizer, optional) – Background normalization strategy. Defaults to median-filter normalization with a 51-pixel kernel.
- uiFile = 'LMTool.ui'#
- class pylorenzmie.lmtool.LMWidget.LMWidget(*args, **kwargs)[source]#
Bases:
QFrameParameter-control panel for a LorenzMie model.
Loads its layout from
uiFileand its parameter configuration fromconfigFile(both relative to the lmtool package directory). EmitspropertyChangedwhenever any parameter value changes.- cls#
alias of
jaxLorenzMie
- uiFile = 'LMWidget.ui'#
- configFile = 'LMTool.json'#
- class pylorenzmie.lmtool.ALMWidget.ALMWidget(*args, **kwargs)[source]#
Bases:
LMWidgetParameter-control panel for an AberratedLorenzMie model.
- cls#
alias of
AberratedLorenzMie
- uiFile = 'ALMWidget.ui'#
- class pylorenzmie.lmtool.ImageWidget.ImageWidget(*args, data=None, **kwargs)[source]#
Bases:
GraphicsLayoutWidgetImage display with a circular ROI for selecting a particle region.
- class pylorenzmie.lmtool.FitWidget.FitWidget(*args, **kwargs)[source]#
Bases:
GraphicsLayoutWidgetThree-panel widget showing the ROI, model fit, and normalized residuals.
- optimizationStarted#
Emitted when an optimization thread is launched.
- optimize(data, coordinates)[source]#
Fit the model to data and update the display.
Blocks the calling thread until the fit completes. For non-blocking use in a GUI context call
optimizeAsync()instead.- Parameters:
data (ndarray) – Normalized hologram crop.
coordinates (ndarray, shape (2, npts)) – Pixel coordinates for the crop.
- Return type:
- Returns:
result (pandas.Series) – Fitted parameters and uncertainties.
- optimizeAsync(data, coordinates)[source]#
Start optimization in a background thread.
Returns immediately. Emits
optimizationStartedon entry, thenoptimizationFinished(oroptimizationError) when the thread completes. Useoptimize()for synchronous (blocking) operation.- Parameters:
data (ndarray) – Normalized hologram crop.
coordinates (ndarray, shape (2, npts)) – Pixel coordinates for the crop.
- Return type:
- setData(data, rect, coordinates)[source]#
Display data, compute and show the current model prediction.
- Parameters:
data (ndarray) – Cropped hologram region.
rect (QRectF) – Screen rectangle for positioning the images.
coordinates (ndarray, shape (2, npts)) – Pixel coordinates for the cropped region.
- Return type:
- class pylorenzmie.lmtool.ProfileWidget.ProfileWidget(*args, model=None, radius=100, **kwargs)[source]#
Bases:
PlotWidgetRadial-profile plot showing experimental data and model prediction.
- class pylorenzmie.lmtool.ParameterWidget.ParameterWidget(*args, **kwargs)[source]#
Bases:
QFrameCompound widget combining a label, spinbox, slider, and lock checkbox.
Exposes a unified interface for reading and setting a single floating-point parameter value. The slider and spinbox are kept in sync via Qt Designer connections in
ParameterWidget.ui.
- class pylorenzmie.lmtool.OptimizerWidget.OptimizerWidget(*args, **kwargs)[source]#
Bases:
ParameterTreeParameter-tree widget for configuring scipy least_squares settings.
Emits
settingChanged(name, value) whenever any setting changes. Enforces the constraint that Levenberg-Marquardt requiresloss='linear'.