flatironinstitute / CaImAn

Computational toolbox for large scale Calcium Imaging Analysis, including movie handling, motion correction, source extraction, spike deconvolution and result visualization.
https://caiman.readthedocs.io
GNU General Public License v2.0
640 stars 370 forks source link

Question/issue with register_multisession #1368

Closed JohnStout closed 4 months ago

JohnStout commented 5 months ago

This would be the most up-to-date version of CaImAn. This may or may not be an issue, but it pertains to calling register_multisession with more than 2 sessions.   I noticed in the register_multisession code, you run a for loop over sessions, calling register_ROIs. When calling register_ROIs, you define A1 as A[sess] and A2 as A_union, which A_union=A[0].copy(). What is confusing is why we would then call template1 as templates[sess] and template2 as templates[sess-1] (see screenshot). Why wouldn't we define template2 as templates[0] given that A1 is indirectly defined as A[0].copy()?

Screenshot 2024-06-28 113927

JohnStout commented 5 months ago

Ignore this. It seems it is because the A_union is changing.