sas.qtgui.Perspectives.Inversion package¶
Subpackages¶
- sas.qtgui.Perspectives.Inversion.UI package
- Submodules
- sas.qtgui.Perspectives.Inversion.UI.DMaxExplorer module
Ui_DmaxExplorerUi_DmaxExplorer.__annotate_func__Ui_DmaxExplorer.__annotations_cache__Ui_DmaxExplorer.__dict__Ui_DmaxExplorer.__doc__Ui_DmaxExplorer.__firstlineno__Ui_DmaxExplorer.__module__Ui_DmaxExplorer.__static_attributes__Ui_DmaxExplorer.__weakref__Ui_DmaxExplorer.retranslateUi()Ui_DmaxExplorer.setupUi()
- sas.qtgui.Perspectives.Inversion.UI.TabbedInversionUI module
- Module contents
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.
- class sas.qtgui.Perspectives.Inversion.DMaxExplorerWidget.DmaxWindow(pr_state, nfunc, parent=None)¶
Bases:
QDialog,Ui_DmaxExplorer- __annotate_func__ = None¶
- __annotations_cache__ = {}¶
- __doc__ = None¶
- __firstlineno__ = 35¶
- __init__(pr_state, nfunc, parent=None)¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.DMaxExplorerWidget'¶
- __static_attributes__ = ('communicator', 'hasPlot', 'mapper', 'model', 'nfunc', 'parent', 'plot', 'pr_state')¶
- closeEvent(event)¶
Override close event
- modelChanged(item)¶
- name = 'Dmax Explorer'¶
- setupMapper()¶
- setupModel()¶
- setupSlots()¶
- setupValidators()¶
Add validators on relevant line edits
- staticMetaObject = PySide6.QtCore.QMetaObject("DmaxWindow" inherits "QDialog": )¶
sas.qtgui.Perspectives.Inversion.InversionLogic module¶
- class sas.qtgui.Perspectives.Inversion.InversionLogic.InversionLogic(data_item=None)¶
Bases:
objectAll the data-related logic. This class deals exclusively with Data1D/2D No QStandardModelIndex here.
- __annotate_func__()¶
- __annotations_cache__ = {'_data_item': PySide6.QtGui.QStandardItem | None}¶
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Inversion.InversionLogic', '__firstlineno__': 21, '__doc__': '\nAll the data-related logic. This class deals exclusively with Data1D/2D\nNo QStandardModelIndex here.\n', '__init__': <function InversionLogic.__init__>, 'data_item': <property object>, '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>, '__static_attributes__': ('_data_item', 'data_is_loaded', 'qmax', 'qmin'), '__dict__': <attribute '__dict__' of 'InversionLogic' objects>, '__weakref__': <attribute '__weakref__' of 'InversionLogic' objects>, '__annotations_cache__': {'_data_item': PySide6.QtGui.QStandardItem | None}, '__annotate_func__': None})¶
- __doc__ = '\nAll the data-related logic. This class deals exclusively with Data1D/2D\nNo QStandardModelIndex here.\n'¶
- __firstlineno__ = 21¶
- __init__(data_item=None)¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.InversionLogic'¶
- __static_attributes__ = ('_data_item', 'data_is_loaded', 'qmax', 'qmin')¶
- __weakref__¶
list of weak references to the object
- _data_item: QStandardItem | None¶
- add_errors(sigma=0.05)¶
Adds errors to data set is they are not available.
- computeDataRange()¶
Wrapper for calculating the data range based on local dataset
- computeRangeFromData(data)¶
Compute the minimum and the maximum range of the data return the npts contains in data
- property data_item: QStandardItem | None¶
- isLoadedData()¶
accessor
- new1DPlot(tab_id=1, out=None, pr=None, q=None)¶
Create a new 1D data instance based on fitting results
- newPRPlot(out, pr, cov=None)¶
sas.qtgui.Perspectives.Inversion.InversionPerspective module¶
- class sas.qtgui.Perspectives.Inversion.InversionPerspective.InversionWindow(parent=None, data=None)¶
Bases:
QTabWidget,PerspectiveThe main window for the P(r) Inversion perspective. This is the main window where the tabs for each of the widgets are shown
- __annotate_func__ = None¶
- __annotations_cache__ = {'tabs': 'list[InversionWidget]'}¶
- __doc__ = '\nThe main window for the P(r) Inversion perspective.\nThis is the main window where the tabs for each of the widgets are shown\n\n'¶
- __firstlineno__ = 21¶
- __init__(parent=None, data=None)¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.InversionPerspective'¶
- __static_attributes__ = ('_allowClose', '_data', '_dataList', 'batchResults', 'batchResultsWindow', 'communicate', 'dataDeleted', 'is_batch', 'logic', 'mapper', 'maxIndex', 'model', 'parent', 'tabs')¶
- addData(data=None, is_batch=False, tab_index=None)¶
Add a new tab for passed data
- allowBatch()¶
Tell the caller we accept batch mode
- allowSwap()¶
Tell the caller we accept swapping data
- closeBatchResults()¶
- closeDMax()¶
- closeEvent(event)¶
Overwrite QDialog close method to allow for custom widget close
- closeTabByIndex(index)¶
Close/delete a tab with the given index. No checks on validity of the index.
- closeTabByName(tab_name)¶
Given name of the tab - close it
- communicator()¶
- property currentTab: InversionWidget¶
Returns the tab widget currently shown
- currentTabDataId()¶
Returns the data ID of the current tab
- ext = 'pr'¶
- getSerializePage(index=None) tuple[dict, bool]¶
Serialize and return a dictionary of {tab_id: inversion-state} Return original dictionary if no data
- getTabName(is_batch=False)¶
Get the new tab name, based on the number of fitting tabs so far
- help()¶
Open the P(r) Inversion help browser
- isClosable()¶
Allow outsiders close this widget
- isSerializable()¶
Tell the caller that this perspective writes its state
- name = 'Inversion'¶
- removeData(data_list: list[QStandardItem])¶
Remove data from
- resetTab(index)¶
Adds a new tab and removes the last tab as a way of resetting the tabs
- serializeAll()¶
Serialize the inversion state so data can be saved serialize all active inversion pages and return a dictionary: {data-id: {self.name: {inversion-state}}}
- serializeCurrentPage()¶
- setClosable(value=True)¶
Allow outsiders close this widget
- setData(data_item=None, is_batch=False, tab_index=None)¶
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
- staticMetaObject = PySide6.QtCore.QMetaObject("InversionWindow" inherits "QTabWidget": )¶
- property supports_fitting¶
- property supports_reports¶
Does this perspective have a report functionality (currently used by menus and toolbar)
- swapData(data=None, tab_index=None)¶
Replace the data from the current tab
- tabCloses(index)¶
Update local bookkeeping on tab close
- property title¶
Window title
- updateFromParameters(params)¶
Update the perspective using a dictionary of parameters e.g. those loaded via open project or open analysis menu items
sas.qtgui.Perspectives.Inversion.InversionUtils module¶
sas.qtgui.Perspectives.Inversion.InversionWidget module¶
- class sas.qtgui.Perspectives.Inversion.InversionWidget.CalculatedOutputs(rg: float, iq0: float, background: float, calc_time: float, chi2: float, oscillations: float, pos_frac: float, pos_err: float)¶
Bases:
object- __annotate_func__()¶
- __annotations_cache__ = {'background': <class 'float'>, 'calc_time': <class 'float'>, 'chi2': <class 'float'>, 'iq0': <class 'float'>, 'oscillations': <class 'float'>, 'pos_err': <class 'float'>, 'pos_frac': <class 'float'>, 'rg': <class 'float'>}¶
- __dataclass_fields__ = {'background': Field(name='background',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'calc_time': Field(name='calc_time',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'chi2': Field(name='chi2',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'iq0': Field(name='iq0',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'oscillations': Field(name='oscillations',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'pos_err': Field(name='pos_err',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'pos_frac': Field(name='pos_frac',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'rg': Field(name='rg',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False)¶
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Inversion.InversionWidget', '__firstlineno__': 26, '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'CalculatedOutputs' objects>, '__weakref__': <attribute '__weakref__' of 'CalculatedOutputs' objects>, '__doc__': 'CalculatedOutputs(rg: float, iq0: float, background: float, calc_time: float, chi2: float, oscillations: float, pos_frac: float, pos_err: float)', '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False), '__annotations_cache__': {'rg': <class 'float'>, 'iq0': <class 'float'>, 'background': <class 'float'>, 'calc_time': <class 'float'>, 'chi2': <class 'float'>, 'oscillations': <class 'float'>, 'pos_frac': <class 'float'>, 'pos_err': <class 'float'>}, '__dataclass_fields__': {'rg': Field(name='rg',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'iq0': Field(name='iq0',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'background': Field(name='background',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'calc_time': Field(name='calc_time',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'chi2': Field(name='chi2',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'oscillations': Field(name='oscillations',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'pos_frac': Field(name='pos_frac',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'pos_err': Field(name='pos_err',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}, '__replace__': <function _replace>, '__hash__': None, '__init__': <function CalculatedOutputs.__init__>, '__repr__': <function CalculatedOutputs.__repr__>, '__eq__': <function CalculatedOutputs.__eq__>, '__match_args__': ('rg', 'iq0', 'background', 'calc_time', 'chi2', 'oscillations', 'pos_frac', 'pos_err'), '__annotate_func__': None})¶
- __doc__ = 'CalculatedOutputs(rg: float, iq0: float, background: float, calc_time: float, chi2: float, oscillations: float, pos_frac: float, pos_err: float)'¶
- __eq__(other)¶
Return self==value.
- __firstlineno__ = 26¶
- __hash__ = None¶
- __init__(rg: float, iq0: float, background: float, calc_time: float, chi2: float, oscillations: float, pos_frac: float, pos_err: float) None¶
- __match_args__ = ('rg', 'iq0', 'background', 'calc_time', 'chi2', 'oscillations', 'pos_frac', 'pos_err')¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.InversionWidget'¶
- __replace__(**changes)¶
- __repr__()¶
Return repr(self).
- __static_attributes__ = ()¶
- __weakref__¶
list of weak references to the object
- background: float¶
- calc_time: float¶
- chi2: float¶
- iq0: float¶
- oscillations: float¶
- pos_err: float¶
- pos_frac: float¶
- rg: float¶
- class sas.qtgui.Perspectives.Inversion.InversionWidget.EstimatedParameters(reg_constant: float, nterms: int)¶
Bases:
object- __annotate_func__()¶
- __annotations_cache__ = {'nterms': <class 'int'>, 'reg_constant': <class 'float'>}¶
- __dataclass_fields__ = {'nterms': Field(name='nterms',type=<class 'int'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'reg_constant': Field(name='reg_constant',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False)¶
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Inversion.InversionWidget', '__firstlineno__': 49, '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'EstimatedParameters' objects>, '__weakref__': <attribute '__weakref__' of 'EstimatedParameters' objects>, '__doc__': 'EstimatedParameters(reg_constant: float, nterms: int)', '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False), '__annotations_cache__': {'reg_constant': <class 'float'>, 'nterms': <class 'int'>}, '__dataclass_fields__': {'reg_constant': Field(name='reg_constant',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'nterms': Field(name='nterms',type=<class 'int'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}, '__replace__': <function _replace>, '__hash__': None, '__init__': <function EstimatedParameters.__init__>, '__repr__': <function EstimatedParameters.__repr__>, '__eq__': <function EstimatedParameters.__eq__>, '__match_args__': ('reg_constant', 'nterms'), '__annotate_func__': None})¶
- __doc__ = 'EstimatedParameters(reg_constant: float, nterms: int)'¶
- __eq__(other)¶
Return self==value.
- __firstlineno__ = 49¶
- __hash__ = None¶
- __init__(reg_constant: float, nterms: int) None¶
- __match_args__ = ('reg_constant', 'nterms')¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.InversionWidget'¶
- __replace__(**changes)¶
- __repr__()¶
Return repr(self).
- __static_attributes__ = ()¶
- __weakref__¶
list of weak references to the object
- nterms: int¶
- reg_constant: float¶
- class sas.qtgui.Perspectives.Inversion.InversionWidget.InversionResult(logic: sas.qtgui.Perspectives.Inversion.InversionLogic.InversionLogic, calculator: sas.sascalc.pr.invertor.Invertor, pr_plot: sas.qtgui.Plotting.PlotterData.Data1D | None, data_plot: sas.qtgui.Plotting.PlotterData.Data1D | None, outputs: sas.qtgui.Perspectives.Inversion.InversionWidget.CalculatedOutputs | None, estimated_parameters: sas.qtgui.Perspectives.Inversion.InversionWidget.EstimatedParameters | None)¶
Bases:
object- __annotate_func__()¶
- __annotations_cache__ = {'calculator': <class 'sas.sascalc.pr.invertor.Invertor'>, 'data_plot': sas.qtgui.Plotting.PlotterData.Data1D | None, 'estimated_parameters': sas.qtgui.Perspectives.Inversion.InversionWidget.EstimatedParameters | None, 'logic': <class 'sas.qtgui.Perspectives.Inversion.InversionLogic.InversionLogic'>, 'outputs': sas.qtgui.Perspectives.Inversion.InversionWidget.CalculatedOutputs | None, 'pr_plot': sas.qtgui.Plotting.PlotterData.Data1D | None}¶
- __dataclass_fields__ = {'calculator': Field(name='calculator',type=<class 'sas.sascalc.pr.invertor.Invertor'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'data_plot': Field(name='data_plot',type=sas.qtgui.Plotting.PlotterData.Data1D | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'estimated_parameters': Field(name='estimated_parameters',type=sas.qtgui.Perspectives.Inversion.InversionWidget.EstimatedParameters | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'logic': Field(name='logic',type=<class 'sas.qtgui.Perspectives.Inversion.InversionLogic.InversionLogic'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'outputs': Field(name='outputs',type=sas.qtgui.Perspectives.Inversion.InversionWidget.CalculatedOutputs | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'pr_plot': Field(name='pr_plot',type=sas.qtgui.Plotting.PlotterData.Data1D | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False)¶
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Inversion.InversionWidget', '__firstlineno__': 54, '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'InversionResult' objects>, '__weakref__': <attribute '__weakref__' of 'InversionResult' objects>, '__doc__': 'InversionResult(logic: sas.qtgui.Perspectives.Inversion.InversionLogic.InversionLogic, calculator: sas.sascalc.pr.invertor.Invertor, pr_plot: sas.qtgui.Plotting.PlotterData.Data1D | None, data_plot: sas.qtgui.Plotting.PlotterData.Data1D | None, outputs: sas.qtgui.Perspectives.Inversion.InversionWidget.CalculatedOutputs | None, estimated_parameters: sas.qtgui.Perspectives.Inversion.InversionWidget.EstimatedParameters | None)', '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False), '__annotations_cache__': {'logic': <class 'sas.qtgui.Perspectives.Inversion.InversionLogic.InversionLogic'>, 'calculator': <class 'sas.sascalc.pr.invertor.Invertor'>, 'pr_plot': sas.qtgui.Plotting.PlotterData.Data1D | None, 'data_plot': sas.qtgui.Plotting.PlotterData.Data1D | None, 'outputs': sas.qtgui.Perspectives.Inversion.InversionWidget.CalculatedOutputs | None, 'estimated_parameters': sas.qtgui.Perspectives.Inversion.InversionWidget.EstimatedParameters | None}, '__dataclass_fields__': {'logic': Field(name='logic',type=<class 'sas.qtgui.Perspectives.Inversion.InversionLogic.InversionLogic'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'calculator': Field(name='calculator',type=<class 'sas.sascalc.pr.invertor.Invertor'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'pr_plot': Field(name='pr_plot',type=sas.qtgui.Plotting.PlotterData.Data1D | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'data_plot': Field(name='data_plot',type=sas.qtgui.Plotting.PlotterData.Data1D | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'outputs': Field(name='outputs',type=sas.qtgui.Perspectives.Inversion.InversionWidget.CalculatedOutputs | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'estimated_parameters': Field(name='estimated_parameters',type=sas.qtgui.Perspectives.Inversion.InversionWidget.EstimatedParameters | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}, '__replace__': <function _replace>, '__hash__': None, '__init__': <function InversionResult.__init__>, '__repr__': <function InversionResult.__repr__>, '__eq__': <function InversionResult.__eq__>, '__match_args__': ('logic', 'calculator', 'pr_plot', 'data_plot', 'outputs', 'estimated_parameters'), '__annotate_func__': None})¶
- __doc__ = 'InversionResult(logic: sas.qtgui.Perspectives.Inversion.InversionLogic.InversionLogic, calculator: sas.sascalc.pr.invertor.Invertor, pr_plot: sas.qtgui.Plotting.PlotterData.Data1D | None, data_plot: sas.qtgui.Plotting.PlotterData.Data1D | None, outputs: sas.qtgui.Perspectives.Inversion.InversionWidget.CalculatedOutputs | None, estimated_parameters: sas.qtgui.Perspectives.Inversion.InversionWidget.EstimatedParameters | None)'¶
- __eq__(other)¶
Return self==value.
- __firstlineno__ = 54¶
- __hash__ = None¶
- __init__(logic: InversionLogic, calculator: Invertor, pr_plot: Data1D | None, data_plot: Data1D | None, outputs: CalculatedOutputs | None, estimated_parameters: EstimatedParameters | None) None¶
- __match_args__ = ('logic', 'calculator', 'pr_plot', 'data_plot', 'outputs', 'estimated_parameters')¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.InversionWidget'¶
- __replace__(**changes)¶
- __repr__()¶
Return repr(self).
- __static_attributes__ = ()¶
- __weakref__¶
list of weak references to the object
- estimated_parameters: EstimatedParameters | None¶
- logic: InversionLogic¶
- outputs: CalculatedOutputs | None¶
- class sas.qtgui.Perspectives.Inversion.InversionWidget.InversionWidget(window, parent=None, data=None, tab_id=1, tab_name='')¶
Bases:
QWidget,Ui_PrInversion- __annotate_func__ = None¶
- __annotations_cache__ = {'batchResultsWindow': 'BatchInversionOutputPanel | None', 'batch_dict': 'dict[str, Any] | None', 'communicator': 'Communicate', 'dmaxWindow': 'DmaxWindow | None', 'isCalculating': 'bool', 'results': 'list[InversionResult]'}¶
- __doc__ = None¶
- __firstlineno__ = 82¶
- __init__(window, parent=None, data=None, tab_id=1, tab_name='')¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.InversionWidget'¶
- __static_attributes__ = ('batchResultsWindow', 'batch_dict', 'calcThread', 'communicator', 'currentData', 'dmaxWindow', 'input_boxes', 'isCalculating', 'parent', 'results', 'tab_id', 'tab_name', 'window')¶
- acceptsData() bool¶
- applyNumTermsEstimate()¶
- applyRegConstantEstimate()¶
- batchCalculationComplete(totalElapsed)¶
- batchCalculationOutput¶
- calculationComplete¶
- calculationCompleted(out, cov, pr, elapsed)¶
- changeBackgroundMode¶
- clearGuiValues()¶
- property currentDataIndex: int¶
- property currentDataItem: QStandardItem | None¶
- property currentResult: InversionResult¶
- enableButtons()¶
Enable buttons when data is present, else disable them
- endEstimateParameters(nterms, alpha, message, elapsed)¶
- estimateAvailable()¶
- estimationComplete¶
- events()¶
- handleBackgroundModeChange()¶
- handleCurrentDataChanged()¶
- handleRemove()¶
- handleShowResults()¶
- initResult() InversionResult¶
- property is_batch: bool¶
- makePlots(out, cov, pr, elapsed, result=None)¶
- onHelp()¶
- onNewData()¶
- openExplorerWindow()¶
- property q_max: float¶
- property q_min: float¶
- serialiseResult(result: InversionResult) dict[str, Any]¶
- setupValidators()¶
Apply validators to editable line edits
- showBatchCalculationWindow(batch_dict)¶
- showCurrentPlots()¶
- showPlots(result: InversionResult)¶
- startEstimateParameters()¶
- startThread()¶
- startThreadAll()¶
- staticMetaObject = PySide6.QtCore.QMetaObject("InversionWidget" inherits "QWidget": Methods: #33 type=Signal, signature=calculationComplete() #34 type=Signal, signature=batchCalculationOutput(PyObject), parameters=PyObject #35 type=Signal, signature=estimationComplete() #36 type=Signal, signature=changeBackgroundMode() )¶
- threadError(error: str)¶
- updateGuiSuggested(nterms, alpha)¶
- updateGuiValues()¶
- updateMaxQ(new_q_max: float)¶
- updateMinQ(new_q_min: float)¶
- updateParams()¶
- updateTab(data: HashableStandardItem | list[HashableStandardItem], tab_id: int)¶
- sas.qtgui.Perspectives.Inversion.InversionWidget.format_float(f: float)¶
- sas.qtgui.Perspectives.Inversion.InversionWidget.format_float_scientific(f: float)¶
Formats a float in scientific notation with 3 significant figures.
sas.qtgui.Perspectives.Inversion.Thread module¶
- class sas.qtgui.Perspectives.Inversion.Thread.CalcBatchPr(prs: list[Invertor], nfuncs=None, tab_id=None, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)¶
Bases:
CalcThread- __annotate_func__ = None¶
- __annotations_cache__ = {}¶
- __doc__ = None¶
- __firstlineno__ = 40¶
- __init__(prs: list[Invertor], nfuncs=None, tab_id=None, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.Thread'¶
- __static_attributes__ = ('error_func', 'nfuncs', 'prs', 'starttime')¶
- compute()¶
Perform a work unit. The subclass will provide details of the arguments.
- class sas.qtgui.Perspectives.Inversion.Thread.CalcPr(pr, nfunc=5, tab_id=None, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)¶
Bases:
CalcThreadCompute P(r)
- __annotate_func__ = None¶
- __annotations_cache__ = {}¶
- __doc__ = '\nCompute P(r)\n'¶
- __firstlineno__ = 8¶
- __init__(pr, nfunc=5, tab_id=None, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.Thread'¶
- __static_attributes__ = ('error_func', 'nfunc', 'pr', 'starttime', 'tab_id')¶
- compute()¶
Perform P(r) inversion
- class sas.qtgui.Perspectives.Inversion.Thread.EstimateNT(pr, nfunc=5, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)¶
Bases:
CalcThread- __annotate_func__ = None¶
- __annotations_cache__ = {}¶
- __doc__ = '\n '¶
- __firstlineno__ = 97¶
- __init__(pr, nfunc=5, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.Thread'¶
- __static_attributes__ = ('_sleep_delay', '_time_for_sleep', 'error_func', 'nfunc', 'pr', 'starttime')¶
- compute()¶
Calculates the estimate
- isquit()¶
- class sas.qtgui.Perspectives.Inversion.Thread.EstimatePr(pr, nfunc=5, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)¶
Bases:
CalcThreadEstimate P(r)
- __annotate_func__ = None¶
- __annotations_cache__ = {}¶
- __doc__ = '\nEstimate P(r)\n'¶
- __firstlineno__ = 68¶
- __init__(pr, nfunc=5, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.Thread'¶
- __static_attributes__ = ('error_func', 'nfunc', 'pr', 'starttime')¶
- compute()¶
Calculates the estimate