Suite2P icon indicating copy to clipboard operation
Suite2P copied to clipboard

Stuck in cost-minimization phase

Open bill-connelly opened this issue 7 years ago • 4 comments

Suite2p appears to be stuck on the cost-minimization phase of this recording.

image

Note the ROIs in the corners that are only a few pixels. An hour or three ago, it started with:

21 total ROIs, err 0.5784, thresh 0.0005 37 total ROIs, err 0.5775, thresh 0.0005 52 total ROIs, err 0.5768, thresh 0.0005

Now we're at 678 total ROIs, err 0.5708, thresh 0.0005 681 total ROIs, err 0.5708, thresh 0.0005 684 total ROIs, err 0.5708, thresh 0.0005

In fact, I often find the suite2p creates a few 1 or 2 pixel sized ROIs. Is there a way to prevent this behaviour, (i.e. set minimim ROI size) or simply limit the number of iterations during the cost-minimization?

bill-connelly avatar Aug 30 '17 05:08 bill-connelly

The optimization stops when it finds fewer ROIs than a certain percentage of the first pass. This percentage was set to 1/20 by default. I have now increased it to 1/10. You can set it yourself with ops0.stopSourcery = ??.

I also added a stopping criterion after a certain number of iterations (100 by default, but you can control it with ops.maxIterRoiDetection).

marius10p avatar Aug 30 '17 20:08 marius10p

Hi Marius, can you please also update the Readme-file? On another note, are the text files in the docs folder still valid?

sylviaschroeder avatar Aug 30 '17 20:08 sylviaschroeder

So it's supposed to find FEWER ROIs with every iteration? Mine always goes up.

Anyway, thanks for the changes, will pull the new version and see how it goes.

P.S The result after leaving it running for a further 14 hours. Kinda pretty.

image

bill-connelly avatar Aug 30 '17 23:08 bill-connelly

what diameter setting are you using? The diameter determines the amount of smoothing. That over-segmenting may not happen if you smooth more perhaps?

carsen-stringer avatar Oct 30 '17 20:10 carsen-stringer