JinghaoLu / MIN1PIPE

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

Unrecognized function or variable 'n_v'. #63

Open JosephGreene opened 2 years ago

JosephGreene commented 2 years ago

I've been trying to run Min1pipe and Min1pipe HPC from the demo script on some collected calcium data but in both functions I encounter an error where the code can't identify this variable. For Mini1pipe, it occurs in the parfor loop of intra_section function (line 76) and it references that my working cannot find it. In HPC, it occurs in the graph function on line 68. Does anyone know what this variable is tied to? I tried digging around without much luck. Thanks in advance for your help!

JinghaoLu commented 2 years ago

Hi please provide the specific error message of the problem (matlab throws the issue based on the for loop the issue resides but the exact issue may happen anywhere within that loop). This has never been observed to my knowledge so I need more info regarding it.

JosephGreene commented 2 years ago

Hi @JinghaoLu of course! Here's the error message matlab encounters, plus the last few messages so you know where in the pipeline this is occuring. What's odd is I can run the same code on my personal computer and have it execute much better.

Begin initial computation of translation score computed score of frame #420/2100 computed score of frame #1050/2100 computed score of frame #210/2100 computed score of frame #840/2100 computed score of frame #630/2100 computed score of frame #1260/2100 computed score of frame #1470/2100 computed score of frame #1680/2100 computed score of frame #1890/2100 computed score of frame #2100/2100 Done initialization, 711.8863 seconds Begin intra-section Unrecognized function or variable 'n_v'.

Error in graph (line 68) G.vweight = ones(1,n_v);

Error in lk_loop (line 93) sgraph1 = graph(aa, 'upper');

Error in lk_ld_hier (line 47) [mxlkloop, xflkloop, idlkloop] = lk_loop(mxalla, pixs, scl, maskc);

Error in intra_section (line 79) [mxcur, xfcur, ldcur, idcur] = lk_ld_hier(regtcur, [], pixs, scl, sigma_x, sigma_f, sigma_d, sclld, maskc); %%% lk_loop+lk_cluster+logdemons_loop %%%

Error in frame_reg (line 92) m = intra_section(m, stt, stp, pixs, scl, sigma_x, sigma_f, sigma_d, flag, maskc);

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

Error in demo_min1pipe (line 14) [fname, frawname, fregname] = min1pipe(Fsi, Fsi_new, spatialr, se, ismc, flag);

JinghaoLu commented 2 years ago

Hi @JosephGreene, I checked the graph function in matlab and found there is no such calling at line 68. I guess the graph function in your path with the top calling priority is something different than the matlab built-in graph.m.