Bases: sans.guiframe.plugin_base.PluginBase
Fitting plugin is used to perform fit
adds a color as a key with a plot id as its value to a dictionary
given a data, ask to the fitting panel to create a new fitting page, get this page and store it into the page_finder of this plug-in
if return True, then call handler to laod data
delete the given data from panel
Draw model.
Parameters: |
|
---|
Get the context menu items available for P(r).them allow fitting option for Data2D and Data1D only.
Parameters: | graph – the Graph object to which we attach the context menu |
---|---|
Returns: | a list of menu items with call-back function |
Note : | if Data1D was generated from Theory1D the fitting option is not allowed |
return state reader and its extensions
return self.page_finder used also by simfitpage.py
Create and return a list of panel objects
Get the list of panel names for this perspective
Returns a set of menu entries for tools
Show a general help dialog.
return True is this plugin is always active and it is local to guiframe even if the user is switching between perspectives
data_name = ‘None’ in_use = False example [(data_name, self.sub_menu)]
Load data
Load entire folder
perform fit
ask fit panel to create a new empty page
Create a page to access simultaneous fit option
switch the the notebook of batch mode or not
Call back function for the perspective menu item. We notify the parent window that the perspective has changed.
Parameters: | event – menu event |
---|
Set_state_helper. This actually sets state after plotting data from state file.
Append menu item under file menu item of the frame
Create a menu for the Fitting plug-in
Parameters: |
|
---|---|
Returns: | list of information to populate the main menu |
Post initialization call back to close the loose ends
Ready for another fit
remove model plot when a fit page is closed
save fit page state into file
Set the fit problem field to 0 or 1 to schedule that problem to fit. Schedule the specified fitproblem or get the fit problem related to the current page and set value.
Parameters: |
|
---|
the plugin to its batch state if flag is True
receive a list of data to fit
Call back method that True to notify the parent that the current plug-in can be set as default perspective. when returning False, the plug-in is not candidate for an automatic default perspective setting
Set the fitting range of a given page
Set ftol: Relative error desired in the sum of chi squares.
Used by simfitpage.py to reset a parameter given the string constrainst.
Parameters: |
|
---|---|
Note : | expecting park used for fit. |
Get a smear object and store it to a fit problem
Parameters: | smearer – smear object to allow smearing data |
---|
Call-back method for the fit page state reader. This method is called when a .fitv/.svs file is loaded.
: param state: PageState object : param datainfo: data
Close default (welcome) panel
Dialog to select ftol for Scipy
receive a word containing dot and split it. used to split parameterset name into model name and parameter name example:
paramaterset (item) = M1.A
Will return model_name = M1 , parameter name = A
Stop the fit engine
Helper to save page reference into the plug-in
Parameters: | page – page to store |
---|
return True if these plugin use data