sas.qtgui.Calculators package

Submodules

sas.qtgui.Calculators.DataOperationUtilityPanel module

class sas.qtgui.Calculators.DataOperationUtilityPanel.DataOperationUtilityPanel(parent=None)[source]

Bases: PyQt5.QtWidgets.QDialog, sas.qtgui.Calculators.UI.DataOperationUtilityUI.Ui_DataOperationUtility

newPlot(graph, layout)[source]

Create template for graphs with default ‘?’ layout

onCheckChosenData()[source]

check that data1 and data2 are compatible

onCheckOutputName()[source]

Check that name of output does not already exist

onClose()[source]

Close dialog

onCompute()[source]

perform calculation

onHelp()[source]

Bring up the Data Operation Utility Documentation whenever the HELP button is clicked. Calls Documentation Window with the path of the location within the documentation tree (after /doc/ ….”.

onInputCoefficient()[source]

Check input of number when a coefficient is required for operation

onPrepareOutputData()[source]

Prepare datasets to be added to DataExplorer and DataManager

onReset()[source]

Reset Panel to its initial state (default values) keeping the names of loaded data

onSelectData1()[source]

Plot for selection of Data1

onSelectData2()[source]

Plot for selection of Data2

onSelectOperator()[source]

Change GUI when operator changed

prepareSubgraphWithData(data)[source]

Create graphics view containing scene with string

updateCombobox(filenames)[source]

Function to fill comboboxes with names of datafiles loaded in DataExplorer. For Data2, there is the additional option of choosing a number to apply to data1

updatePlot(graph, layout, data)[source]

plot data in graph after clearing its layout

sas.qtgui.Calculators.DensityPanel module

class sas.qtgui.Calculators.DensityPanel.DensityPanel(parent=None)[source]

Bases: PyQt5.QtWidgets.QDialog

dataChanged(top, bottom)[source]
displayHelp()[source]
formulaChanged(current_text)[source]
massChanged(current_text)[source]
modelReset()[source]
setMode(mode)[source]
setupMapper()[source]
setupModel()[source]
setupUi()[source]
volumeChanged(current_text)[source]
sas.qtgui.Calculators.DensityPanel.toMolarMass(formula)[source]

sas.qtgui.Calculators.GenericScatteringCalculator module

class sas.qtgui.Calculators.GenericScatteringCalculator.GenericScatteringCalculator(parent=None)[source]

Bases: PyQt5.QtWidgets.QDialog, sas.qtgui.Calculators.UI.GenericScatteringCalculator.Ui_GenericScatteringCalculator

calculateComplete(d)[source]

Notify the main thread

calculateFailed(reason)[source]
calculationFinishedSignal
check_units()[source]

Check if the units from the OMF file correspond to the default ones displayed on the interface. If not, modify the GUI with the correct unit

check_value()[source]

Check range of text edits for QMax and Number of Qbins

complete(input, update=None)[source]

Gen compute complete function :Param input: input list [qx_data, qy_data, i_out]

complete_loading(data=None)[source]

Function used in GenRead

complete_loading_ex(data=None)[source]

Send the finish message from calculate threads to main thread

loadFile()[source]

Open menu to choose the datafile to load Only extensions .SLD, .PDB, .OMF, .sld, .pdb, .omf

load_update()[source]

Legacy function used in GenRead

loadingFinishedSignal
onCompute()[source]

Copied from previous version Execute the computation of I(qx, qy)

onHelp()[source]

Bring up the Generic Scattering calculator Documentation whenever the HELP button is clicked. Calls Documentation Window with the path of the location within the documentation tree (after /doc/ ….”.

onReset()[source]

Reset the inputs of textEdit to default values

onSaveFile()[source]

Save data as .sld file

plot3d(has_arrow=False)[source]

Generate 3D plot in real space with or without arrows

plot_1_2d()[source]

Generate 1D or 2D plot, called in Compute

selectedshapechange()[source]

TODO Temporary solution to display information about option ‘Ellipsoid’

trigger_plot_3d
update_gui()[source]

Update the interface with values from loaded data

write_new_values_from_gui()[source]

update parameters using modified inputs from GUI used before computing

class sas.qtgui.Calculators.GenericScatteringCalculator.Plotter3D(parent=None, graph_title='')[source]

Bases: PyQt5.QtWidgets.QDialog, sas.qtgui.Calculators.GenericScatteringCalculator.Plotter3DWidget

class sas.qtgui.Calculators.GenericScatteringCalculator.Plotter3DWidget(parent=None, manager=None)[source]

Bases: sas.qtgui.Plotting.PlotterBase.PlotterBase

3D Plot widget for use with a QDialog

createContextMenu()[source]

Define common context menu and associated actions for the MPL widget

createContextMenuQuick()[source]

Define context menu and associated actions for the quickplot MPL widget

data

data getter

plot(data=None, has_arrow=False)[source]

Plot 3D self._data

showPlot(data, has_arrow=False)[source]

Render and show the current data

sas.qtgui.Calculators.KiessigPanel module

class sas.qtgui.Calculators.KiessigPanel.KiessigPanel(parent=None)[source]

Bases: PyQt5.QtWidgets.QDialog, sas.qtgui.Calculators.UI.KiessigPanel.Ui_KiessigPanel

onClose()[source]

close the window containing this panel

onCompute()[source]

Execute the computation of thickness

onHelp()[source]

Bring up the Kiessig fringe calculator Documentation whenever the HELP button is clicked. Calls DocumentationWindow with the path of the location within the documentation tree (after /doc/ ….”.

sas.qtgui.Calculators.ResolutionCalculatorPanel module

This object is a small tool to allow user to quickly determine the variance in q from the instrumental parameters.

class sas.qtgui.Calculators.ResolutionCalculatorPanel.ResolutionCalculatorPanel(parent=None)[source]

Bases: PyQt5.QtWidgets.QDialog, sas.qtgui.Calculators.UI.ResolutionCalculatorPanelUI.Ui_ResolutionCalculatorPanel

compute resolution in 2D

calc_func(qx, qy, qx_min, qx_max, qy_min, qy_max)[source]

Perform the calculation for a given set of Q values. : return: image (numpy array)

calculateFailed(reason)[source]
checkAperture()[source]

Validator for Sample and Source apertures

checkPixels()[source]

Validator for detector pixel size and number

checkQx_y()[source]

Validator for qx and qy inputs

checkWavelength()[source]

Validator for Wavelength if TOF, wavelength = min - max else only one number

checkWavelengthSpread()[source]

Validator for WavelengthSpread Input can be a ‘number or min - max (; Number of bins)’

complete(image)[source]

Complete computation

createTemplate2DPlot()[source]

Create a template for 2D data

drawLines()[source]

Draw lines in image if applicable

formatNumber(value=None)[source]

Return a float in a standardized, human-readable formatted string

map_wrapper(func, qx, qy, qx_min, qx_max, qy_min, qy_max)[source]

Prepare the Mapping for the computation : params qx, qy, qx_min, qx_max, qy_min, qy_max: : return: image (numpy array)

new2DPlot()[source]

Create a new 2D data instance based on computing results

onCompute()[source]

Execute the computation of resolution

onHelp()[source]

Bring up the Resolution Calculator Documentation whenever the HELP button is clicked. Calls Documentation Window with the path of the location within the documentation tree (after /doc/ ….”.

onReset()[source]
onSelectCustomSpectrum()[source]

On Spectrum Combobox event

onSelectWaveColor()[source]

Modify layout of GUI when TOF selected: add elements and modify default entry of Wavelength

sas.qtgui.Calculators.SldPanel module

class sas.qtgui.Calculators.SldPanel.NeutronSldResult(neutron_wavelength, neutron_sld_real, neutron_sld_imag, neutron_inc_xs, neutron_abs_xs, neutron_length)[source]

Bases: object

class sas.qtgui.Calculators.SldPanel.SldPanel(parent=None)[source]

Bases: PyQt5.QtWidgets.QDialog

calculateSLD()[source]
closePanel()[source]

close the window containing this panel

dataChanged(top, bottom)[source]
displayHelp()[source]
modelReset()[source]
recalculateSLD()[source]
setupMapper()[source]
setupModel()[source]
setupUi()[source]
class sas.qtgui.Calculators.SldPanel.XraySldResult(xray_wavelength, xray_sld_real, xray_sld_imag)[source]

Bases: object

sas.qtgui.Calculators.SldPanel.neutronSldAlgorithm(molecular_formula, mass_density, neutron_wavelength)[source]
sas.qtgui.Calculators.SldPanel.xraySldAlgorithm(molecular_formula, mass_density, xray_wavelength)[source]

sas.qtgui.Calculators.SlitSizeCalculator module

Slit Size Calculator Panel

class sas.qtgui.Calculators.SlitSizeCalculator.SlitSizeCalculator(parent=None)[source]

Bases: PyQt5.QtWidgets.QDialog, sas.qtgui.Calculators.UI.SlitSizeCalculator.Ui_SlitSizeCalculator

Provides the slit length calculator GUI.

calculateSlitSize(data=None)[source]

Computes slit lenght from given 1D data

chooseFile()[source]

Shows the Open file dialog and returns the chosen path(s)

clearResults()[source]

Clear the content of output LineEdits

onBrowse()[source]

Browse the file and calculate slit lenght upon loading

onClose()[source]

close the window containing this panel

onHelp()[source]

Bring up the Slit Size Calculator calculator Documentation whenever the HELP button is clicked. Calls DocumentationWindow with the path of the location within the documentation tree (after /doc/ ….”.

Module contents