From 72431ce6db0090f5ccd96686ee29d41ca1c5f058 Mon Sep 17 00:00:00 2001 From: Jin Igarashi Date: Tue, 9 Apr 2024 15:27:42 +0900 Subject: [PATCH] fix: fixed Weights sum to zero error for rca tool (#89) --- src/cogserver/algorithms/rca.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cogserver/algorithms/rca.py b/src/cogserver/algorithms/rca.py index 8a56a23..d1361c7 100644 --- a/src/cogserver/algorithms/rca.py +++ b/src/cogserver/algorithms/rca.py @@ -80,7 +80,7 @@ def __call__(self, img: ImageData) -> ImageData: #v = data.ptp()*.1 datam = (data > -v) & (data < v) if self.threshold: - datam |= np.abs(data)< self.threshold + datam = datam | np.abs(data)< self.threshold arr = numpy.ma.masked_array(data*100, dtype=self.output_dtype, mask=valid_mask | datam ) return ImageData( arr,