Re-release as I can't push directly to @jclarkeSTFC's fork
37180
New algorithm to calculate the supermirror polarizer efficiency using a group workspace containing spin states, plus the efficiency of the analyser cell, calculated previously. This is part of the polarized SANS epic.
Output can either be to a workspace, a file, or both.
Fixes #36139
Summary of work
Added algorithm
Added tests
Added doc page
Further detail of work
Calculates how the efficiency of a polarizer varies with wavelength. The ordering of the workspaces in InputWorkspace is taken from the SpinStates parameter, and the analyser efficiency, e_cell, is given by AnalyserEfficiency.
The polarization of the polarizer, $P_{SM}$, is given by
Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.
Do changes function as described? Add comments below that describe the tests performed?
Do the changes handle unexpected situations, e.g. bad input?
Has the relevant (user and developer) documentation been added/updated?
Does everything look good? Mark the review as Approve. A member of @mantidproject/gatekeepers will take care of it.
Gatekeeper
If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.
Re-release as I can't push directly to @jclarkeSTFC's fork
37180
New algorithm to calculate the supermirror polarizer efficiency using a group workspace containing spin states, plus the efficiency of the analyser cell, calculated previously. This is part of the polarized SANS epic.
Output can either be to a workspace, a file, or both.
Fixes #36139
Summary of work
Further detail of work
Calculates how the efficiency of a polarizer varies with wavelength. The ordering of the workspaces in
InputWorkspace
is taken from theSpinStates
parameter, and the analyser efficiency, e_cell, is given byAnalyserEfficiency
.The polarization of the polarizer, $P_{SM}$, is given by
$$ \huge P{SM} = \frac{T{00} - T{01}}{2P{cell}(T{00} + T{01})} = \frac{T{00} - T{01}}{2(2\epsilon{cell} - 1)(T{00} + T_{01})} $$
Since the efficiency, $\epsilon{SM}$ , is given by $\frac{1 + P{SM}}{2}$, we have that
$$ \huge \epsilon{SM} = \frac{1}{2} + \frac{T{00} - T{01}}{4(2\epsilon{cell} - 1)(T{00} + T{01})} $$
Error correction:
$$ \huge \sigma{\epsilon{SM}} = \sqrt{|\frac{\delta \epsilon{SM}}{\delta T{00}}|^2 \sigma^2{T{00}} + |\frac{\delta \epsilon{SM}}{\delta T{01}}|^2 \sigma^2{T{01}} + |\frac{\delta \epsilon{SM}}{\delta \epsilon{cell}}|^2 * \sigma^2{\epsilon{cell}}} $$
where:
$$ \huge \frac{\delta \epsilon{SM}}{\delta T{00}} = \frac{T{01}}{2(2\epsilon{cell} - 1)(T{00} + T{01})^2} $$
$$ \huge \frac{\delta \epsilon{SM}}{\delta T{01}} = \frac{-T{00}}{2(2\epsilon{cell} - 1)(T{00} + T{01})^2} $$
$$ \huge \frac{\delta \epsilon{SM}}{\delta \epsilon{cell}} = \frac{T{01} - T{00}}{2(2\epsilon{cell} - 1)^2(T{00} + T_{01})} $$
To test:
This will generate a simple example:
Reviewer
Please comment on the points listed below (full description). Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.
Code Review
Functional Tests
Does everything look good? Mark the review as Approve. A member of
@mantidproject/gatekeepers
will take care of it.Gatekeeper
If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.