Dear CCTBX developers, I have a question about the method in CCTBX to calculate sigma(averaged I) when merging. In cctbx/miller/merge_equivalents.h (line 594 in phenix-dev-1148), sigma(averaged I)^2 will be calculated by max(mv.gsl_stats_wvariance()/values.size(), 1/mv.sum_weights()). It takes maximum value of the two options. I know the latter equation - this is just sigma(averaged I)^2 = 1/sum(w), where w = 1/sigma(I)^2. And I believe this equation is widely used in other crystallographic programs e.g. XDS. The former is, according to the comment in the code, the emulation of gsl_stats_wvariance, and we can find the information from gsl website: http://www.gnu.org/software/gsl/manual/html_node/Weighted-Samples.html I don't know how this "wvariance" is derived. Is it a better estimate of sigma(averaged I)? Why does it take the maximum from the two options? I would like to know the theory of this sigma calculation in CCTBX. Best regards, Keitaro