JinghaoLu / MIN1PIPE

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

Interpolation issue with interp1 #74

Closed SelenaLG closed 2 months ago

SelenaLG commented 2 months ago

I catch an error concerning interp1 during I was running minipipe.p. Capture d'écran 2024-06-18 170515

I don't understand really well interpolation and there is no official documentation for this function. Some errors were reported on Matlab forum concerning this function but it is on other errors.

JinghaoLu commented 2 months ago

This is usually not the issue with interp1 (btw interp1 is a matlab function so there is a document on it), but something in your data. For example, you can check if your video contains some dead bright pixel, and perhaps the preprocessing steps does not return correct result because of this.

SelenaLG commented 2 months ago

Yes, I found the origin of the issue. accor is full of Nan at a moment so ~isnan(acorr) become a matrix full of zeros. And I don't know how find function supports this case because I tried to display ids and nothing appear (no display and no error) but I think it becomes something like None in Python. And it causes the error.

What is the best way to manage this case ?

JinghaoLu commented 2 months ago

You can check the output .mat file **_reg.mat, and see if variable reg contains valid preprocessed frames. Also you need to first make sure if you have all the dependent toolboxes installed.

SelenaLG commented 2 months ago

So I just forgot to install some toolboxes 😅, now it runs well !