Skip to content

Commit 936b363

Browse files
committed
Updated weighting strategy after looking at more datasets.
1 parent e14b321 commit 936b363

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/dials/algorithms/refinement/weighting_strategies.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -99,26 +99,15 @@ def calculate_weights(self, reflections):
9999

100100

101101
class TOFWeightingStrategy(StatisticalWeightingStrategy):
102-
"""Defines a single method that provides a ReflectionManager with a strategy
103-
for calculating weights for refinement. This version uses statistical weights
104-
for X and Y and a fixed constant for the delta Psi part, defaulting to 1000000"""
105-
106102
def __init__(self):
107103
pass
108104

109105
def calculate_weights(self, reflections):
110-
"""Include weights for DeltaPsi"""
111106

112-
# call parent class method to set X and Y weights
113107
reflections = super().calculate_weights(reflections)
114108

115109
wx, wy, _ = reflections["xyzobs.mm.weights"].parts()
116-
wavelength_var = (
117-
reflections["wavelength"]
118-
- sum(reflections["wavelength"]) / len(reflections)
119-
) ** 2
120-
wz = 1 / wavelength_var
121-
wz = wy * 1260000
110+
wz = flex.sqrt(wx * wx + wy * wy) * 1e7
122111
reflections["xyzobs.mm.weights"] = flex.vec3_double(wx, wy, wz)
123112

124113
return reflections

0 commit comments

Comments
 (0)