flatironinstitute / CaImAn-MATLAB

Complete Matlab pipeline for large scale calcium imaging data analysis
GNU General Public License v2.0
252 stars 147 forks source link

greedyROI: clrear data matrix, avoid out-of-memory in nnmf call #65

Closed YishGene closed 7 years ago

YishGene commented 7 years ago

The local copy of the data matrix Y can be cleared before calling nnmf for the background(s). In greedyROI_corr this avoids an out-of-memory crash during one of the matrix division operations in some of my datasets; in greedyROI I haven't found that to happen, but clearing the local variable shouldn't cause issues. Actually I can't say I understand why matlab's garbage collector doesn't take care of it.

epnev commented 7 years ago

thanks!