Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
InputWorkspace | InOut | TableWorkspace | Mandatory | TableWorkspace containing peak profile parameters |
Column | Input | string | Value | Column name of the cell to have value updated. Choices include ‘FitOrTie’, ‘Max’, ‘Min’, ‘StepSize’ and ‘Value’. Allowed values: [‘Value’, ‘FitOrTie’, ‘Min’, ‘Max’, ‘StepSize’] |
Rows | Input | int list | List of row numbers of the cell to have value updated | |
ParameterNames | Input | str list | List of names of parameters that will have their values updated | |
NewFloatValue | Input | number | 0 | New value for the specified cell of type ‘float’. |
NewStringValue | Input | string | New value for the specified cell of type ‘string’. |
In algorithms related to Le Bail Fit and powder diffractomer instrument profile calibration, TableWorkspace containing the peak profile parameters’ information are used as input and output. UpdatePeakParameterTableValue gives user the method to change the value of parameters’ information, including its status to fit, value, minimum/maximum value (for boundary contrains) and step size (for Monte Carlo optimizer).
TableWorkspace containing peak profile parameters must have 2 columns, “Name” and “Value”. It can have but not be limited to the following columns, “Min”, “Max”, “Stepsize” and “FitOrTie”.
The cell to have value updated can be specified by its row and column index.
This algorithm is designed to work with other algorithms to do Le Bail fit.
Example - Changing the value for a parameter:
tablews=CreateEmptyTableWorkspace()
tablews.addColumn("str", "Name")
tablews.addColumn("double", "Value")
tablews.addRow(["A", 1.34])
tablews.addRow(["B", 2.34])
print("Value before %.2f" % tablews.cell(0, 1))
UpdatePeakParameterTableValue(tablews, Column="Value", ParameterNames=["A"], NewFloatValue=1.00)
print("Value after %.2f" % tablews.cell(0, 1))
Output:
Value before 1.34
Value after 1.00
Categories: Algorithm Index | Inelastic\Utility | Transforms\Grouping
Python: UpdatePeakParameterTableValue.py (last modified: 2018-10-05)