flatironinstitute / CaImAn-MATLAB

Complete Matlab pipeline for large scale calcium imaging data analysis
GNU General Public License v2.0
252 stars 147 forks source link

another glitch in the demo script #14

Closed urslu closed 8 years ago

urslu commented 8 years ago

Hi, I came across another error in the demo script. In the repeat block, update_spatial_components does not return the temporal components. This creates an unequal number of spatial and temporal components if the number of spatial components changes during the update because some were empty. Consequently update_temporal_components will fail. Also in that case K_m does not have the correct value anymore. Changing line 80 to: [A2,b2,Cm] = update_spatial_components(Yr,Cm,f,Am,P,options); and line 86 to: [C_df,~,S_df] = extract_DF_F(Yr,[A_or,b2],[C_or;f2],S_or,size(C_or,1)+1); fixes the issue

epnev commented 8 years ago

@urslu Thanks a lot! I updated the demo.