Skip to content

Coincidence detection/ artifact removal for tetrode data #1009

@MKirschhock

Description

@MKirschhock

Hi,
I am trying to use KS4 to sort ~2h long recordings from a 16-tetrode drive (64 channels) from freely behaving animals. Since I’m only getting started, can someone check if the changes from the default settings make sense/ are not completely off? I only changed what was recommended for tetrodes, and I know to tweak I should attach Phy screenshots – this is only to make sure that I don’t start with fundamentally wrong settings.
In short: Data is sampled at 32 kHz, I use 6s batches, no motion correction, CAR and sign inversion (that much I know about my data). Each tetrode has its own kcoords, I assumed 25um between contacts, and they are arranged horizontally (bonus-question: does the horizontal vs. vertical layout of the tetrodes make a difference for sorting? I mean beyond the non-determinism of KS…).
I’ll attach the kilosort.log for my settings.

My main question is about artifact removal/ coincidence detection: I know that the data contains motion artifacts usually detected on multiple tetrodes. So far, when pre-processing data for manual sorting, I’d run a coincidence detection of threshold crossing events (/spikes), and if any are detected on more than let’s say 6 tetrodes at the same time (+- a few samples), these events are zeroed out.

Can something similar be achieved by KS4? I’ve read that using the artifact_threshold will zero out the entire batch, which is not what I’m looking for as I expect real spikes close to the motion artifacts.
If not by KS4, would you recommended to do the coincidence detection before KS (zero out in the raw data) in order to possibly get better detection results?
Or afterwards based on the spike_times.npy? In which case I wonder which other KS-output files need adjusting, and if the labels for Phy can be re-computed after artifacts removed?
If any of this has been asked in another thread, a pointer would be much appreciated – I did not find anything similar.

Thanks a lot in advance!

kilosort4.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions