\(\renewcommand\AA{\unicode{x212B}}\)
ERROR: No algorithm ‘HeliumAnalyserPolarizationDecay’ version ‘1’, skipping directive
ERROR: No algorithm ‘HeliumAnalyserPolarizationDecay’ version ‘1’, skipping directive
ERROR: No algorithm ‘HeliumAnalyserPolarizationDecay’ version ‘1’, skipping directive
ERROR: No algorithm ‘HeliumAnalyserPolarizationDecay’ version ‘1’, skipping directive
Description¶
Takes a normalised group workspace and combines this with the cell path length multiplied by the gas pressure (PXD)
to calculate the efficiency of the analyser. The input workspace must be a group of four single spectrum histogram workspaces, each
representing the transmission of a known spin state as specified by the SpinStates parameter.
If the transmission of the wanted spin state is \(T_{para}\), and the transmission of the unwanted spin state is \(T_{anti}\), then the polarization of of an unpolarised incoming beam after the analyser cell, \(P_{cell}\) is given by [1]
The efficiency of the analyser cell is given by
If our four periods are \(T_{00}, T_{01}, T_{10}, T_{11}\), with the subscript denoting the spin configuration, then
\(T_{para} = T_{00} + T_{11}\) and \(T_{anti} = T_{01} + T_{10}\), and we can calculate \(\epsilon_{cell}\) from the above equation.
The value of \(pd\) is given by the input PXD, and \(\lambda\) is the wavelength of each bin, so we fit
\(\frac{1 + \tanh(0.0733 p d \lambda p_{He})}{2}\) to our calculated \(\epsilon_{cell}\) to give us \(p_{He}\) and hence the
theoretical efficiency curve.
To calculate the error, \(\sigma_{\epsilon_{cell}}\), we need the error on \(p_{He}\), \(\sigma_{p_{He}}\), and
the error of \(pd\), \(\sigma_{pd}\), given by PXDError. The covariance between \(pd\) and \(p_{He}\)
is assumed to be zero. Then the error \(\sigma_{\epsilon_{cell}}\) is given by
where \(mu = 0.0733 * pd\) and \(\sigma_{\lambda}\) is the width of the wavelength bin.
If \(n_b\) is the number of histogram bins used in the fit, then define \(n := n_b-1\), since we are fitting one parameter (\(p_{He}\)). Then the factor \(t_{crit}\) follows a \(t\) distribution with \(n\) degrees of freedom, and probability density function \(f_t(x,n)\). For a standard 68.3% (1-sigma) error the factor \(t_{crit}\) is given by the solution to
As the number of histogram bins used in the fit increases, \(t_{crit} \rightarrow 1\).
Usage¶
Example - Calculate Analyser Efficiency
wsPara = CreateSampleWorkspace('Histogram', Function='User Defined', UserDefinedFunction='name=UserFunction,Formula=0.5*exp(-0.0733*12*x*(1-0.9))',XUnit='Wavelength', xMin='1',XMax='8', BinWidth='1', NumBanks='1', BankPixelWidth='1')
wsPara1 = CloneWorkspace(wsPara)
wsAnti = CreateSampleWorkspace('Histogram', Function='User Defined', UserDefinedFunction='name=UserFunction,Formula=0.5*exp(-0.0733*12*x*(1+0.9))',XUnit='Wavelength', xMin='1',XMax='8', BinWidth='1', NumBanks='1', BankPixelWidth='1')
wsAnti1 = CloneWorkspace(wsAnti)
grp = GroupWorkspaces([wsPara,wsAnti,wsPara1,wsAnti1])
eff = HeliumAnalyserEfficiency(grp, SpinStates='11,01,00,10')
print('Efficiency at ' + str(mtd['eff'].dataX(0)[0]) + ' Å = ' + str(mtd['eff'].dataY(0)[0]))
print('Error in efficiency at ' + str(mtd['eff'].dataX(0)[0]) + ' Å = ' + str(mtd['eff'].dataE(0)[0]))
Output:
Efficiency at 1.0 Å = ...
Error in efficiency at 1.0 Å = ...
References¶
ERROR: No algorithm ‘HeliumAnalyserPolarizationDecay’ version ‘1’, skipping directive
ERROR: No algorithm ‘HeliumAnalyserPolarizationDecay’ version ‘1’, skipping directive