cortex-lab / Suite2P

Tools for processing 2P recordings
Other
120 stars 65 forks source link

Running more iterations for cell extraction #145

Closed cmketchmark closed 5 years ago

cmketchmark commented 5 years ago

Hello, We are trying to run the cell extraction with more iterations by setting ops.stopSourcery lower. Our problem is that we cannot locate the variable ops.stopSourcery. Where would I find this variable? Thank you!

marius10p commented 5 years ago

This is the stopping criterion in line 224 of sourcery:

if (numel(ind)<Nfirst * getOr(ops, 'stopSourcery', 1/10)) || (iter>= getOr(ops, 'maxIterRoiDetection', 100)) break; end

You can set it anywhere (ops.stopSourcery, or db(n).stopSourcery). It's a fraction of the cells found on the first iteration. Fyi, processing will also stop when the maximum correlation peak is below an automatically determined threshold. You can lower this threshold with a scaling variable called ops.ThScaling, which is 1 by default.

I will be making a major update later this week to bring the cell detection algorithm in line with the final version (and equivalent to the recent Python release). That will further increase its performance a little bit, and I will document these settings a little better at that time.

marius10p commented 5 years ago

Let me know if you need more help. Closing issue for now.