cortex-lab / Suite2P

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

could not find any tif or tiff #81

Closed bill-connelly closed 6 years ago

bill-connelly commented 7 years ago

My tiff is in the folder: G:\test\32645\2017-07-27\1 %i.e. G:\test\MouseName\Date\Exp

My make_db file is

i = 0; i = i+1; db(i).mouse_name = '32645'; db(i).date = '2017-07-27'; db(i).expts = [1]; db(i).diameter = 12;

The relevant parts of my master_file is:

% root paths for files and temporary storage (ideally an SSD drive. my SSD is C:/) ops0.RootStorage = 'G:/test/'; % Suite2P assumes a folder structure, check out README file ops0.temp_tiff = 'G:/temp/temp.tif'; % copies each remote tiff locally first, into this file ops0.RegFileRoot = 'G:/temp/'; % location for binary file ops0.DeleteBin = 1; % set to 1 for batch processing on a limited hard drive ops0.ResultsSavePath = 'G:/temp/F'; % a folder structure is created inside ops0.RegFileTiffLocation = 'G:/temp/'; % leave empty to NOT save registered tiffs (slow)

I then run:

make_db master_file

And I get the error "could not find any tif or tiff"

What am I doing wrong?

Thanks

marius10p commented 7 years ago

This might have to do with the default master_file calling another make_db file, thus overwriting your initial call. We typically change the master_file to run the correct make_db, and make all our customizations in there.

tvajtay commented 7 years ago

I am also experiencing this issue, while debugging build_ops3.m has the correct path to my .tif files but, it doesn't detect any tiff files in the directory.

Initially the issue was that the wrong make_db.m file was being called but even after fixing that and confirming that db.expts and file path were correct it was still reporting "Could not find any tif"

bill-connelly commented 7 years ago

@tvajtay I found that all those problems went away when I kept my file sizes below 4gigs. ImageJ does bad things when it saves files above that size. I don't know if this is your problem, but worth a try anyway.

tvajtay commented 7 years ago

@bill-connelly Ultimately the error was me not replacing one of the path strings in the master_file.m. So I was a bit of a dunce.

However after I fixed that it did crash again, but this time due to a memory overflow. I'm going to see if we can run it on a nicer machine or if we ultimately have to break apart the movies. Our movie sizes are about 2-3 GB but I think that's too much data for Matlab to load into memory.

marius10p commented 7 years ago

We do use 2 GB tiffs routinely ourselves. If there is an issue, it's likely easily fixable, so please let me know,

tvajtay commented 7 years ago

@marius10p I was able to run Suite2p successfully using a small 19MB video. I tried running a tiff stack of 860MB and got the following error in Matlab.

>> master_file
running rigid registration
bi-directional scanning offset = 1 pixels
Error using fft
Out of memory. Type HELP MEMORY for your options.

Error in fft2 (line 24)
        f = fft(fft(x,[],2),[],1);

Error in regoffKriging (line 92)
    corrMap = fft2(bsxfun(@plus, maskOffset,
    bsxfun(@times, maskMul, batchData)));

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

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

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

Error in master_file (line 89)
    run_pipeline(db, ops0);

The tiff stack is 796x512 pixels and 1070 frames, 16 bit The machine has 8GB of RAM

*Edit- Closed down everything but Matlab and it looks like it is chugging along. It took about 20 minutes to do the rigid registration and bi-directional scanning. And then easily another 30-45 minutes to calculate the first ROI's at the lowest error. (471 ROI's) idk if this perhaps too many?

carsen-stringer commented 7 years ago

are you still having this issue? with the ROIs not converging?

carsen-stringer commented 6 years ago

Please reopen this issue if you are still having problems, thanks