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

demo_script stops at error #4

Closed Vanwalleghem closed 9 years ago

Vanwalleghem commented 9 years ago

Hi,

I am trying my hands on your algorithms, however running the demo_script ends with this error :

Index exceeds matrix dimensions.

Error in update_temporal_components (line 93)
Y = Y(unsaturatedPix,:);

Error in merge_ROIs (line 76)
    cc = update_temporal_components(Y_res(ff,:),A_merged(ff,i),b(ff),median(spdiags(nC,0,length(nC),length(nC))\C(merged_ROIs{i},:)),f,P);

Error in demo_script (line 79)
[Am,Cm,nr_m,merged_ROIs,P,Sm] = merge_ROIs(Y_res,A,b,C,f,P,S);

As far as I can tell, the passed Y_res(ff,:) ends up with ~400 rows, but unsaturedPix is 4795 long should I filter unsaturedPix by ff too ?

Kind regards, Gilles Vanwalleghem

epnev commented 9 years ago

Hi Gilles, Thanks for spotting that. I updated the demo so that it doesn't produce that error. To be completely precise I need to do what you suggested, but the difference in performance should be negligible. Thanks, Eftychios