sas.qtgui.Perspectives.Inversion package¶
Subpackages¶
Submodules¶
sas.qtgui.Perspectives.Inversion.DMaxExplorerWidget module¶
Dialog panel to explore the P(r) inversion results for a range of D_max value. User picks a number of points and a range of distances, then can toggle between inversion outputs and see their distribution as a function of D_max.
sas.qtgui.Perspectives.Inversion.InversionLogic module¶
- class sas.qtgui.Perspectives.Inversion.InversionLogic.InversionLogic(data=None)[source]¶
Bases:
object
All the data-related logic. This class deals exclusively with Data1D/2D No QStandardModelIndex here.
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Inversion.InversionLogic', '__doc__': '\n All the data-related logic. This class deals exclusively with Data1D/2D\n No QStandardModelIndex here.\n ', '__init__': <function InversionLogic.__init__>, 'data': <property object>, 'isLoadedData': <function InversionLogic.isLoadedData>, 'new1DPlot': <function InversionLogic.new1DPlot>, 'newPRPlot': <function InversionLogic.newPRPlot>, 'add_errors': <function InversionLogic.add_errors>, 'computeDataRange': <function InversionLogic.computeDataRange>, 'computeRangeFromData': <function InversionLogic.computeRangeFromData>, '__dict__': <attribute '__dict__' of 'InversionLogic' objects>, '__weakref__': <attribute '__weakref__' of 'InversionLogic' objects>, '__annotations__': {}})¶
- __doc__ = '\n All the data-related logic. This class deals exclusively with Data1D/2D\n No QStandardModelIndex here.\n '¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.InversionLogic'¶
- __weakref__¶
list of weak references to the object (if defined)
- add_errors(sigma=0.05)[source]¶
Adds errors to data set is they are not available. Uses \(\Delta y = \sigma | y |\).
- computeRangeFromData(data)[source]¶
Compute the minimum and the maximum range of the data return the npts contains in data
- property data¶
sas.qtgui.Perspectives.Inversion.InversionPerspective module¶
- class sas.qtgui.Perspectives.Inversion.InversionPerspective.InversionWindow(parent=None, data=None)[source]¶
Bases:
QDialog
,Ui_PrInversion
The main window for the P(r) Inversion perspective.
- __doc__ = '\n The main window for the P(r) Inversion perspective.\n '¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.InversionPerspective'¶
- _calculateCompleted(out, cov, pr, elapsed)[source]¶
Send a signal to the main thread for model update
- _calculateUpdate(output_tuple)[source]¶
Method called with the results when the inversion is done
- Parameters:
out – output coefficient for the base functions
cov – covariance matrix
pr – Invertor instance
elapsed – time spent computing
- _estimateCompleted(alpha, message, elapsed)[source]¶
Send a signal to the main thread for model update
- _estimateDynamicCompleted(alpha, message, elapsed)[source]¶
Send a signal to the main thread for model update
- _estimateDynamicNTCompleted(nterms, alpha, message, elapsed)[source]¶
Send a signal to the main thread for model update
- _estimateDynamicNTUpdate(output_tuple)[source]¶
Parameter estimation completed, display the results to the user
- Parameters:
alpha – estimated best alpha
nterms – estimated number of terms
elapsed – computation time
- _estimateDynamicUpdate(output_tuple)[source]¶
Parameter estimation completed, display the results to the user
- Parameters:
alpha – estimated best alpha
elapsed – computation time
- _estimateNTCompleted(nterms, alpha, message, elapsed)[source]¶
Send a signal to the main thread for model update
- _estimateNTUpdate(output_tuple)[source]¶
Parameter estimation completed, display the results to the user
- Parameters:
alpha – estimated best alpha
nterms – estimated number of terms
elapsed – computation time
- _estimateUpdate(output_tuple)[source]¶
Parameter estimation completed, display the results to the user
- Parameters:
alpha – estimated best alpha
elapsed – computation time
- calculateSignal¶
- estimateDynamicNTSignal¶
- estimateDynamicSignal¶
- estimateNTSignal¶
- estimateSignal¶
- ext = 'pr'¶
- getState()[source]¶
Collects all active params into a dictionary of {name: value} :return: {name: value}
- name = 'Inversion'¶
- openExplorerWindow()[source]¶
Open the Explorer window to see correlations between params and results
- populateDataComboBox(name, data_ref)[source]¶
Append a new name to the data combobox :param name: data name :param data_ref: QStandardItem reference for data set to be added
- serializeAll()[source]¶
Serialize the inversion state so data can be saved Inversion is not batch-ready so this will only effect a single page :return: {data-id: {self.name: {inversion-state}}}
- setData(data_item=None, is_batch=False)[source]¶
Assign new data set(s) to the P(r) perspective Obtain a QStandardItem object and parse it to get Data1D/2D Pass it over to the calculator
sas.qtgui.Perspectives.Inversion.InversionUtils module¶
sas.qtgui.Perspectives.Inversion.Thread module¶
- class sas.qtgui.Perspectives.Inversion.Thread.CalcPr(pr, nfunc=5, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)[source]¶
Bases:
CalcThread
Compute P(r)
- __doc__ = '\n Compute P(r)\n '¶
- __init__(pr, nfunc=5, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)[source]¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.Thread'¶
- class sas.qtgui.Perspectives.Inversion.Thread.EstimateNT(pr, nfunc=5, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)[source]¶
Bases:
CalcThread
- __doc__ = '\n '¶
- __init__(pr, nfunc=5, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)[source]¶
Prepare the calculator
- __module__ = 'sas.qtgui.Perspectives.Inversion.Thread'¶
- class sas.qtgui.Perspectives.Inversion.Thread.EstimatePr(pr, nfunc=5, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)[source]¶
Bases:
CalcThread
Estimate P(r)
- __doc__ = '\n Estimate P(r)\n '¶
- __init__(pr, nfunc=5, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)[source]¶
Prepare the calculator
- __module__ = 'sas.qtgui.Perspectives.Inversion.Thread'¶