From e3ddf909e9103e49a4eebafbc0bd5b5e00e58812 Mon Sep 17 00:00:00 2001 From: James Beilsten-Edmands <30625594+jbeilstenedmands@users.noreply.github.com> Date: Mon, 18 Nov 2024 14:24:39 +0000 Subject: [PATCH] Update text descriptions and reference --- src/dials/algorithms/symmetry/cosym/__init__.py | 2 +- src/dials/algorithms/symmetry/cosym/target.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dials/algorithms/symmetry/cosym/__init__.py b/src/dials/algorithms/symmetry/cosym/__init__.py index 1a913d066c..de6f47c17a 100644 --- a/src/dials/algorithms/symmetry/cosym/__init__.py +++ b/src/dials/algorithms/symmetry/cosym/__init__.py @@ -93,7 +93,7 @@ .help = "If not None, a weights matrix is used in the cosym procedure." "weights=count uses the number of reflections used to calculate a pairwise correlation coefficient as its weight" "weights=standard_error uses the reciprocal of the standard error as the weight. The standard error is given by" - "(1-CC*2)/sqrt(n-2), where (n-2) are the degrees of freedom in a pairwise CC calculation." + "(1-CC*2)/sqrt(N), where N=(n-2) or N=(neff-1) depending on the cc_weights option." cc_weights = None sigma .type = choice .help = "If not None, a weighted cc-half formula is used for calculating pairwise correlation coefficients and degrees of" diff --git a/src/dials/algorithms/symmetry/cosym/target.py b/src/dials/algorithms/symmetry/cosym/target.py index 538a7ea6e8..f9de7921f0 100644 --- a/src/dials/algorithms/symmetry/cosym/target.py +++ b/src/dials/algorithms/symmetry/cosym/target.py @@ -179,8 +179,9 @@ def __init__( is to use no weights. If "count" is set, then weights are equal to the number of pairs of reflections used in calculating each value of the rij matrix. If "standard_error" is used, then weights are defined as - :math:`w_{ij} = 1/s`, where :math:`s = \sqrt{(1-r_{ij}^2)/(n-2)}`. - See also http://www.sjsu.edu/faculty/gerstman/StatPrimer/correlation.pdf. + :math:`w_{ij} = 1/s`, where :math:`s = (1-r_{ij}^2)/sqrt(N)`. + Where N=(n-2) or N=(neff-1) depending on the cc_weights option. + See also https://doi.org/10.1525/collabra.87615. min_pairs (int): Only calculate the correlation coefficient between two datasets if they have more than `min_pairs` of common reflections. lattice_group (cctbx.sgtbx.space_group): Optionally set the lattice