error bars after merging in ccl integrate #46
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Created by: rsibille-psi
I merge the following data (experiment 20211529):
files 8662 and 8674
Just by looking visually, the error bars are much larger after merging, while obviously they should get smaller when increasing the statistics...
Created by: ivan-usov
@rsibille-psi , true, there is an error in the code (a missing divider), however, thinking a bit more about how the calculation of average in this case should be done properly, it might not be as trivial. Probably, there is a simple way to calculate statistics for neutron counts I'm just not aware of.
After the fix of that issue we would use an average for the number of counts
(counts1 + counts2 + ...) / N
andsqrt(sigma1^2 + sigma2^2 + ...) / N
for the error of that average (currently, dividing byN
is missing forsigma
). However, for the situation with differentsigma
values for the same measurement, the direct averaging might not be the most right approach, see for example https://physics.stackexchange.com/a/452809Created by: rsibille-psi
thanks!
In our case, we assume (and it's correct unless there is a problem with the instrument motors or temperature etc) that the error is purely statistical on counting, not related to uncertainties.
Therefore we should simply have
counts = (counts1 + counts2 + ...)/N
error = sqrt((counts1 + counts2 + ...)/N)
Created by: ivan-usov
OK, but if I understood it correctly, this way will not lead to a statistic improvement. For example, assume we have 2 measurements at the same motor position, both with 100 counts. Each individual measurement will have an
error = sqrt(100) = 10
, at the same time, based on your formula, theiraverage error = sqrt((100+100)/2) = 10
. And this will be true for any number of averaged measurements. Does it make sense to implement it this way?Created by: rsibille-psi
sorry.... I positioned the parenthesis wrongly.
it should be:
counts = (counts1 + counts2 + ...)/N
error = sqrt((counts1 + counts2 + ...))/N
Created by: ivan-usov
pyzebra test server is restarted with the fix
Created by: rsibille-psi
thank you Ivan !
Created by: rsibille-psi
I just checked merging exactly the same scans with our old tool "fit", and the results are now exactly the same.
So I think this fix can also go on the main server.
Thank you!
Created by: ivan-usov
The main server is updated and restarted