sas.qtgui.Perspectives.Inversion package

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)[source]

Bases: PyQt5.QtWidgets.QDialog, sas.qtgui.Perspectives.Inversion.UI.DMaxExplorer.Ui_DmaxExplorer

closeEvent(event)[source]

Override close event

modelChanged(item)[source]
name = 'Dmax Explorer'
setupMapper()[source]
setupModel()[source]
setupSlots()[source]
setupValidators()[source]

Add validators on relevant line edits

sas.qtgui.Perspectives.Inversion.InversionLogic module

class sas.qtgui.Perspectives.Inversion.InversionLogic.InversionLogic(data=None)[source]

Bases: object

All the data-related logic. This class deals exclusively with Data1D/2D No QStandardModelIndex here.

add_errors(sigma=0.05)[source]

Adds errors to data set is they are not available. Uses \(\Delta y = \sigma | y |\).

computeDataRange()[source]

Wrapper for calculating the data range based on local dataset

computeRangeFromData(data)[source]

Compute the minimum and the maximum range of the data return the npts contains in data

data
isLoadedData()[source]

accessor

new1DPlot(out, pr, q=None)[source]

Create a new 1D data instance based on fitting results

newPRPlot(out, pr, cov=None)[source]

sas.qtgui.Perspectives.Inversion.InversionPerspective module

class sas.qtgui.Perspectives.Inversion.InversionPerspective.InversionWindow(parent=None, data=None)[source]

Bases: PyQt5.QtWidgets.QDialog, sas.qtgui.Perspectives.Inversion.UI.TabbedInversionUI.Ui_PrInversion

The main window for the P(r) Inversion perspective.

acceptAlpha()[source]

Send estimated alpha to input

acceptNoTerms()[source]

Send estimated no of terms to input

allowBatch()[source]
calculateSignal
closeBatchResults()[source]
closeDMax()[source]
closeEvent(event)[source]

Overwrite QDialog close method to allow for custom widget close

communicator()[source]
displayChange(data_index=0)[source]

Switch to another item in the data list

enableButtons()[source]

Enable buttons when data is present, else disable them

estimateDynamicNTSignal
estimateDynamicSignal
estimateNTSignal
estimateSignal
getNFunc()[source]

Get the n_func value from the GUI object

help()[source]

Open the P(r) Inversion help browser

isClosable()[source]

Allow outsiders close this widget

model_changed()[source]

Update the values when user makes changes

name = 'Inversion'
openExplorerWindow()[source]

Open the Explorer window to see correlations between params and results

performEstimate()[source]

Perform parameter estimation

performEstimateDynamic()[source]

Perform parameter estimation

performEstimateDynamicNT()[source]

Perform parameter estimation

performEstimateNT()[source]

Perform parameter estimation

populateDataComboBox(filename, data_ref)[source]

Append a new file name to the data combobox :param filename: data filename :param data_ref: QStandardItem reference for data set to be added

removeData(data_list=None)[source]

Remove the existing data reference from the P(r) Persepective

setClosable(value=True)[source]

Allow outsiders close this widget

setCurrentData(data_ref)[source]

Get the data by reference and display as necessary

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

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

set_background(value)[source]

Connect the use controls to their appropriate methods

setupMapper()[source]
setupModel()[source]

Update boxes with initial values

setupValidators()[source]

Apply validators to editable line edits

setupWindow()[source]

Initialize base window state on init

showBatchOutput()[source]

Display the batch output in tabular form :param output_data: Dictionary mapping filename -> P(r) instance

startNextBatchItem()[source]
startThread()[source]

Start a calculation thread

startThreadAll()[source]
stopCalcThread()[source]

Stops a thread if it exists and is running

stopCalculation()[source]

Stop all threads, return to the base state and update GUI

stopEstimateNTThread()[source]
stopEstimationThread()[source]

Stop the estimation thread if it exists and is running

toggleBgd()[source]

Toggle the background between manual and estimated

updateCalculator()[source]

Update all p(r) params

updateDataList(dataRef)[source]

Save the current data state of the window into self._data_list

updateDynamicGuiValues()[source]
updateGuiValues()[source]
sas.qtgui.Perspectives.Inversion.InversionPerspective.is_float(value)[source]

Converts text input values to floats. Empty strings throw ValueError

sas.qtgui.Perspectives.Inversion.InversionUtils module

sas.qtgui.Perspectives.Inversion.Thread module

class sas.qtgui.Perspectives.Inversion.Thread.CalcPr(pr, nfunc=5, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)[source]

Bases: sas.sascalc.data_util.calcthread.CalcThread

Compute P(r)

compute()[source]

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)[source]

Bases: sas.sascalc.data_util.calcthread.CalcThread

compute()[source]

Calculates the estimate

isquit()[source]
class sas.qtgui.Perspectives.Inversion.Thread.EstimatePr(pr, nfunc=5, error_func=None, completefn=None, updatefn=None, yieldtime=0.01, worktime=0.01)[source]

Bases: sas.sascalc.data_util.calcthread.CalcThread

Estimate P(r)

compute()[source]

Calculates the estimate

Module contents