From 61fff86ead8ef72ba3b6ec3c7736994cbe9addbc Mon Sep 17 00:00:00 2001 From: Ethan Blackwood Date: Thu, 8 Aug 2024 22:41:29 -0400 Subject: [PATCH] Fix unbound local error in online_cnmf --- caiman/source_extraction/cnmf/online_cnmf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/caiman/source_extraction/cnmf/online_cnmf.py b/caiman/source_extraction/cnmf/online_cnmf.py index c84ec3f5a..55b2828ba 100644 --- a/caiman/source_extraction/cnmf/online_cnmf.py +++ b/caiman/source_extraction/cnmf/online_cnmf.py @@ -270,7 +270,6 @@ def _prepare_object(self, Yr, T, new_dims=None, idx_components=None): if self.is1p: estim = self.estimates - d1, d2 = estim.dims estim.Yres_buf -= estim.b0 if ssub_B == 1: estim.Atb = estim.Ab.T.dot(estim.W.dot(estim.b0) - estim.b0) @@ -389,6 +388,7 @@ def get_indices_of_pixels_on_ring(self, pixel): else: Yres -= estim.upscale_matrix.dot(estim.W.dot( estim.downscale_matrix.dot(Yres))) + d1, d2 = self.estimates.dims Yres = Yres.reshape((d1, d2, -1), order='F') (self.estimates.first_moment, self.estimates.second_moment,