cortex-lab / Suite2P

Tools for processing 2P recordings
Other
121 stars 66 forks source link

Error during registration #69

Closed tiago-nyc closed 7 years ago

tiago-nyc commented 7 years ago

Hello

Thanks for making this code available. I'm trying to run it for the first time and I hit this error message when trying to register a single channel tif acquired with ScanImage. Image size is 512x128x3225. Any idea why this could be? Using Matlab R2012b.

Tiago

bi-directional scanning offset = 0 pixels
Error using repmat
Too many input arguments.

Error in kernelD (line 23)
    xp = repmat(xp0,1,1,mM);

Error in regoffKriging (line 67)
    Kx = kernelD(xt,xt,sigL*[1;1]);

Error in GetRegOffsets (line 25)
        [ds, Corr]  = regoffKriging(dat, ops1{i,l}, 0);

Error in reg2P (line 202)
            [dsall, ops1] = GetRegOffsets(data, k, j,
            iplane0, ops, ops1);

Error in run_pipeline (line 56)
        ops1 = reg2P(ops);  % do registration

Error in master_file (line 68)
    run_pipeline(db(iexp), ops0);
carsen-stringer commented 7 years ago

Hey Tiago, I've never seen this error before. Is mM somehow an array instead of a single number? Could you put a breakpoint there and tell me what the size of those variables are please?

tiago-nyc commented 7 years ago

Thanks for your quick reply. mM seems to be an integer (49). xp0 is a <2x49 double>. If I run xp = repmat(xp0, 1,1,mM); I get a "too many input arguments" error.

Tiago

size(xp0)

ans =

     2    49

mM  = 49
carsen-stringer commented 7 years ago

Perhaps matlab 2012's repmat works differently? Can you copy the output of 'help repmat' here?

I would recommend upgrading your matlab if this is possible, we have tested most of the code on 2015 and above.

tiago-nyc commented 7 years ago

You are absolutely right. Upgrading to R2017a solved the problem. Thank you for your quick help and again, thank you for making this code available.