flatironinstitute / CaImAn-MATLAB

Complete Matlab pipeline for large scale calcium imaging data analysis
GNU General Public License v2.0
252 stars 147 forks source link

Error When running pipeline script #63

Closed vd2309 closed 7 years ago

vd2309 commented 7 years ago

Hello @epnev

I run into this error when running the pipeline script.

Error using dftregistration_min_max (line 102) Matrix dimensions must agree. Error in normcorre_batch (line 245) parfor ii = 1:lY Error in run_pipeline (line 28) [M,shifts,template] = normcorre_batch(fullname,options_nonrigid,template);

The issue is with this line in dftregistration_min_max buf_prod = buf1ft.*conj(buf2ft);

the matrix dimensions of buf1ft and buf2ft do not agree. I put in commands to display the size of buf1ft and buf2ft and I see that they do not match and cannot be multiplied.

I wonder if there is something wrong with how I am running the pipeline or with my input- it is a tiff movie- or is it something else?

Thanks very much! Your code is great! Virginia

epnev commented 7 years ago

Hi @vd2309 can you give me a bit more info? What are the dimensions of buf1ft, buf2ft? What is the size of the file indexed by fullname? What is the size of the template if you're using one?

vd2309 commented 7 years ago

Hi @epnev

Thanks for getting back! The size of fullname is 1 by 52 the size of buf1ft is 929 by 1000 the size of buf2ft is 560 by 800

We are not using a template.

Thanks very much!

epnev commented 7 years ago

@vd2309 I was asking for the size of the dataset that you're trying to correct.

Are you trying to correct just one movie or more than one? run_pipeline will search in a folder for all the .tif movies and then try to correct them one by one, using the template derived from one movie to correct the next. If you have more than one tiff files in your folder make sure that they are from the FOV and have the same size in terms of imaged pixels

vd2309 commented 7 years ago

Hi @epnev Of course, that was silly of me- thought our file was corrupted or something. Yes I will try just running normcore instead of normcore batch and get back to you. Am assuming normcore is for just one file?

Thanks very much! Virginia

epnev commented 7 years ago

@vd2309 both normcorre and normcorre_batch run on a single file at a time. It's just that on run pipeline there are inside a for loop that goes over all the tif files that are in the folder you're using.