spikeinterface icon indicating copy to clipboard operation
spikeinterface copied to clipboard

si.extract_waveforms don't compute templates if folder exists

Open DradeAW opened this issue 3 years ago • 0 comments

Hi,

I came across a (not very likely) scenario where an unintended behaviour happens.

If you call si.extract_waveforms(..., load_if_exists=True, precompute_template=("average", )), and the folder already exists but the file templates_average.npy is missing, then it will not precompute the templates.

In my case it was relevant because SpikeInterface crashed during the templates computation due to a "too many open files error". But I guess it can also be relevant if someone adds another template mode (e.g. median) and the folder already exists.

DradeAW avatar Sep 01 '22 09:09 DradeAW