Computational toolbox for large scale Calcium Imaging Analysis, including movie handling, motion correction, source extraction, spike deconvolution and result visualization.
Currently, in the method OnACID._prepare_object , d1 and d2 are only set when self.is1p is true, but are only used if the parameter online['use_corr_img'] is true. I was trying to run it withuse_corr_imgbut without setting the other parameters in a way that causesis1p` to be true, so I got an unbound local error.
Since these variables are only used in one place in this function, I just moved the line that defines them to be right before they are used. I'm not 100% sure the functionality is correct, but the line just reads from estimates.dims, which seems pretty straightforward.
Type of change
Please delete options that are not relevant.
[x] Bug fix (non-breaking change which fixes an issue)
Has your PR been tested?
Did not run the tests myself (relying on CI) but I did check that making this change prevented the error I was getting when trying to call fit_online with these parameters.
Description
Currently, in the method
OnACID._prepare_object
,d1
andd2
are only set whenself.is1p
is true, but are only used if the parameteronline['use_corr_img'] is true. I was trying to run it with
use_corr_imgbut without setting the other parameters in a way that causes
is1p` to be true, so I got an unbound local error.Since these variables are only used in one place in this function, I just moved the line that defines them to be right before they are used. I'm not 100% sure the functionality is correct, but the line just reads from
estimates.dims
, which seems pretty straightforward.Type of change
Please delete options that are not relevant.
Has your PR been tested?
Did not run the tests myself (relying on CI) but I did check that making this change prevented the error I was getting when trying to call
fit_online
with these parameters.