From f2c681ffba9c5ad1c890e6781c016c0cbeeb432e Mon Sep 17 00:00:00 2001 From: Artur Glavic Date: Mon, 1 Dec 2025 15:28:12 +0100 Subject: [PATCH] Fix wrong squaring of error, as the q-resolution is not an error propagation --- eos/projection.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eos/projection.py b/eos/projection.py index bf8a733..7f1785c 100644 --- a/eos/projection.py +++ b/eos/projection.py @@ -274,8 +274,8 @@ class LZProjection(ProjectionInterface): # error as squar-root of counts and sqrt from normalization (dR/R = sqrt( (dI/I)² + (dW/W)²) dR_q = np.where(fltr, R_q*(np.sqrt(1./(I_q+0.1)+ 1./(W_q+0.1))), np.nan) # q-resolution is the weighted sum of individual points q-resolutions - dq_q = np.histogram(q_lzf, bins = q_q, weights = weights_lzf * dq_lzf**2 )[0] - dq_q = np.where(fltr, np.sqrt(dq_q/W_q), np.nan) + dq_q = np.histogram(q_lzf, bins = q_q, weights = weights_lzf * dq_lzf )[0] + dq_q = np.where(fltr, dq_q/W_q, np.nan) return ProjectedReflectivity(R_q, dR_q, (q_q[1:]+q_q[:-1])/2., dq_q) def plot(self, **kwargs):