BackgroundWidget

This module provides a background configuration widget BackgroundWidget and a corresponding dialog window BackgroundDialog.

imgBGWidget

API

class silx.gui.fit.BackgroundWidget.BackgroundWidget(parent=None)[source]

Background configuration widget, with a PlotWindow.

Strip and snip filters parameters can be adjusted using input widgets, and the computed backgrounds are plotted next to the original data to show the result.

getParameters()[source]

Return dictionary of parameters defined in the GUI

The returned dictionary contains following values:

  • algorithm: “strip” or “snip”
  • StripWidth: width of strip iterator
  • StripIterations: number of iterations
  • StripThreshold: strip curvature (currently fixed to 1.0)
  • SnipWidth: width of snip algorithm
  • SmoothingFlag: flag to enable/disable smoothing
  • SmoothingWidth: width of Savitsky-Golay smoothing filter
  • AnchorsFlag: flag to enable/disable anchors
  • AnchorsList: list of anchors (X coordinates of fixed values)
setParameters(ddict)[source]

Set values for all input widgets.

Parameters:ddict (dict) – Input dictionary, must have the same keys as the dictionary output by getParameters()
setData(x, y, xmin=None, xmax=None)[source]

Set data for the original curve, and _update strip and snip curves accordingly.

Parameters:
  • x – Array or sequence of curve abscissa values
  • y – Array or sequence of curve ordinate values
  • xmin – Min value to be displayed on the X axis
  • xmax – Max value to be displayed on the X axis
class silx.gui.fit.BackgroundWidget.BackgroundDialog(parent=None)[source]

QDialog window featuring a BackgroundWidget

output = None

Configuration dictionary containing following fields:

  • SmoothingFlag
  • SmoothingWidth
  • StripWidth
  • StripIterations
  • StripThreshold
  • SnipWidth
  • AnchorsFlag
  • AnchorsList
accept()[source]

Update output, then call QDialog.accept()

setData(x, y, xmin=None, xmax=None)[source]

See BackgroundWidget.setData()

getParameters()[source]

See BackgroundWidget.getParameters()

setParameters(ddict)[source]

See BackgroundWidget.setParameters()

setDefault(ddict)[source]

Alias for setParameters()

Table Of Contents

Previous topic

FitWidget

Next topic

hdf5: HDF5 widgets

This Page