From 929248777bef6a2a47ea328c6ff628be8b1e63ba Mon Sep 17 00:00:00 2001 From: Giulio Gaio <giulio.gaio@elettra.eu> Date: Tue, 1 Feb 2022 09:38:08 +0100 Subject: [PATCH] Fixed an if --- src/CalcStats.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CalcStats.py b/src/CalcStats.py index 9e0f069..f46c966 100755 --- a/src/CalcStats.py +++ b/src/CalcStats.py @@ -812,7 +812,7 @@ class DeviceObj: self.corr[t_idx] = np.corrcoef(sensor_array,target_array)[0,1] # low pass filter correlation # if data is 0/inf/NaN keep the previous value in order to avoid corrupting the filtered value (check) - if (self.corr[t_idx] == 0) or np.isnan(self.corr[t_idx]) or np.isinf(self.corr[t_idx]) + if (self.corr[t_idx] == 0) or np.isnan(self.corr[t_idx]) or np.isinf(self.corr[t_idx]): self.lp_filter_corr[t_idx] = self.old_lp_filter_corr[t_idx] else self.old_lp_filter_corr[t_idx] = self.lp_filter_corr[t_idx]; -- GitLab