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

__annotations__ = {}
__doc__ = 'close, reset and help options'
__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.Calculators.Shape2SAS.ButtonOptions'
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

__annotations__ = {}
__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.Calculators.Shape2SAS.Constraints'
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

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

Bases: QDialog, Ui_Shape2SAS, Perspective

Main window for the Shape2SAS fitting tool

__annotations__ = {}
__doc__ = 'Main window for the Shape2SAS fitting tool'
__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.Calculators.Shape2SAS.DesignWindow'
addToVariableTable()

Set up parameters to the variable table

checkStateOfConstraints(fitPar: list[str], modelPars: list[list[str]], modelVals: list[list[float]], checkedPars: list[list[bool]]) tuple[str, str, str]

Check if the user has written constraints. Otherwise return Default

checkedVariables()

Get checked variables from the variable table with inserted restricted rows

deleteFromVariableTable()

Delete parameters from the variable table

enableButtons(toggle: bool)
ext = 'data_file'
getAllTableNames(condition: MethodType, **kwargs) list[list[str]]

Get all parameter names in the subunit table

getConstraintsToTextEditor()

Set translation and parameters constraints to the text editor

getFitParameters() list[str]

return names of the chosen fit parameters

getModelData(condition: MethodType, **kwargs) list[list[float | str]]

Get all data in the subunit table

getModelProfile(condition: MethodType, **kwargs) ModelProfile

Get model profile

getPluginModel()

Generating a plugin model and sends it to the Plugin Models folder in SasView

getSimulatedSAXSData()

Generating simulated data and sends it to the Data Explorer in SasView

getStandardReadOfTableData() list[list[float | str]]

Get a standard data read from subunit TableView

getStructureFactorValues()

Read structure factor options from chosen structure factor in Virtual SAXS experiment tab

getSubunitTableCell(row: int, column: int) float | str

Get model data from a single cell.

getSubunitTableRow(condition: MethodType, row: int, **kwargs) list[float | str]

Get model data from a single row

getSubunitTableSets(condition: MethodType, rows: list[int], **kwargs) list[list[float | str]]

Get a set of rows per column in subunit table

getTableName(column: int, row: int) str

Get the parameter name of a cell in the subunit table

getTableNames(condition: MethodType, column: int, **kwargs) list[str]

Get the parameter names of a column in the subunit table

getViewFeatures() ViewerPlotDesign

Get values affecting the illustrative aspect of Viewer

static ifEmptyName(name: str, names: list[str], **kwargs)

condition method. Append if not empty

static ifEmptyValue(value: float | str, values: list[float | str], *args, **kwargs)

condition method. Append if not empty

static ifFitPar(value: float | str, values: list[float | str], *args, **kwargs)

condition method. Append FitPar if condition. Otherwise append constant

static ifNoCondition(name: str, names: list[str], **kwargs)

condition method. Append

name = 'Shape2SAS'
onCheckingInput(input: str, default: str) str

Check if the input not None. Otherwise, return default value

onClickingClose()

Close Shape2SAS GUI

onClickingPlot()

Get 3D plot of the designed model in the Build model tab. If checked, plot theoretical scattering from the designed model.

onConstraintReset()

Reset Constraint window to default

onHelp()

Opening the help window

onSAXSExperimentReset()

Reset Virtual SAXS Experiment tab to default

onSubunitTableReset()

Reset subunit table to default

plotSimulatedSAXSData()

Plotting simulated SAXS data in the Virtual SAXS Experiment tab

sendSimulatedSAXSToDataExplorer()

Send simulated data to the Data Explorer in SasView

setConstraintsToTextEditor()

Set constraints to the text editor

showConstraintWindow()

Get the Constraint window

showSimulatedSAXSData()

Plotting simulated SAXS data in the Virtual SAXS Experiment tab

showStructureFactorOptions()

Show options for structure factor

staticMetaObject = PySide6.QtCore.QMetaObject("DesignWindow" inherits "QDialog": )
property title: str

Window title

updateDeleteButton()

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

__annotations__ = {}
__doc__ = 'XY, XZ, YZ view axis buttons'
__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.Calculators.Shape2SAS.ViewerAllOptions'
staticMetaObject = PySide6.QtCore.QMetaObject("ViewerButtons" inherits "QWidget": )
class sas.qtgui.Calculators.Shape2SAS.ViewerAllOptions.ViewerModelRadius(parent=None)

Bases: QWidget, Ui_ViewerModelRadius

Model radius view

__annotations__ = {}
__doc__ = 'Model radius view'
__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.Calculators.Shape2SAS.ViewerAllOptions'
staticMetaObject = PySide6.QtCore.QMetaObject("ViewerModelRadius" inherits "QWidget": )

sas.qtgui.Calculators.Shape2SAS.ViewerModel module

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

Bases: QWidget

Graphics view of designed model

__annotations__ = {}
__doc__ = 'Graphics view of designed model'
__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.Calculators.Shape2SAS.ViewerModel'
initialiseAxis()

Initialise axis for the model

onXYClicked()

XY view

onYZClicked()

YZ view

onZXClicked()

ZX view

onZoomChanged()

Change zoom value on doubleSpinBox

scatter

NOTE: Orignal intend was to create QScatter3DSeries() in setPlot() method. However, this causes some initialisation problems. Initialising setPlot() method might fix this, but then a fictive model would be needed. TODO: Investigate a better solution.

setAxis(x_range: (<class 'float'>, <class 'float'>), y_range: (<class 'float'>, <class 'float'>), z_range: (<class 'float'>, <class 'float'>))

Set axis for the model

setClearModelPlot()

Clear the model plot

setClearScatteringPlot()

Clear the Scattering plot

setPlot(distr: ModelPointDistribution, design: ViewerPlotDesign)

Plot the model

setScatteringPlot(theo: TheoreticalScattering)

Set the scattering plot

setZoom()

Zoom in/out

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

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