def recluster(): """Relaunch KlustaKwik on the selected clusters.""" # Selected clusters. cluster_ids = self.manual_clustering.selected spike_ids = self.selector.select_spikes(cluster_ids) logger.info("Running KlustaKwik on %d spikes.", len(spike_ids)) spike_clusters, metadata = cluster(self.model, spike_ids, num_starting_clusters=10, ) self.manual_clustering.split(spike_ids, spike_clusters)
def recluster(): """Relaunch KlustaKwik on the selected clusters.""" # Selected clusters. cluster_ids = self.manual_clustering.selected spike_ids = self.selector.select_spikes(cluster_ids) logger.info("Running KlustaKwik on %d spikes.", len(spike_ids)) # Run KK2 in a temporary directory to avoid side effects. with TemporaryDirectory() as tempdir: spike_clusters, metadata = cluster(self.model, spike_ids, num_starting_clusters=10, tempdir=tempdir, ) self.manual_clustering.split(spike_ids, spike_clusters)
def recluster(): """Relaunch KlustaKwik on the selected clusters.""" # Selected clusters. cluster_ids = supervisor.selected spike_ids = self.selector.select_spikes(cluster_ids) logger.info("Running KlustaKwik on %d spikes.", len(spike_ids)) # Run KK2 in a temporary directory to avoid side effects. n = 10 with TemporaryDirectory() as tempdir: spike_clusters, metadata = cluster(self.model, spike_ids, num_starting_clusters=n, tempdir=tempdir, ) controller.supervisor.split(spike_ids, spike_clusters)