Mismatch between channel and cluster IDs?
See original GitHub issueHi Cyrille,
-
How does Phy2 determine the channel number of a given cluster displayed under ClusterView? I thought that the correct way was to determine the channel which had the biggest template amplitude for each cluster. This seemed to be working in Phy1 but not in Phy2. An adaptation of my matlab code goes below.
-
Under clusterView, the best channel for a given cluster seems to be mismatched. In the attached picture, you can see that even though channel 2 wasn’t include in this analysis, clusters 3, 4 and 5 indicate it as the best one.
Thanks!
% Load kilosort2 results
results_dir = 'D:\DataAnalysis\Kilosort2\monkey\ephys_2018_03_05_1452\Results';
channel_map = double(readNPY(fullfile(results_dir,'channel_map.npy')));
templates = double(readNPY(fullfile(results_dir,'templates.npy')));
spike_templates = double(readNPY(fullfile(results_dir,'spike_templates.npy')));
% Preallocate clusters_n_channels array
[n_clusters, ~, n_channels] = size(templates);
clusters_n_channels = nan(n_clusters,2);
% Determine cluster Ids
unique_spike_templates = unique(spike_templates);
clusters_n_channels(unique_spike_templates + 1, 1) = unique_spike_templates;
% Choose the channel which has the biggest template amplitude for each cluster
for i_clusters = 1 : n_clusters
max_amplitude_channel_ind = 1;
max_amplitude_template = max(templates(i_clusters, :, max_amplitude_channel_ind)) - min(templates(i_clusters, :, max_amplitude_channel_ind));
for i_channels = 2 : n_channels
temp_max_amplitude_template = max(templates(i_clusters, :, i_channels)) - min(templates(i_clusters, :, i_channels));
if temp_max_amplitude_template > max_amplitude_template
max_amplitude_template = temp_max_amplitude_template;
max_amplitude_channel_ind = i_channels;
end
end
clusters_n_channels(i_clusters, 2) = channel_map(max_amplitude_channel_ind);
end
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
TiDB Cluster Management FAQs | PingCAP Docs
The etcd cluster ID mismatch message is displayed when starting PD. This is because the --initial-cluster in the PD startup parameter contains ...
Read more >Storage LUNs that are already in use as an RDM appear ...
This issue occurs due to inconsistency of the LUN VML ID. The NAA IDs are consistent across all of the ESXi hosts in...
Read more >Cluster fault codes - Product documentation - NetApp
All Fibre Channel nodes are unresponsive. The node IDs are displayed. Check network connectivity. fibreChannelActiveIxL. The IxL Nexus count is ...
Read more >Troubleshoot Firepower Threat Defense (FTD) Cluster - Cisco
TCP SYN/ACK is forwarded through one of the chassis backplane interfaces to data plane CCL port-channel interface (nameif cluster).
Read more >Error code reference - IBM
Cluster identifier is different between enclosure and node; 509. The enclosure identity cannot be read. ... A Fibre Channel adapter has a PCI...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
closing, please reopen if new issues arise
I will have to reopen the issue for a minor detail. The TraceView channel ordering will not work if phy is called when >1 probes are analyzed simultaneously. This is after using spyking-circus sorted (latest developmental version).
Attached you can find a screenshot with the most updated developmental version of phy. Channels must be 1-64 ordered in traceView. Note that WaveformView and ProbeView shows the right numeration