cortex-lab / Suite2P

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

ARPACK error #91

Closed nycPD closed 6 years ago

nycPD commented 7 years ago

Any idea how to adjust the parameters to overcome this error?

Error using eigs/processEUPDinfo (line 1280) Error with ARPACK routine dneupd: dnaupd did not find any eigenvalues to sufficient accuracy.

marius10p commented 7 years ago

Hmm, this sounds like something went wrong before this eigs call, which is probably due to a matrix with Infs, or NaNs, or just empty (can you check what matrix goes into this call please? try dbstop if error for example, or just set a debug stop point just before the error).

Perhaps there are some Infs or NaNs accumulated somewhere along the way, or even in the raw data? Try to inspect the registered tiffs, or at least the registration target (ops.mimg), to find the earliest time at which something went wrong.

nycPD commented 7 years ago

You are right- it seems that COV is filled with NaN. Since COV is generated from the mov variable, I looked in there and saw that there is at least one row of NaNs in mov. I am not sure why this row of NaN is appearing. Also I should mention that I am only experiencing this issue on certain datasets, others are running perfectly fine and look good.

Thanks so much for any help!!

marius10p commented 7 years ago

How did you make your tiffs? Could it be that the tiffs have NaNs to begin with (is this even possible?) ?

I don't think there is any step in Suite2p that could introduce NaNs before cell detection, but maybe you found one? You would need to find the earliest time when a NaN is introduced, so set this flag first in Matlab:

dbstop if naninf

and please let me know where it stops.

nycPD commented 7 years ago

Thank you so much for your help. The NaN shows up when mov is being generated:

% normalize pixels by noise variance mov = bsxfun(@rdivide, mov, sdmov(:)); model.sdmov = sdmov;

carsen-stringer commented 6 years ago

Sorry for the delay on this, I've set a minimum value for sdmov now (1e-10), so this shouldn't output NaN's. Let me know if you still get an error.