As noted in the issue #919, the GDOS cuts computed by MSlice does not agree with that computed by the ComputeIncoherentDOS algorithm although they use in principle the same equations method. In particular there are two steps to the calculation:
Compute a 2D slice GDOS(q,w) = S(q,w) * (E/Q^2) * bose as noted in the docs
Integrate this 2D slice in either Q (only mode supported by ComputeIncoherentDOS) or in E.
The issue is with this second step. This is because the first step produces a RebinnedOutput type workspace which has a (hidden-from-Python) extra weight for each bin. To correctly compute the integration/rebin this weight must be taken into account, but the previous MSlice code simply sums the counts in each bin. Instead it should use the Mantid Rebin2D or Integration algorithms which take into account the fractional weight rather than just a simplistic sum.
To test:
Run the script in the issue and checks that the MSlice and ComputeIncoherentDOS outputs agree.
Plot the slice and change intensity to GDOS and check that interactive plotting works as expected.
Description of work:
As noted in the issue #919, the GDOS cuts computed by MSlice does not agree with that computed by the
ComputeIncoherentDOS
algorithm although they use in principle the same equations method. In particular there are two steps to the calculation:GDOS(q,w) = S(q,w) * (E/Q^2) * bose
as noted in the docsComputeIncoherentDOS
) or in E.The issue is with this second step. This is because the first step produces a
RebinnedOutput
type workspace which has a (hidden-from-Python) extra weight for each bin. To correctly compute the integration/rebin this weight must be taken into account, but the previous MSlice code simply sums the counts in each bin. Instead it should use the MantidRebin2D
orIntegration
algorithms which take into account the fractional weight rather than just a simplistic sum.To test:
Run the script in the issue and checks that the MSlice and
ComputeIncoherentDOS
outputs agree. Plot the slice and change intensity toGDOS
and check that interactive plotting works as expected.Fixes #919.