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: 'Array indices must be positive integers or logical values.' #60

Open cpernici opened 3 years ago

cpernici commented 3 years ago

Hi,

I get the following error when I try to open videos I recorded from Miniscope V4:

Array indices must be positive integers or logical values.

Error in data_info (line 20) ids = ids(end);

Error in min1pipe (line 68) [path_name, file_base, file_fmt] = data_info;

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

Not sure what is going on...

JinghaoLu commented 3 years ago

Not sure what is going on either.

It seems at least you are not using the latest version based on what is on line 20 of data_info.m.

zz-rezaei commented 3 years ago

Hi, I am encountering the same error. I am using .avi video (ffv1 output of UCLA miniscope V4). I also converted it to grey but I am still getting the same error. I would appreciate any suggestion.

JinghaoLu commented 3 years ago

Hi @zz-rezaei it seems you are not using the uncompressed output format directly from the miniscope? Then a quick solution might be that you use whatever way (perhaps matlab built-in VideoReader) to load the video into matlab, save it as a .mat file (you can refer to the Readme file of MIN1PIPE) and then run MIN1PIPE using the .mat file you just created. For later data acquisitions you may want to use uncompressed output video format so that MIN1PIPE can handle.

zz-rezaei commented 3 years ago

Thank you Jinghao! Before running MIN1PIPE using .mat file, I used the uncompressed output format directly from the miniscope (GREY format) as you suggested, and it worked.

JinghaoLu commented 3 years ago

@zz-rezaei Sounds great!