JaneliaSciComp/JRCLUST

kilosort import with few cells

agbondy opened this issue · 1 comments

We are tracking yields over time in chronic recordings, and this means we intentionally record some sessions when they are very few cells. Kilosort import only imports the "good" channels which in these cases can be very few, even less than 10 channels. This makes a mess of the kilosort import which expects there to be at least nSitesDir.*2 + 1 channels (this is typically 14 in our case). The crash happens at the line shown in the picture below. In words, the crash is happening because the ap_raw.jrc file only has three channels but the detection algorithm is trying to load nSites.*2 + 1 of them. Obviously this is a very nontypical case, but it would be good to have sensible behavior here, nonetheless -- at the very least a human-readable error.

Image from iOS

If you want to try this with the latest string of commits and show me where it's crashing (or send me the data and let me find it myself), I'll get on it.