Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error variable in IX_dataset sigvar is squared for variance #256

Open
cmarooney-stfc opened this issue Nov 18, 2020 · 2 comments
Open

Error variable in IX_dataset sigvar is squared for variance #256

cmarooney-stfc opened this issue Nov 18, 2020 · 2 comments
Labels
Design Task relating to project design

Comments

@cmarooney-stfc
Copy link
Collaborator

wout = sigvar(w.signal_, (w.error_).^2);

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.

@tgperring
Copy link
Collaborator

In the Herbert objects IX_data_1d, IX_data_2d etc., which inherit the abstract class IX_dataset, 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.

@cmarooney-stfc
Copy link
Collaborator Author

@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.

@oerc0122 oerc0122 added the Design Task relating to project design label Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Design Task relating to project design
Projects
None yet
Development

No branches or pull requests

3 participants