Bases: wx._windows.Dialog
Bases: sas.guiframe.plugin_base.PluginBase
This class defines the interface for invariant Plugin class that can be used by the gui_manager.
This method is optional.
When the context menu of a plot is rendered, the get_context_menu method will be called to give you a chance to add a menu item to the context menu.
A ref to a Graph object is passed so that you can investigate the plot content and decide whether you need to add items to the context menu.
This method returns a list of menu items. Each item is itself a list defining the text to appear in the menu, a tool-tip help text, and a call-back method.
Parameters: | graph – the Graph object to which we attach the context menu |
---|---|
Returns: | a list of menu items with call-back function |
Create and return the list of wx.Panels for your plug-in. Define the plug-in perspective.
Panels should inherit from DefaultPanel defined below, or should present the same interface. They must define “window_caption” and “window_name”.
Parameters: | parent – parent window |
---|---|
Returns: | list of panels |
Show a general help dialog.
Set the state when called by EVT_STATE_UPDATE event from guiframe after a .inv/.svs file is loaded
replot the current data if the user enters a new scale or background
Receive a data set and post a NewPlotEvent to parent.
Parameters: |
|
---|
Save data in provided state object.
Parameters: |
|
---|
receive a list of data and compute invariant
Call-back method for the state reader. This method is called when a .inv/.svs file is loaded.
Parameters: | state – State object |
---|
Invariant panel
Bases: wx._core.Object
This class stores some values resulting resulting from invariant calculations. Given the value of total invariant, this class can also determine the percentage of invariants resulting from extrapolation.
check the validity if invariant
Compute percentage of each invariant
Bases: wx._windows.Dialog
This panel describes proportion of invariants
Check scale receive in this panel.
Close the current window
Draw the chart
Change the color for low and high bar when necessary
Set value of txtcrtl
This module provide GUI for the neutron scattering length density calculator
Bases: wx._windows.Dialog
Invariant Dialog
Bases: wx.lib.scrolledpanel.ScrolledPanel, sas.guiframe.panel_base.PanelBase
Provides the Invariant GUI.
Clear panel to defaults, used by set_state of manager
compute invariant
open another panel for more details on invariant calculation
return the background textcrtl value as a float
Get the bookmark state given by number
: param num: the given bookmark number
return the contrast textcrtl value as a float
get extrapolation type
get high qstar
get low qstar
return the porod constant textcrtl value as a float
get qstar
return the scale textcrtl value as a float
Get the state given by number
: param state_num: the given state number
get surface value
get total qstar
get volume fraction
Save the panel state in memory and add the list on the popup menu on bookmark context menu event
Invoke report dialog panel
: param event: report button event
Go forward to the previous state
: param event: redo button event
Save invariant state into a file
Go back to the previous state
: param event: undo button event
set the panel at its initial state.
Set the data
return float value necessary to compute invariant a high q
return float value necessary to compute invariant a low q
set value for the manager
Display warning message if available
set state when loading it from a .inv/.svs file
Bases: wx._windows.Frame
Invariant Window
Bases: object
Class to hold the state information of the InversionControl panel.
deepcopy the state
Load invariant states from a file
: param file: .inv file : param node: node of a XML document to read from
Build image state that wx.html understand by plotting, putting it into wx.FileSystem image object
: extrap_high,extra_low: low/high extrapolations are possible extra-plots
Get the values (strings) from __str__ for report
Set the state list
: param name: name of the state component : param value: value of the state component
Writes the state of the InversionControl panel to file, as XML.
Compatible with standalone writing, or appending to an already existing XML document. In that case, the XML document is required. An optional entry node in the XML document may also be given.
: param file: file to write to : param doc: XML document object [optional] : param entry_node: XML node within the XML document at which we will append the data [optional]
Bases: sas.dataloader.readers.cansas_reader.Reader
Class to load a .inv invariant file
Load a new invariant state from file
: param path: file path : return: None
Write the content of a Data1D as a CanSAS XML file
: param filename: name of the file to write : param datainfo: Data1D object : param invstate: InvariantState object
Write toXML, a helper for write()
: return: xml doc
Bases: wx._windows.Dialog
Allow file selection at loading time
return the selected data
Bases: wx.lib.scrolledpanel.ScrolledPanel
Bases: wx._controls.TextCtrl
Text control for model and fit parameters. Binds the appropriate events for user interactions.
Bases: wx._controls.TextCtrl
Text control used to display outputs. No editing allowed. The background is grayed out. User can’t select text.
Dialog report panel to show and summarize the results of the invariant calculation.
Bases: wx._windows.Dialog
The report dialog box.
Create a PDF file from html source string.
: data: html string : filename: name of file to be saved
Close the Dialog
: event: Close button event
Preview
: event: Preview button event
: event: Print button event
Save