From c17c9f8c5cea1b62aedfa1c536a2bde391f52018 Mon Sep 17 00:00:00 2001 From: JSKenyon Date: Fri, 13 Jan 2023 11:30:09 +0200 Subject: [PATCH] Generate robust weights for points excluded by UV-cut. --- quartical/weights/robust.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quartical/weights/robust.py b/quartical/weights/robust.py index c86ee66b..29507f89 100644 --- a/quartical/weights/robust.py +++ b/quartical/weights/robust.py @@ -31,7 +31,7 @@ def impl(residuals, flags, etas, icovariance, mode): for r in range(n_row): for f in range(n_chan): - if flags[r, f]: + if flags[r, f] == 1: n_unflagged -= 1 continue else: @@ -90,7 +90,7 @@ def impl(residuals, flags, etas, icovariance, dof, mode): for r in range(n_row): for f in range(n_chan): - if flags[r, f]: + if flags[r, f] == 1: continue else: numerator = dof + n_corr # Not correct for diagonal terms. @@ -169,7 +169,7 @@ def dof_constant(etas, flags, dof, n_corr): constant = 0 for r in range(n_row): for f in range(n_chan): - if flags[r, f]: + if flags[r, f] == 1: n_unflagged -= 1 continue else: @@ -217,7 +217,7 @@ def mean_weight(weights, flags): for r in range(n_row): for f in range(n_chan): - if flags[r, f]: + if flags[r, f] == 1: n_unflagged -= 1 continue else: