# sas.qtgui.Calculators package

## Subpackages

- sas.qtgui.Calculators.Shape2SAS package
  - Subpackages
    - sas.qtgui.Calculators.Shape2SAS.PlotAspects package
      - Submodules
      - sas.qtgui.Calculators.Shape2SAS.PlotAspects.plotAspects module
        - `Canvas`
          - `Canvas.staticMetaObject`
        - `ViewerPlotDesign`
          - `ViewerPlotDesign.colour`
      - Module contents
    - sas.qtgui.Calculators.Shape2SAS.Tables package
      - Subpackages
        - sas.qtgui.Calculators.Shape2SAS.Tables.UI package
          - Submodules
          - sas.qtgui.Calculators.Shape2SAS.Tables.UI.subunitTableUI module
            - `Ui_SubunitTableController`
              - `Ui_SubunitTableController.retranslateUi()`
              - `Ui_SubunitTableController.setupUi()`
          - sas.qtgui.Calculators.Shape2SAS.Tables.UI.variableTableUI module
            - `Ui_VariableTable`
              - `Ui_VariableTable.retranslateUi()`
              - `Ui_VariableTable.setupUi()`
          - Module contents
      - Submodules
      - sas.qtgui.Calculators.Shape2SAS.Tables.subunitTable module
        - `CustomDelegate`
          - `CustomDelegate.createEditor()`
          - `CustomDelegate.setEditorData()`
          - `CustomDelegate.setModelData()`
          - `CustomDelegate.staticMetaObject`
        - `CustomStandardItem`
          - `CustomStandardItem.data()`
          - `CustomStandardItem.setData()`
        - `DoubleValidator`
          - `DoubleValidator.staticMetaObject`
          - `DoubleValidator.validate()`
        - `ExtendedEnum`
          - `ExtendedEnum.list()`
        - `ModelTableModel`
          - `ModelTableModel.staticMetaObject`
        - `OptionLayout`
          - `OptionLayout.COMX()`
          - `OptionLayout.COMY()`
          - `OptionLayout.COMZ()`
          - `OptionLayout.COM_x`
          - `OptionLayout.COM_y`
          - `OptionLayout.COM_z`
          - `OptionLayout.Colour`
          - `OptionLayout.RPX()`
          - `OptionLayout.RPY()`
          - `OptionLayout.RPZ()`
          - `OptionLayout.RP_x`
          - `OptionLayout.RP_y`
          - `OptionLayout.RP_z`
          - `OptionLayout.SLD()`
          - `OptionLayout.Subunit`
          - `OptionLayout.alpha()`
          - `OptionLayout.beta()`
          - `OptionLayout.colour()`
          - `OptionLayout.cube()`
          - `OptionLayout.cuboid()`
          - `OptionLayout.cyl_ring()`
          - `OptionLayout.cylinder()`
          - `OptionLayout.disc()`
          - `OptionLayout.ellipsoid()`
          - `OptionLayout.elliptical_cylinder()`
          - `OptionLayout.gamma()`
          - `OptionLayout.get_position()`
          - `OptionLayout.hollow_cube()`
          - `OptionLayout.hollow_sphere()`
          - `OptionLayout.sphere()`
          - `OptionLayout.x`
          - `OptionLayout.y`
          - `OptionLayout.z`
          - `OptionLayout.ΔSLD`
          - `OptionLayout.α`
          - `OptionLayout.β`
          - `OptionLayout.γ`
        - `SubunitTable`
          - `SubunitTable.initializeModel()`
          - `SubunitTable.initializeSignals()`
          - `SubunitTable.onAdding()`
          - `SubunitTable.onClearSubunitTable()`
          - `SubunitTable.onDeleting()`
          - `SubunitTable.setButtonSpinboxBounds()`
          - `SubunitTable.setSubunitOptions()`
          - `SubunitTable.setSubunitRestriction()`
          - `SubunitTable.setTableProperties()`
          - `SubunitTable.smallestInteger()`
          - `SubunitTable.staticMetaObject`
      - sas.qtgui.Calculators.Shape2SAS.Tables.variableTable module
        - `CustomDelegate`
          - `CustomDelegate.createEditor()`
          - `CustomDelegate.setEditorData()`
          - `CustomDelegate.setModelData()`
          - `CustomDelegate.staticMetaObject`
        - `ModelVariableTableModel`
          - `ModelVariableTableModel.headerData()`
          - `ModelVariableTableModel.staticMetaObject`
        - `VariableTable`
          - `VariableTable.getAllTableColumnsPos()`
          - `VariableTable.getAllTableNamesVariables()`
          - `VariableTable.getCheckedTableNamesVariables()`
          - `VariableTable.getCheckedVariables()`
          - `VariableTable.initializeVariableModel()`
          - `VariableTable.onClearTable()`
          - `VariableTable.removeTableData()`
          - `VariableTable.resetTable()`
          - `VariableTable.setDefaultLayout()`
          - `VariableTable.setUncheckToAllCheckBoxes()`
          - `VariableTable.setVariableTableData()`
          - `VariableTable.staticMetaObject`
      - Module contents
    - sas.qtgui.Calculators.Shape2SAS.UI package
      - Submodules
      - sas.qtgui.Calculators.Shape2SAS.UI.ButtonOptionsUI module
        - `Ui_ButtonOptions`
          - `Ui_ButtonOptions.retranslateUi()`
          - `Ui_ButtonOptions.setupUi()`
      - sas.qtgui.Calculators.Shape2SAS.UI.ConstraintsUI module
        - `Ui_Constraints`
          - `Ui_Constraints.retranslateUi()`
          - `Ui_Constraints.setupUi()`
      - sas.qtgui.Calculators.Shape2SAS.UI.DesignWindowUI module
        - `Ui_Shape2SAS`
          - `Ui_Shape2SAS.retranslateUi()`
          - `Ui_Shape2SAS.setupUi()`
      - sas.qtgui.Calculators.Shape2SAS.UI.ViewerButtonsUI module
        - `Ui_ViewerButtons`
          - `Ui_ViewerButtons.retranslateUi()`
          - `Ui_ViewerButtons.setupUi()`
      - sas.qtgui.Calculators.Shape2SAS.UI.ViewerModelRadiusUI module
        - `Ui_ViewerModelRadius`
          - `Ui_ViewerModelRadius.retranslateUi()`
          - `Ui_ViewerModelRadius.setupUi()`
      - Module contents
  - Submodules
  - sas.qtgui.Calculators.Shape2SAS.ButtonOptions module
    - `ButtonOptions`
      - `ButtonOptions.staticMetaObject`
  - sas.qtgui.Calculators.Shape2SAS.Constraints module
    - `Constraints`
      - `Constraints.checkPythonSyntax()`
      - `Constraints.clearConstraints()`
      - `Constraints.extractValues()`
      - `Constraints.getConstraintText()`
      - `Constraints.getConstraints()`
      - `Constraints.getImportStatements()`
      - `Constraints.getParameters()`
      - `Constraints.getParametersFromConstraints()`
      - `Constraints.getPosition()`
      - `Constraints.getTranslation()`
      - `Constraints.ifParameterExists()`
      - `Constraints.isImportFromStatement()`
      - `Constraints.isImportStatement()`
      - `Constraints.onClosingConstraints()`
      - `Constraints.removeFromList()`
      - `Constraints.setConstraints()`
      - `Constraints.staticMetaObject`
  - sas.qtgui.Calculators.Shape2SAS.DesignWindow module
    - `DesignWindow`
      - `DesignWindow.addToVariableTable()`
      - `DesignWindow.checkStateOfConstraints()`
      - `DesignWindow.checkedVariables()`
      - `DesignWindow.deleteFromVariableTable()`
      - `DesignWindow.enableButtons()`
      - `DesignWindow.ext`
      - `DesignWindow.getAllTableNames()`
      - `DesignWindow.getConstraintsToTextEditor()`
      - `DesignWindow.getFitParameters()`
      - `DesignWindow.getModelData()`
      - `DesignWindow.getModelProfile()`
      - `DesignWindow.getPluginModel()`
      - `DesignWindow.getSimulatedSAXSData()`
      - `DesignWindow.getStandardReadOfTableData()`
      - `DesignWindow.getStructureFactorValues()`
      - `DesignWindow.getSubunitTableCell()`
      - `DesignWindow.getSubunitTableRow()`
      - `DesignWindow.getSubunitTableSets()`
      - `DesignWindow.getTableName()`
      - `DesignWindow.getTableNames()`
      - `DesignWindow.getViewFeatures()`
      - `DesignWindow.ifEmptyName()`
      - `DesignWindow.ifEmptyValue()`
      - `DesignWindow.ifFitPar()`
      - `DesignWindow.ifNoCondition()`
      - `DesignWindow.name`
      - `DesignWindow.onCheckingInput()`
      - `DesignWindow.onClickingClose()`
      - `DesignWindow.onClickingPlot()`
      - `DesignWindow.onConstraintReset()`
      - `DesignWindow.onHelp()`
      - `DesignWindow.onSAXSExperimentReset()`
      - `DesignWindow.onSubunitTableReset()`
      - `DesignWindow.plotSimulatedSAXSData()`
      - `DesignWindow.sendSimulatedSAXSToDataExplorer()`
      - `DesignWindow.setConstraintsToTextEditor()`
      - `DesignWindow.showConstraintWindow()`
      - `DesignWindow.showSimulatedSAXSData()`
      - `DesignWindow.showStructureFactorOptions()`
      - `DesignWindow.staticMetaObject`
      - `DesignWindow.title`
      - `DesignWindow.updateDeleteButton()`
  - sas.qtgui.Calculators.Shape2SAS.ViewerAllOptions module
    - `ViewerButtons`
      - `ViewerButtons.staticMetaObject`
    - `ViewerModelRadius`
      - `ViewerModelRadius.staticMetaObject`
  - sas.qtgui.Calculators.Shape2SAS.ViewerModel module
    - `ViewerModel`
      - `ViewerModel.initialiseAxis()`
      - `ViewerModel.onXYClicked()`
      - `ViewerModel.onYZClicked()`
      - `ViewerModel.onZXClicked()`
      - `ViewerModel.onZoomChanged()`
      - `ViewerModel.scatter`
      - `ViewerModel.setAxis()`
      - `ViewerModel.setClearModelPlot()`
      - `ViewerModel.setClearScatteringPlot()`
      - `ViewerModel.setPlot()`
      - `ViewerModel.setScatteringPlot()`
      - `ViewerModel.setZoom()`
      - `ViewerModel.staticMetaObject`
  - sas.qtgui.Calculators.Shape2SAS.genPlugin module
    - `generateModel()`
    - `generatePlugin()`
    - `parListFormat()`
    - `parListsFormat()`
  - Module contents
- sas.qtgui.Calculators.UI package
  - Submodules
  - sas.qtgui.Calculators.UI.DataOperationUtilityUI module
    - `Ui_DataOperationUtility`
      - `Ui_DataOperationUtility.retranslateUi()`
      - `Ui_DataOperationUtility.setupUi()`
  - sas.qtgui.Calculators.UI.DensityPanel module
    - `Ui_DensityPanel`
      - `Ui_DensityPanel.retranslateUi()`
      - `Ui_DensityPanel.setupUi()`
  - sas.qtgui.Calculators.UI.GenericScatteringCalculator module
    - `Ui_GenericScatteringCalculator`
      - `Ui_GenericScatteringCalculator.retranslateUi()`
      - `Ui_GenericScatteringCalculator.setupUi()`
  - sas.qtgui.Calculators.UI.KiessigPanel module
    - `Ui_KiessigPanel`
      - `Ui_KiessigPanel.retranslateUi()`
      - `Ui_KiessigPanel.setupUi()`
  - sas.qtgui.Calculators.UI.ResolutionCalculatorPanelUI module
    - `Ui_ResolutionCalculatorPanel`
      - `Ui_ResolutionCalculatorPanel.retranslateUi()`
      - `Ui_ResolutionCalculatorPanel.setupUi()`
  - sas.qtgui.Calculators.UI.SldPanel module
    - `Ui_SldPanel`
      - `Ui_SldPanel.retranslateUi()`
      - `Ui_SldPanel.setupUi()`
  - sas.qtgui.Calculators.UI.SlitSizeCalculator module
    - `Ui_SlitSizeCalculator`
      - `Ui_SlitSizeCalculator.retranslateUi()`
      - `Ui_SlitSizeCalculator.setupUi()`
  - Module contents

## Submodules

## sas.qtgui.Calculators.DataOperationUtilityPanel module

class sas.qtgui.Calculators.DataOperationUtilityPanel.DataOperationUtilityPanel(parent=None)

  Bases: `QDialog`, `Ui_DataOperationUtility`

  newPlot(graph, layout)

    Create template for graphs with default ‘?’ layout

  onCheckChosenData()

    check that data1 and data2 are compatible

  onCheckOutputName()

    Check that name of output does not already exist

  onClose()

    Close dialog

  onCompute()

    perform calculation

  onHelp()

    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()

    Check input of number when a coefficient is required for operation

  onPrepareOutputData()

    Prepare datasets to be added to DataExplorer and DataManager

  onReset()

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

  onSelectData1()

    Plot for selection of Data1

  onSelectData2()

    Plot for selection of Data2

  onSelectOperator()

    Change GUI when operator changed

  prepareSubgraphWithData(data)

    Create graphics view containing scene with string

  staticMetaObject = PySide6.QtCore.QMetaObject("DataOperationUtilityPanel" inherits "QDialog": )
  updateCombobox(filenames)

    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)

    plot data in graph after clearing its layout

## sas.qtgui.Calculators.DensityPanel module

class sas.qtgui.Calculators.DensityPanel.DensityPanel(parent=None)

  Bases: `QDialog`

  dataChanged(top, bottom)
  displayHelp()
  formulaChanged(current_text)
  massChanged(current_text)
  modelReset()
  setMode(mode)
  setupMapper()
  setupModel()
  setupUi()
  staticMetaObject = PySide6.QtCore.QMetaObject("DensityPanel" inherits "QDialog": )
  volumeChanged(current_text)

sas.qtgui.Calculators.DensityPanel.toMolarMass(formula)

## sas.qtgui.Calculators.GenericScatteringCalculator module

class sas.qtgui.Calculators.GenericScatteringCalculator.GenericScatteringCalculator(parent=None)

  Bases: `QDialog`, `Ui_GenericScatteringCalculator`

  TEXTBOX_DEFAULT_STYLESTRING = 'background-color: rgb(255, 255, 255);'
  TEXTBOX_ERROR_STYLESTRING = 'background-color: rgb(255, 182, 193);'
  TEXTBOX_WARNING_STYLESTRING = 'background-color: rgb(255, 226, 110);'
  calculateComplete(d)

    Notify the main thread

  calculateFailed(reason)
  calculationFinishedSignal
  change_data_type()

    Adjusts the GUI for the enabled nuclear/magnetic data files

    When different combinations of nuclear and magnetic data files are loaded various options must be enabled/disabled or hidden/made visible. This function controls that behaviour and is called whenever the checkboxes for enabling files are altered. If the data file for a given type of data is not loaded then the average value textbox is enabled to allow the user to give a constant value for all points. If no data files are loaded then the node and stepsize textboxes are enabled to allow the user to specify a simple rectangular lattice.

  change_is_avg()

    Adjusts the GUI for whether 1D averaging is enabled

    If the user has chosen to carry out Debye full averaging then the magnetic sld values must be set to 0, and made uneditable - because the calculator in geni.py is incapable of averaging systems with non-zero magnetic slds or polarisation.

    This function is called whenever different files are enabled or the user edits the averaging combobox.

  change_qValidator()
  check_for_magnetic_controls()
  check_large_calculation(num_points)

    Generate a popup warning the user about a large calculation :return True if the calculation should continue, False otherwise.

  check_units()

    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 units

  closeEvent(event)

    Overwrite the close event and hide the window instead of closing it

  complete(input, update=None)

    Carry out the compuation of I(qx, qy) in a new thread

    Gen compute complete function

    This function separates the range of q or (qx,qy) into chunks and then calculates each chunk with calls to the model.

    Parameters:

      input (list) – input list [qx_data, qy_data, i_out]

  complete_loading(data=None, load_nuc=True)

    Function which handles the datafiles once they have been loaded in - used in GenRead

    Once the data has been loaded in by the required reader it is necessary to do a small amount of final processing to put them in the required form. This involves converting all the data to instances of MagSLD and reporting any errors. Additionally, verification of the newly loaded file is carried out.

    Parameters:

      - data (OMFData, MagSLD depending on filetype) – The data loaded from the requested file.

      - load_nuc (bool) – Specifies whether the loaded file is nuclear or magnetic data. Defaults to True. load_nuc=True gives nuclear sld data. load_nuc=False gives magnetic sld data.

  complete_loading_ex(data=None, load_nuc=True)

    Send the finish message from calculate threads to main thread

    Parameters:

      - data (OMFData, MagSLD depending on filetype) – The data loaded from the requested file.

      - load_nuc (bool) – Specifies whether the loaded file is nuclear or magnetic data. Defaults to True. load_nuc=True gives nuclear sld data. load_nuc=False gives magnetic sld data.

  create_full_sld_data()

    Create the sld data to be used in the final calculation

    This function creates an instance of MagSLD which contains the required data for sas_gen and 3D plotting. It is the suitable combination of data from the magnetic data, nuclear data and set GUI parameters. Where nuclear and magnetic files are enabled it sometimes has to make a choice regarding which version of a parameter to keep. This is usually the nuclear data version, as in the case of .pdb files being used this version will contain more complete data.

    Returns:

      The full sld data created from the various different sources

    Return type:

      MagSLD

  create_rotation_matrices()

    Create the rotation matrices between different coordinate systems

    UVW coords: beamline coords uvw coords: environment coords xyz coords: sample coords

    The GUI contains values of yaw, pitch and roll from uvw to xyz coordinates and from UVW to uvw. These are right handed coordinate systems with UVW being the beamline coordinate system with:

    U: horizonatal axis

    V: vertical axis

    W: axis back from detector to sample

    The rotation given by the user transforms the BASIS VECTORS - the user gives the trasformation from beamline coords to samplecoords for example - so from there perspective the beamline is the fixed object and the environment and sample rotate. The rotation is first a yaw angle about the V axis (UVW -> U’V’W’) then a pitch angle about the U’ axis (U’V’W’ -> U’’V’’W’’) and finally a roll rotation abot the W’’ axis (U’’V’’W’’ -> uvw).

    This function expects that the textbox values are correct.

    Returns:

      two rotations, the first from UVW to xyz coords, the second from UVW to uvw coords

    Return type:

      tuple of scipy.spatial.transform.Rotation

  eventFilter(target, event)

    Catches the event that a textbox has been enabled/disabled

  file_name()

    Creates a suitable filename for display on graphs depending on which files are enabled

    Returns:

      the filename

    Return type:

      str

  getFileName()
  gui_text_changed(sender)

    check whether lineEdit values are valid

    This function checks whether lineEdits are valid, and if not highlights them and calls for functionality to be disabled. It checks for both errors and warnings. Error states highlight red and disable functionality. These are ‘intermediate’ states which do not match the regex. Warning states are highlighted orange and warn the user the value may be problematic. Warnings were previously checked for in the check_value() method.

    For warnings this checks that QMax and the number of Qbins is suitable given the user chosen values. Unlike the hard limits imposed by the regex, this does not prevent the user using the given value, but warns them that it may be unsuitable with a backcolour.

    Parameters:

      sender (QWidget) – The QLineEdit in question

  gui_text_changed_slot()

    Catches the signal that a textbox has beeen altered

  hideWindow()

    Hide the window when the close button is clicked

  loadFile()

    Opens a menu to choose the datafile to load

    Opens a file dialog to allow the user to select a datafile to be loaded. If a nuclear sld datafile is loaded then the allowed file types are: .SLD .sld .PDB .pdb If a magnetic sld datafile is loaded then the allowed file types are: .SLD .sld .OMF .omf This function then loads in the requested datafile, but does not enable it. If no previous datafile of this type was loaded then the checkbox to enable this file is enabled.

    Parameters:

      load_nuc (bool) – Specifies whether the loaded file is nuclear or magnetic data. Defaults to True. load_nuc=True gives nuclear sld data. load_nuc=False gives magnetic sld data.

  load_update()

    Legacy function used in GenRead

  loadingFinishedSignal
  onCancel()

    Notify the calculation thread that the user has cancelled the calculation.

  onCompute()

    Execute the computation of I(qx, qy)

    Copied from previous version

  onHelp()

    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()

    Reset the GUI to its default state

    This resets all GUI parameters to their default values and also resets all GUI states such as loaded files, stored data, verification and disabled/enabled widgets.

  onSaveFile()

    Save data as .sld file

  plot3d(has_arrow=False)

    Generate 3D plot in real space with or without arrows

    Parameters:

      has_arrow (bool) – Whether to plot arrows for the magnetic field on the plot. Defaults to False

  plot_1_2d()

    Generate 1D or 2D plot, called in Compute

  reset_camera()
  selectedshapechange()

    TODO Temporary solution to display information about option ‘Ellipsoid’

  set_polarisation_visible(visible)

    This function updates the visibility of the polarisation vector This is one of four functions affecting the coordinate system visualisation which should be updated if a new 3D rendering library is used: setup_display(), update_coords(), update_polarisation_coords(), set_polarisation_visible().

  setup_display()

    This function sets up the GUI display of the different coordinate systems. Since these cannot be set in the .ui file they should be QWidgets added to the self.coord_display layout. This is one of four functions affecting the coordinate system visualisation which should be updated if a new 3D rendering library is used: setup_display(), update_coords(), update_polarisation_coords(), set_polarisation_visible().

  staticMetaObject = PySide6.QtCore.QMetaObject("GenericScatteringCalculator" inherits "QDialog": Methods: #41 type=Signal, signature=trigger_plot_3d() #42 type=Signal, signature=calculationFinishedSignal() #43 type=Signal, signature=loadingFinishedSignal(QVariantList,bool), parameters=QVariantList, bool )
  toggle_error_functionality()

    Disables/Enables some functionality if the state of the GUI means calculation cannot proceed

    This function is called during any process whenever there is a risk that the state of the GUI will make the data invalid for plotting, drawing or saving. If that is the case then this functionality is disabled. This function is currently called when two files are being verified for compatibility, and when textboxes enter ‘intermediate’ states.

  trigger_plot_3d
  update_Rg()
  update_cbOptionsCalc_visibility()
  update_coords()

    This function rotates the visualisation of the coordinate systems This is one of four functions affecting the coordinate system visualisation which should be updated if a new 3D rendering library is used: setup_display(), update_coords(), update_polarisation_coords(), set_polarisation_visible().

  update_file_name()
  update_geometry_effects()

    This function updates the number of pixels and total volume when the number of nodes/stepsize is changed

    This function only has an effect if no files are enabled otherwise the number of pixels and total volume may be set differently by the data from the file.

  update_gui()

    Update the interface and model with values from loaded data

    This function updates the model parameter ‘total_volume’ with values from the loaded data and then updates all values in the gui with either model paramters or paramaters from the loaded data.

  update_polarisation_coords()

    This function rotates the visualisation of the polarisation vector This is one of four functions affecting the coordinate system visualisation which should be updated if a new 3D rendering library is used: setup_display(), update_coords(), update_polarisation_coords(), set_polarisation_visible().

  write_new_values_from_gui()

    Update parameters in model using modified inputs from GUI

    Before the model is used to calculate any scattering patterns it needs to be updated with values from the gui. This does not affect any fixed values, whose textboxes are disabled, and means that any user chosen changes are made. It also ensure that at all times the values in the GUI reflect the data output.

class sas.qtgui.Calculators.GenericScatteringCalculator.Plotter3D(gsc_instance: GenericScatteringCalculator | None, parent=None, graph_title='')

  Bases: `QDialog`, `Plotter3DWidget`

  closeEvent(event: QCloseEvent) → None

    Overwrite the close event adding helper notification

  staticMetaObject = PySide6.QtCore.QMetaObject("Plotter3D" inherits "QDialog": )

class sas.qtgui.Calculators.GenericScatteringCalculator.Plotter3DWidget(parent=None, parent_window=None, manager=None)

  Bases: `PlotterBase`

  3D Plot widget for use with a QDialog

  closeEvent(event)

    Overwrite the close event adding helper notification

  createContextMenu()

    Define common context menu and associated actions for the MPL widget

  createContextMenuQuick()

    Define context menu and associated actions for the quickplot MPL widget

  property data

    data getter

  plot(data=None, has_arrow=False)

    Plot 3D self._data

  showPlot(data, has_arrow=False)

    Render and show the current data

  staticMetaObject = PySide6.QtCore.QMetaObject("Plotter3DWidget" inherits "PlotterBase": )

## sas.qtgui.Calculators.KiessigPanel module

class sas.qtgui.Calculators.KiessigPanel.KiessigPanel(parent=None)

  Bases: `QDialog`, `Ui_KiessigPanel`

  onClose()

    close the window containing this panel

  onCompute()

    Execute the computation of thickness

  onHelp()

    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/ ….”.

  staticMetaObject = PySide6.QtCore.QMetaObject("KiessigPanel" inherits "QDialog": )

## 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)

  Bases: `QDialog`, `Ui_ResolutionCalculatorPanel`

  compute resolution in 2D

  calc_func(qx, qy, qx_min, qx_max, qy_min, qy_max)

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

  calculateFailed(reason)
  checkAperture()

    Validator for Sample and Source apertures

  checkPixels()

    Validator for detector pixel size and number

  checkQx_y()

    Validator for qx and qy inputs

  checkWavelength()

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

  checkWavelengthSpread()

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

  complete(image)

    Complete computation

  createTemplate2DPlot()

    Create a template for 2D data

  drawLines()

    Draw lines in image if applicable

  formatNumber(value=None)

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

  map_wrapper(func, qx, qy, qx_min, qx_max, qy_min, qy_max)

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

  new2DPlot()

    Create a new 2D data instance based on computing results

  onCompute()

    Execute the computation of resolution

  onHelp()

    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()
  onSelectCustomSpectrum()

    On Spectrum Combobox event

  onSelectWaveColor()

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

  staticMetaObject = PySide6.QtCore.QMetaObject("ResolutionCalculatorPanel" inherits "QDialog": )

## 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)

  Bases: `object`

class sas.qtgui.Calculators.SldPanel.SldPanel(parent=None)

  Bases: `QDialog`

  calculateSLD()
  closePanel()

    close the window containing this panel

  dataChanged(top, bottom)
  displayHelp()
  modelReset()
  recalculateSLD()
  setupMapper()
  setupModel()
  setupUi()
  staticMetaObject = PySide6.QtCore.QMetaObject("SldPanel" inherits "QDialog": )

class sas.qtgui.Calculators.SldPanel.XraySldResult(xray_wavelength, xray_sld_real, xray_sld_imag)

  Bases: `object`

sas.qtgui.Calculators.SldPanel.neutronSldAlgorithm(molecular_formula, mass_density, neutron_wavelength)

sas.qtgui.Calculators.SldPanel.xraySldAlgorithm(molecular_formula, mass_density, xray_wavelength)

## sas.qtgui.Calculators.SlitSizeCalculator module

Slit Size Calculator Panel

class sas.qtgui.Calculators.SlitSizeCalculator.SlitSizeCalculator(parent=None)

  Bases: `QDialog`, `Ui_SlitSizeCalculator`

  Provides the slit length calculator GUI.

  calculateSlitSize(data=None)

    Computes slit lenght from given 1D data

  chooseFile()

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

  clearResults()

    Clear the content of output LineEdits

  onBrowse()

    Browse the file and calculate slit lenght upon loading

  onClose()

    close the window containing this panel

  onHelp()

    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/ ….”.

  staticMetaObject = PySide6.QtCore.QMetaObject("SlitSizeCalculator" inherits "QDialog": )

## Module contents