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.
- class sas.qtgui.Perspectives.Inversion.DMaxExplorerWidget.DmaxWindow(pr_state, nfunc, parent=None)¶
Bases:
QDialog,Ui_DmaxExplorer- __doc__ = None¶
- __init__(self, /, parent: PySide6.QtWidgets.QWidget | None = None, f: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags), *, sizeGripEnabled: bool | None = None, modal: bool | None = None) None¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.Inversion.DMaxExplorerWidget'¶
- 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.
- __annotations__ = {'_data_item': PySide6.QtGui.QStandardItem | None}¶
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Inversion.InversionLogic', '__annotations__': {'_data_item': PySide6.QtGui.QStandardItem | None}, '__doc__': '\n All the data-related logic. This class deals exclusively with Data1D/2D\n No 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>, '__dict__': <attribute '__dict__' of 'InversionLogic' objects>, '__weakref__': <attribute '__weakref__' of 'InversionLogic' objects>})¶
- __doc__ = '\n All the data-related logic. This class deals exclusively with Data1D/2D\n No QStandardModelIndex here.\n '¶
- __init__(data_item=None)¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.InversionLogic'¶
- __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
- __doc__ = '\n The main window for the P(r) Inversion perspective.\n This is the main window where the tabs for each of the widgets are shown\n\n '¶
- __init__(self, /, parent: PySide6.QtWidgets.QWidget | None = None, *, tabPosition: PySide6.QtWidgets.QTabWidget.TabPosition | None = None, tabShape: PySide6.QtWidgets.QTabWidget.TabShape | None = None, currentIndex: int | None = None, count: int | None = None, iconSize: PySide6.QtCore.QSize | None = None, elideMode: PySide6.QtCore.Qt.TextElideMode | None = None, usesScrollButtons: bool | None = None, documentMode: bool | None = None, tabsClosable: bool | None = None, movable: bool | None = None, tabBarAutoHide: bool | None = None) None¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.Inversion.InversionPerspective'¶
- 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- __annotations__ = {'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,_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,_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,_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,_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,_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,_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,_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,_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)¶
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Inversion.InversionWidget', '__annotations__': {'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'>}, '__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), '__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,_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,_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,_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,_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,_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,_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,_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,_field_type=_FIELD)}, '__init__': <function CalculatedOutputs.__init__>, '__repr__': <function CalculatedOutputs.__repr__>, '__eq__': <function CalculatedOutputs.__eq__>, '__hash__': None, '__match_args__': ('rg', 'iq0', 'background', 'calc_time', 'chi2', 'oscillations', 'pos_frac', 'pos_err')})¶
- __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.
- __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'¶
- __repr__()¶
Return repr(self).
- __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- __annotations__ = {'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,_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,_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)¶
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Inversion.InversionWidget', '__annotations__': {'reg_constant': <class 'float'>, 'nterms': <class 'int'>}, '__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), '__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,_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,_field_type=_FIELD)}, '__init__': <function EstimatedParameters.__init__>, '__repr__': <function EstimatedParameters.__repr__>, '__eq__': <function EstimatedParameters.__eq__>, '__hash__': None, '__match_args__': ('reg_constant', 'nterms')})¶
- __doc__ = 'EstimatedParameters(reg_constant: float, nterms: int)'¶
- __eq__(other)¶
Return self==value.
- __hash__ = None¶
- __init__(reg_constant: float, nterms: int) None¶
- __match_args__ = ('reg_constant', 'nterms')¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.InversionWidget'¶
- __repr__()¶
Return repr(self).
- __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- __annotations__ = {'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,_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,_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,_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,_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,_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,_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)¶
- __dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.Inversion.InversionWidget', '__annotations__': {'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}, '__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), '__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,_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,_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,_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,_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,_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,_field_type=_FIELD)}, '__init__': <function InversionResult.__init__>, '__repr__': <function InversionResult.__repr__>, '__eq__': <function InversionResult.__eq__>, '__hash__': None, '__match_args__': ('logic', 'calculator', 'pr_plot', 'data_plot', 'outputs', 'estimated_parameters')})¶
- __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.
- __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'¶
- __repr__()¶
Return repr(self).
- __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- __doc__ = None¶
- __init__(self, /, parent: PySide6.QtWidgets.QWidget | None = None, f: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags), *, modal: bool | None = None, windowModality: PySide6.QtCore.Qt.WindowModality | None = None, enabled: bool | None = None, geometry: PySide6.QtCore.QRect | None = None, frameGeometry: PySide6.QtCore.QRect | None = None, normalGeometry: PySide6.QtCore.QRect | None = None, x: int | None = None, y: int | None = None, pos: PySide6.QtCore.QPoint | None = None, frameSize: PySide6.QtCore.QSize | None = None, size: PySide6.QtCore.QSize | None = None, width: int | None = None, height: int | None = None, rect: PySide6.QtCore.QRect | None = None, childrenRect: PySide6.QtCore.QRect | None = None, childrenRegion: PySide6.QtGui.QRegion | None = None, sizePolicy: PySide6.QtWidgets.QSizePolicy | None = None, minimumSize: PySide6.QtCore.QSize | None = None, maximumSize: PySide6.QtCore.QSize | None = None, minimumWidth: int | None = None, minimumHeight: int | None = None, maximumWidth: int | None = None, maximumHeight: int | None = None, sizeIncrement: PySide6.QtCore.QSize | None = None, baseSize: PySide6.QtCore.QSize | None = None, palette: PySide6.QtGui.QPalette | None = None, font: PySide6.QtGui.QFont | None = None, cursor: PySide6.QtGui.QCursor | None = None, mouseTracking: bool | None = None, tabletTracking: bool | None = None, isActiveWindow: bool | None = None, focusPolicy: PySide6.QtCore.Qt.FocusPolicy | None = None, focus: bool | None = None, contextMenuPolicy: PySide6.QtCore.Qt.ContextMenuPolicy | None = None, updatesEnabled: bool | None = None, visible: bool | None = None, minimized: bool | None = None, maximized: bool | None = None, fullScreen: bool | None = None, sizeHint: PySide6.QtCore.QSize | None = None, minimumSizeHint: PySide6.QtCore.QSize | None = None, acceptDrops: bool | None = None, windowTitle: str | None = None, windowIcon: PySide6.QtGui.QIcon | None = None, windowIconText: str | None = None, windowOpacity: float | None = None, windowModified: bool | None = None, toolTip: str | None = None, toolTipDuration: int | None = None, statusTip: str | None = None, whatsThis: str | None = None, accessibleName: str | None = None, accessibleDescription: str | None = None, accessibleIdentifier: str | None = None, layoutDirection: PySide6.QtCore.Qt.LayoutDirection | None = None, autoFillBackground: bool | None = None, styleSheet: str | None = None, locale: PySide6.QtCore.QLocale | None = None, windowFilePath: str | None = None, inputMethodHints: PySide6.QtCore.Qt.InputMethodHint | None = None) None¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.Inversion.InversionWidget'¶
- 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()¶
- getPage() dict[str, Any]¶
- 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)¶
- updateFromParameters(params: dict[str, Any])¶
- 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- __annotations__ = {}¶
- __doc__ = None¶
- __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'¶
- 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)
- __annotations__ = {}¶
- __doc__ = '\n Compute P(r)\n '¶
- __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'¶
- 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- __annotations__ = {}¶
- __doc__ = '\n '¶
- __init__(pr, nfunc=5, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.Thread'¶
- 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)
- __annotations__ = {}¶
- __doc__ = '\n Estimate P(r)\n '¶
- __init__(pr, nfunc=5, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)¶
- __module__ = 'sas.qtgui.Perspectives.Inversion.Thread'¶
- compute()¶
Calculates the estimate