JinghaoLu / MIN1PIPE

A MINiscope 1-photon-based Calcium Imaging Signal Extraction PIPEline.
GNU General Public License v3.0
56 stars 25 forks source link

Error using griddedInterpolant #35

Open cathefly opened 4 years ago

cathefly commented 4 years ago

Hi Jinghao, Thank you so sharing this amazing pipeline for calcium imaging analysis. I git clone the Min1pipe package and run demo_min1pipe or min1pipe scripts, but both scripts throw with similar error like below when I run the demo video shipped with Min1pipe.

Any idea how to fix it? Thanks a lot.

run min1pipe Overwrite raw .mat file (data)? (y/n)y Begin collecting datasets info Done collecting datasets info, time: 2.2297 Begin data cat 100 200 300 400 500 Done data cat, time: 3.0079 Overwrite neural enhanced & registrated .mat file (data)? (y/n)y Begin dirts clean #1/1 batch Done frame #100/500 Done frame #400/500 Done frame #200/500 Done frame #500/500 Done frame #300/500 Done dirts clean #1/1 batch Begin anisotropic diffusion #1/1 batch done frame #400/500 done frame #500/500 done frame #100/500 done frame #300/500 done frame #200/500 Done anisotropic diffusion #1/1 batch Begin background removal #1/1 batch Done frame #500/500 Done frame #300/500 Done frame #100/500 Done frame #400/500 Done frame #200/500 Done background removal #1/1 batch Begin saving Ydebg #1/1 batch Done saving Ydebg #1/1 batch Elapsed time is 2.656090 seconds. Done neural enhancing, time 2.6969 Done noise suppression, time 38.6071 Using GPU Device #1 Total Memory: 5130484121 Begin initial computation of translation score computed score of frame #50/500 computed score of frame #100/500 computed score of frame #150/500 computed score of frame #200/500 computed score of frame #350/500 computed score of frame #250/500 computed score of frame #300/500 computed score of frame #400/500 computed score of frame #450/500 computed score of frame #500/500 Error using griddedInterpolant Interpolation requires at least two sample points in each dimension.

Error in interp1 (line 151) F = griddedInterpolant(X,V,method);

Error in get_trans_score (line 91) acorr(idss) = interp1(ids, acorr(ids), idss, 'pchip', 'extrap');

Error in frame_reg (line 80) acorr(max(1, idbatch(i) - 1): idbatch(i + 1) - 2) = get_trans_score(tmp, [], 1, 1, mq, maskc);

Error in min1pipe (line 108) [m, corr_score, raw_score, scl] = frame_reg(m, imaxy, se, Fsi_new, pixs, scl, sigma_x, sigma_f, sigma_d);

Error in run (line 91) evalin('caller', strcat(script, ';'));

JinghaoLu commented 4 years ago

I guess you have key toolbox in matlab left uninstalled. You can take a look at the required toolbox list.

cathefly commented 4 years ago

Thank you. Indeed computer vision toolbox was not installed and I will try it out.

jerempaz commented 3 years ago

Hi ! Did you manage to solve to problem ? I have exactly the same issue but I have all the packages already installed...

JinghaoLu commented 3 years ago

@jerempaz I suggest to set a breakpoint at line 62 of get_trans_score.m and then proceed (comment out try and catch structure) to see what caused problem, if not toolbox issue. In this error, it seems that for each slice of the loop there was a problem caught by the structure.