sas.qtgui.Perspectives.Invariant package

Submodules

sas.qtgui.Perspectives.Invariant.InvariantDetails module

class sas.qtgui.Perspectives.Invariant.InvariantDetails.DetailsDialog(parent)[source]

Bases: PyQt5.QtWidgets.QDialog, sas.qtgui.Perspectives.Invariant.UI.InvariantDetailsUI.Ui_Dialog

This class stores some values resulting from invariant calculations. Given the value of total invariant, this class can also determine the percentage of invariants resulting from extrapolation.

checkValues()[source]

Create a warning message to be displayed in panel if problems with values

setModel(model)[source]
showDialog()[source]

Fill the dialog with values of calculated Q, progress bars

sas.qtgui.Perspectives.Invariant.InvariantPerspective module

class sas.qtgui.Perspectives.Invariant.InvariantPerspective.InvariantWindow(parent=None)[source]

Bases: PyQt5.QtWidgets.QDialog, sas.qtgui.Perspectives.Invariant.UI.TabbedInvariantUI.Ui_tabbedInvariantUI

allowBatch()[source]

Tell the caller that we don’t accept multiple data instances

allowSwap()[source]

Tell the caller that we can’t swap data

allow_calculation()[source]
calculateInvariant()[source]

Use twisted to thread the calculations away

calculateThread(extrapolation)[source]

Perform Invariant calculations.

calculationFailed(reason)[source]
checkLength()[source]

Validators of number of points for extrapolation. Error if it is larger than the distribution length

checkQExtrapolatedData()[source]

Match status of low or high-Q extrapolated data checkbox in DataExplorer with low or high-Q extrapolation checkbox in invariant panel

checkQMaxRange()[source]
checkQMinRange()[source]
checkQRange()[source]

Validate the Q range for the upper and lower bounds

Valid: q_low_max < q_high_min, q_low_min < q_low_max, q_high_min > q_low_max, q_high_max > q_high_min

closeEvent(event)[source]

Overwrite QDialog close method to allow for custom widget close

deferredPlot(model)[source]

Run the GUI/model update in the main thread

enabling()[source]
ext = 'inv'
getPage()[source]

Serializes full state of this invariant page Called by Save Analysis :return: {invariant-state}

getState()[source]

Collects all active params into a dictionary of {name: value} :return: {name: value}

get_high_q_extrapolation_lower_limit()[source]
get_low_q_extrapolation_upper_limit()[source]
hiFitAndFixToggle(toggle)[source]

Enable editing of power exponent if Fix for high Q is checked Disable otherwise

highQToggle(clicked)[source]

Disable/enable High Q extrapolation

isSerializable()[source]

Tell the caller that this perspective writes its state

lowFitAndFixToggle(toggle)[source]

Fit and Fix radiobuttons cannot be selected at the same time

lowGuinierAndPowerToggle(toggle)[source]

Guinier and Power radio buttons cannot be selected at the same time If Power is selected, Fit and Fix radio buttons are visible and Power line edit can be edited if Fix is selected

lowQToggle(clicked)[source]

Disable / enable Low Q extrapolation

modelChanged(item)[source]

Update when model changed

name = 'Invariant'
onHelp()[source]

Display help when clicking on Help button

onStatus()[source]

Display Invariant Details panel when clicking on Status button

plotResult(model)[source]

Plot result of calculation

removeData(data_list=None)[source]

Remove the existing data reference from the Invariant Persepective

serializeAll()[source]

Serialize the invariant state so data can be saved Invariant is not batch-ready so this will only effect a single page :return: {data-id: {self.name: {invariant-state}}}

serializeCurrentPage()[source]

Serialize and return a dictionary of {data_id: invariant-state} Return empty dictionary if no data :return: {data-id: {self.name: {invariant-state}}}

setClosable(value=True)[source]

Allow outsiders close this widget

setData(data_item=None, is_batch=False)[source]

Obtain a QStandardItem object and dissect it to get Data1D/2D Pass it over to the calculator

set_high_q_extrapolation_lower_limit(value)[source]
set_low_q_extrapolation_upper_limit(value)[source]
setupMapper()[source]
setupModel()[source]
setupSlots()[source]
stateChanged()[source]

Catch modifications from low- and high-Q extrapolation check boxes

title()[source]

Perspective name

updateDetailsWidget(model)[source]

On demand update of the details widget

updateFromGui()[source]

Update model when new user inputs

updateFromModel()[source]

Update the globals based on the data in the model

updateFromParameters(params)[source]

Called by Open Project and Open Analysis :param params: {param_name: value} :return: None

updateGuiFromFile(data=None)[source]

update display in GUI and plot

updateModelFromThread(widget, value)[source]

Update the model in the main thread

sas.qtgui.Perspectives.Invariant.InvariantUtils module

Module contents