Table of Contents
Name | Direction | Type | Default | Description |
---|---|---|---|---|
FirstPeriodWorkspace | Input | MatrixWorkspace | Mandatory | First period data. The only one used if second period is not specified. |
SecondPeriodWorkspace | Input | MatrixWorkspace | Second period data. | |
PeriodOperation | Input | string | + | If two periods specified, what operation to apply to workspaces to get a final one. Allowed values: [‘+’, ‘-‘] |
OutputType | Input | string | PairAsymmetry | What kind of calculation required for analysis. Allowed values: [‘PairAsymmetry’, ‘GroupAsymmetry’, ‘GroupCounts’] |
PairFirstIndex | Input | number | Optional | Workspace index of the first group of the pair. Only used when OutputType is PairAsymmetry. |
PairSecondIndex | Input | number | Optional | Workspace index of the second group of the pair. Only used when OutputType is PairAsymmetry. |
Alpha | Input | number | 1 | Alpha value of the pair. Only used when OutputType is PairAsymmetry. |
GroupIndex | Input | number | Optional | Workspace index of the group to analyse. Only used then OutputType is GroupAsymmetry or GroupCounts. |
OutputWorkspace | Output | MatrixWorkspace | Mandatory | Output workspace. Type of the data depends on the OutputType. |
Converts loaded/prepared Muon data to a data suitable for analysis. Either one or two data acquisition period workspaces may be provided (only the first one is mandatory). When both of them are supplied, the algorithm merges the counts and then calculates the asymmetry. PeriodOperation determines in which way period data will be merged before the asymmetry calculation.
The algorithm supports three asymmetry types or modes:
Note that this algorithm is intended to be executed on input workspaces whose spectra correspond to previously grouped spectra, hence the term ‘group’ is used instead of ‘spectrum’.
Example - Pair asymmetry for a single period:
y = [1,2,3] + [4,5,6]
x = [1,2,3] * 2
input = CreateWorkspace(x, y, NSpec=2)
output = MuonCalculateAsymmetry(FirstPeriodWorkspace = input,
OutputType = 'PairAsymmetry',
PairFirstIndex = 1,
PairSecondIndex = 0,
Alpha = 0.5)
print 'Output:', output.readY(0)
Output:
Output: [ 0.77777778 0.66666667 0.6 ]
Example - Group asymmetry for two periods:
y1 = [100,50,10]
y2 = [ 50,25, 5]
x = [1,2,3]
input1 = CreateWorkspace(x, y1)
input2 = CreateWorkspace(x, y2)
output = MuonCalculateAsymmetry(FirstPeriodWorkspace = input1,
SecondPeriodWorkspace = input2,
PeriodOperation = '-',
OutputType = 'GroupAsymmetry',
GroupIndex = 0)
print 'Output:', output.readY(0)
Output:
Output: [ 0.1524242 -0.0916425 -0.71360777]
Categories: Algorithms | Workflow | Muon