sas.qtgui.Calculators.Shape2SAS package

Subpackages

Submodules

sas.qtgui.Calculators.Shape2SAS.ButtonOptions module

class sas.qtgui.Calculators.Shape2SAS.ButtonOptions.ButtonOptions(parent=None)

Bases: QWidget, Ui_ButtonOptions

close, reset and help options

__annotate_func__ = None
__annotations_cache__ = {}
__doc__ = 'close, reset and help options'
__firstlineno__ = 8
__init__(parent=None)
__module__ = 'sas.qtgui.Calculators.Shape2SAS.ButtonOptions'
__static_attributes__ = ()
staticMetaObject = PySide6.QtCore.QMetaObject("ButtonOptions" inherits "QWidget": )

sas.qtgui.Calculators.Shape2SAS.Constraints module

class sas.qtgui.Calculators.Shape2SAS.Constraints.Constraints(parent=None)

Bases: QWidget, Ui_Constraints

__annotate_func__ = None
__annotations_cache__ = {}
__doc__ = None
__firstlineno__ = 25
__init__(parent=None)
__module__ = 'sas.qtgui.Calculators.Shape2SAS.Constraints'
__static_attributes__ = ('buttonOptions', 'constraintText', 'constraintTextEditor', 'createPlugin', 'variableTable')
checkPythonSyntax(text: str)

Check if text is valid python syntax

clearConstraints()

Clear text editor containing constraints

extractValues(elt: AST) str | int | float
getConstraintText(constraints: str) str

Get default text for constraints

getConstraints(constraintsStr: str, fitPar: [<class 'str'>], modelPars: [<class 'str'>], modelVals: [[<class 'float'>]], checkedPars: [<class 'str'>]) -> ([<class 'str'>], <class 'str'>, <class 'str'>, [[<class 'bool'>]])

Read inputs from text editor

getImportStatements(text: str) [<class 'str'>]

return all import statements that were written in the text editor

getParameters(constraintsStr: str, fitPar: [<class 'str'>]) str

Get parameters from constraints

getParametersFromConstraints(constraints_str: str, targetName: str) []

Extract parameters from constraints string

static getPosition(item: str | int | float, itemLists: [[str | int | float]]) -> (<class 'int'>, <class 'int'>)

Find position of an item in lists

getTranslation(constraintsStr: str, importStatement: [<class 'str'>], modelPars: [[<class 'str'>]], modelVals: [[<class 'float'>]], checkedPars: [[<class 'str'>]]) -> (<class 'str'>, [[<class 'bool'>]])

Get translation from constraints

ifParameterExists(lineNames: [<class 'str'>], modelPars: [[<class 'str'>]]) bool

Check if parameter exists in model parameters

isImportFromStatement(node: ImportFrom) [<class 'str'>]

Return list of ImportFrom statements

isImportStatement(node: Import) [<class 'str'>]

Return list of Import statements

onClosingConstraints()

Close constraints page

static removeFromList(listItems: [str | int | float], listToCompare: [str | int | float])

Remove items from a list if in another list

setConstraints(constraints: str)

Set text to QTextEdit

staticMetaObject = PySide6.QtCore.QMetaObject("Constraints" inherits "QWidget": )

sas.qtgui.Calculators.Shape2SAS.DesignWindow module

sas.qtgui.Calculators.Shape2SAS.ViewerAllOptions module

class sas.qtgui.Calculators.Shape2SAS.ViewerAllOptions.ViewerButtons(parent=None)

Bases: QWidget, Ui_ViewerButtons

XY, XZ, YZ view axis buttons

__annotate_func__ = None
__annotations_cache__ = {}
__doc__ = 'XY, XZ, YZ view axis buttons'
__firstlineno__ = 9
__init__(parent=None)
__module__ = 'sas.qtgui.Calculators.Shape2SAS.ViewerAllOptions'
__static_attributes__ = ()
staticMetaObject = PySide6.QtCore.QMetaObject("ViewerButtons" inherits "QWidget": )
class sas.qtgui.Calculators.Shape2SAS.ViewerAllOptions.ViewerModelRadius(parent=None)

Bases: QWidget, Ui_ViewerModelRadius

Model radius view

__annotate_func__ = None
__annotations_cache__ = {}
__doc__ = 'Model radius view'
__firstlineno__ = 17
__init__(parent=None)
__module__ = 'sas.qtgui.Calculators.Shape2SAS.ViewerAllOptions'
__static_attributes__ = ()
staticMetaObject = PySide6.QtCore.QMetaObject("ViewerModelRadius" inherits "QWidget": )

sas.qtgui.Calculators.Shape2SAS.ViewerModel module

sas.qtgui.Calculators.Shape2SAS.genPlugin module

sas.qtgui.Calculators.Shape2SAS.genPlugin.generateModel(prof: ~sas.sascalc.shape2sas.Shape2SAS.ModelProfile, constrainParameters: str, fitPar: [<class 'str'>], Npoints: int, pr_points: int, model_name: str) str

Generates a theoretical model

sas.qtgui.Calculators.Shape2SAS.genPlugin.generatePlugin(prof: ~sas.sascalc.shape2sas.Shape2SAS.ModelProfile, constrainParameters: str, fitPar: [<class 'str'>], Npoints: int, pr_points: int, file_name: str) -> (<class 'str'>, <class 'pathlib.Path'>)

Generates a theoretical scattering plugin model

sas.qtgui.Calculators.Shape2SAS.genPlugin.parListFormat(par: [[str | float]]) str

Format a list of parameters to the model string. In this case the list is on element for each shape. For a single shape there will be only a single value. Mainly for delta Rho.

sas.qtgui.Calculators.Shape2SAS.genPlugin.parListsFormat(par: [str | float]) str

Format a list of list containing parameters to the model string. This is used for single shape parameter lists like the center of mass of the object which will be an element of the list of such COM for each shape in a multishape model.

Module contents