\(\renewcommand\AA{\unicode{x212B}}\)

ProcessIndirectFitParameters v1

../_images/ProcessIndirectFitParameters-v1_dlg.png

ProcessIndirectFitParameters dialog.

Summary

Convert a parameter table output by PlotPeakByLogValue to a MatrixWorkspace.

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

TableWorkspace

Mandatory

The table workspace to convert to a MatrixWorkspace.

ColumnX

Input

string

Mandatory

The column in the table to use for the x values.

ParameterNames

Input

str list

Mandatory

List of the parameter names to add to the workspace.

IncludeChiSquared

Input

boolean

False

Add Chi-squared to the output workspace.

XAxisUnit

Input

string

The unit to assign to the X Axis. Allowed values: [‘AtomicDistance’, ‘Degrees’, ‘DeltaE’, ‘DeltaE_inFrequency’, ‘DeltaE_inWavenumber’, ‘dSpacing’, ‘dSpacingPerpendicular’, ‘Empty’, ‘Energy’, ‘Energy_inWavenumber’, ‘Label’, ‘Momentum’, ‘MomentumTransfer’, ‘Phi’, ‘QSquared’, ‘SpinEchoLength’, ‘SpinEchoTime’, ‘Temperature’, ‘Time’, ‘TOF’, ‘Wavelength’, ‘’]

StartRowIndex

Input

number

Optional

The start row index to include in the output matrix workspace.

EndRowIndex

Input

number

Optional

The end row index to include in the output matrix workspace.

OutputWorkspace

Output

MatrixWorkspace

Mandatory

The name to give the output workspace

Description

An Algorithm designed to allow for the TableWorkspace output of the PlotPeakByLogValue algorithm to be transformed into a Matrix workspace based on the desired parameters.

Workflow

../_images/ProcessIndirectFitParameters-v1_wkflw.svg

Usage

Example - ProcessIndirectFitParameters

# Create a host workspace
tws = WorkspaceFactory.createTable()
tws.addColumn("double", "A")
tws.addColumn("double", "B")
tws.addColumn("double", "B_Err")
tws.addColumn("double", "D")
tws.addRow([1,2,3,4])
tws.addRow([5,6,7,8])
tws.addRow([9,0,1,2])
tws.addRow([0,0,0,1])

# Add to Mantid Workspace list
mtd.addOrReplace("TableWs",tws)
wsName = "outputWorkspace"

# "D" is not included in the algorithm params list
ProcessIndirectFitParameters(tws, 'A', "B", OutputWorkspace=wsName)

wsOut = mtd[wsName]

# Print the result
print("{} is a {} and the Y values are:".format(wsOut, wsOut.id()))
print(wsOut.readY(0))

Output:

outputWorkspace is a Workspace2D and the Y values are:
    [ 2.  6.  0.  0.]

Categories: AlgorithmIndex | Workflow\MIDAS

Source

C++ header: ProcessIndirectFitParameters.h

C++ source: ProcessIndirectFitParameters.cpp