Open cmarooney-stfc opened 4 years ago
In the Herbert objects IX_data_1d, IX_data_2d etc., which inherit the abstract class IXdataset, the property 'error ' is the standard error i.e. standard deviation, not the variance. [This is in contrast to sqw, d0d, d1d,... objects in Horace, where the corresponding property is the variance.] The argument that needs to be passed to the sigvar constructor is the variance. This is why in the code snippet you have quoted w.error is squared. So all is OK.
@tgperring This is good, thank you. As we regularly pass data w.s w.e where w.e is variance, it could be good to think of a way to highlight the exceptions to this rule. I did fix something in noisify where the error was squared on processing - hopefully that was a valid fix in the light of this comment.
https://github.com/pace-neutrons/Herbert/blob/c1593757d975e228a8c008a85d355f0d9245c150/herbert_core/utilities/classes/%40IX_dataset/sigvar.m#L8
Code is "out = sigvar(w.signal, (w.error).^2);"
On the assumption that error is always variance, it looks wrong that the error is squared.