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 during auto-seeds selection #7

Closed fxpena closed 5 years ago

fxpena commented 5 years ago

Hi Jinghao,

I'm running min1pipe on a video that I already did rigid motion morrection. It is a tif with 18,000 frames and a frame rate of 20 fps. When it gets to the auto-seeds selection it throws the following error

Error using corr (line 91)
Requires a data matrix X.

Error in sig_sim (line 36)
        sigcor = corr(datasmthf');

Error in seeds_merge (line 21)
    corrdata = sig_sim(datasmth, cutoff, pkcutoff, false);

Error in pix_select (line 171)
    [idusef, datasmthf, datusef, cutofff, pkcutofff] = seeds_merge(maxall,
    iduse, datuse, datasmth, cutoff, pkcutoff, sz, corrthres);

What does this mean? I'm guessing that it datasmth turned out to be an empty matrix but I don't know what that means either. Help?

fxpena commented 5 years ago

A similar issue seems to happen with another video.

Index exceeds array bounds.

Error in pix_select (line 134)
    ithres = ctrs(idthres);

Also, before that error was thrown, this warning was thrown.

Warning: Failed to converge in 100 iterations for gmdistribution with 2
components 
> In gmcluster (line 202)
  In gmdistribution.fit (line 102)
  In fitgmdist (line 135)
  In pix_select (line 105)

I think that warning was also thrown for the previous video as well.

JinghaoLu commented 5 years ago

Hi Francisco,

This issue is rarely seen and it is hard to find the cause. I am wondering if it is possible to take a look at a couple of frames of the data (a frame or several) to have an idea of the signal density. You can send it to my email address.

fxpena commented 5 years ago

Hi Jinghao,

This error happened again with a new video, but I can't remember the solution you found last time. Can you remind me? My email address changed so I can't look for those old emails

JinghaoLu commented 5 years ago

Hi Frankie,

I checked the emails and it seems I made some changes to the previous version of the package but I am not sure whether you have tested the new one. If you did then I may need the error message in detail (if there are other types than the one you raised here) or a new sample video.

fxpena commented 5 years ago

The error message was virtually identical. The only difference was that the specific line for in pix_select was different (like 200 instead of 171), but the contents of all of the lines in the error were the same. It's just a different video. I'll send you both the original and sample of just 1000 frames in case the error only happens for the larger version.

fxpena commented 5 years ago

I sent the email to min1pipe2018@gmail.com

NicoGutierrez85 commented 1 year ago

Hi, I am experiencing the same issues. Would you mind sharing what was the solution that you found for this? thanks in advance!

JinghaoLu commented 1 year ago

@NicoGutierrez85 Is the package up to date? Do you still have the same issue?