diff --git a/VERSION b/VERSION index b0dd75320..2ee4474a1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.10.9 +1.10.10 diff --git a/caiman/source_extraction/cnmf/estimates.py b/caiman/source_extraction/cnmf/estimates.py index c5889eb6e..f07df4e3b 100644 --- a/caiman/source_extraction/cnmf/estimates.py +++ b/caiman/source_extraction/cnmf/estimates.py @@ -1059,6 +1059,10 @@ def evaluate_components(self, imgs, params, dview=None): logging.warning('NaN values detected for trace SNR in {}'.format(np.where(np.isnan(SNR_comp))[0]) + '. Changing their value to 0.') SNR_comp = np.where(np.isnan(SNR_comp), 0, SNR_comp) + if np.any(np.isinf(SNR_comp)): + logging.warning('inf values detected for trace SNR in {}'.format(np.where(np.isinf(SNR_comp))[0]) + + '. Changing their value to 0.') + SNR_comp = np.where(np.isinf(SNR_comp), 0, SNR_comp) self.SNR_comp = SNR_comp self.r_values = r_values self.cnn_preds = cnn_preds