Qudi
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
fitsettings.FitSettingsDialog Class Reference

A dialog that is used to configure the fits in a FitContainer. More...

Inheritance diagram for fitsettings.FitSettingsDialog:
Inheritance graph
[legend]
Collaboration diagram for fitsettings.FitSettingsDialog:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, fit_container)
 Create a FitSettingsDialog for a matching FitContainer. More...
 
def buttonClicked (self, button)
 Slot for signals from dialog button box. More...
 
def addFitButtonClicked (self)
 The 'Add Fit' button was clicked. More...
 
def saveFitButtonClicked (self)
 The 'Save Fits' button was clicked. More...
 
def loadFitButtonClicked (self)
 The 'Load Fits' button was clicked. More...
 
def loadFits (self, user_fits)
 Take a fit config dictionary and create widgets for the fits inside. More...
 
def addFit (self, name, fit=None, estimator=None)
 Add a new fit to the dialog. More...
 
def removeFit (self, name)
 Remove a fit from the dialog. More...
 
def removeAllFits (self)
 Remove all configured fits from dialog.
 
def getFits (self)
 Return all configured fits from this dialog.
 
def applySettings (self)
 Apply all settings that the user has made in the dialog and send out update signals. More...
 
def buildCurrentFits (self)
 Update dictionary of the configured fits for FitContainer or other componenrs.
 
def resetSettings (self)
 Reset all input widgets to their stored values, discarding changes by the user.
 
def getParameters (self, fit_name)
 Return Parameters object for a given fit. More...
 
def updateParameters (self, fit_name, parameters)
 Update parameters of a given fit. More...
 

Public Attributes

 fc
 
 title
 
 all_functions
 
 tabs
 
 parameters
 
 parameterUse
 
 currentFits
 
 fitWidgets
 
 currentFitWidgets
 

Static Public Attributes

 sigFitsUpdated = QtCore.Signal(dict)
 

Detailed Description

A dialog that is used to configure the fits in a FitContainer.

Constructor & Destructor Documentation

◆ __init__()

def fitsettings.FitSettingsDialog.__init__ (   self,
  fit_container 
)

Create a FitSettingsDialog for a matching FitContainer.

Parameters
fit_containerFitContainer: the FitContainer that this dialog should manipulate

Member Function Documentation

◆ addFit()

def fitsettings.FitSettingsDialog.addFit (   self,
  name,
  fit = None,
  estimator = None 
)

Add a new fit to the dialog.

Parameters
namestr: configured name for fit
fitstr: name of the fit function for this fit
estimatorstr: name of the estimator function for this fit

◆ addFitButtonClicked()

def fitsettings.FitSettingsDialog.addFitButtonClicked (   self)

The 'Add Fit' button was clicked.

Display a name input dialog and add the fit.

◆ applySettings()

def fitsettings.FitSettingsDialog.applySettings (   self)

Apply all settings that the user has made in the dialog and send out update signals.

This copies all input widget values to thei coresponding internal data structures, creates an removes widgets and parameter tabs.

◆ buttonClicked()

def fitsettings.FitSettingsDialog.buttonClicked (   self,
  button 
)

Slot for signals from dialog button box.

Parameters
buttonQAbstractButton: designates which button was clicked.

◆ getParameters()

def fitsettings.FitSettingsDialog.getParameters (   self,
  fit_name 
)

Return Parameters object for a given fit.

Parameters
fit_namestr: name of the fit
Returns
Parameters: lmfit parameters container

◆ loadFitButtonClicked()

def fitsettings.FitSettingsDialog.loadFitButtonClicked (   self)

The 'Load Fits' button was clicked.

Display file chooser and load fits from file.

◆ loadFits()

def fitsettings.FitSettingsDialog.loadFits (   self,
  user_fits 
)

Take a fit config dictionary and create widgets for the fits inside.

Parameters
user_fitsdict: configured fits dictionary

◆ removeFit()

def fitsettings.FitSettingsDialog.removeFit (   self,
  name 
)

Remove a fit from the dialog.

Hides the FitonfigWidet and disables the parameter tab.

Parameters
namestr: name of fit to remove

◆ saveFitButtonClicked()

def fitsettings.FitSettingsDialog.saveFitButtonClicked (   self)

The 'Save Fits' button was clicked.

Display file chooser and save fits to file.

◆ updateParameters()

def fitsettings.FitSettingsDialog.updateParameters (   self,
  fit_name,
  parameters 
)

Update parameters of a given fit.

Parameters
fit_namestr: name of fit
parametersParameters: lmfit Parameters container

This function updates all parameters for a fit that the dialog has stored and ingores any other parameters in he parameter container.


The documentation for this class was generated from the following file: