Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort Units to Electrodes #57

Open
RoscoeOBrian opened this issue Feb 28, 2017 · 1 comment
Open

Sort Units to Electrodes #57

RoscoeOBrian opened this issue Feb 28, 2017 · 1 comment

Comments

@RoscoeOBrian
Copy link

Hello,
I'm using KiloSort on my 6x10 multielectrode data. In the end I get a template.npy and a template_ind.npy file. Both provide me with the template waveforms. But I dont now how to link the templates to the units I get out of cluster_groups.csv file. What I want is basically a figure like you see it in the GUI during the manual sorting. With my channels in a 6x10 order and the waveforms sorted by unit and displayed on the electrodes, where they occur.

The following code basically gives me this figure, but it seems, like the units are displayed in a random order and not only on the electrodes, where they occur.

`ch_channels=readNPY('channel_map.npy');
ch_pos=readNPY('channel_positions.npy');
templates=readNPY('templates.npy');
templates_ind=readNPY('templates_ind.npy');

ch_map_list=[];
for i=1:size(ch_map,1)
ch_map_list=[ch_map_list ch_map(i,:)];
end

figure('Position',[87 33 1769 945]);
for a=1:60
for i=1:size(templates,1)
hold on
subplot(6,10,a)
plot(templates(i,:,ch_map_list(1,a)+1))
end
ylim([-0.5 0.5])
xlim([20 80])
end`

image

@marius10p
Copy link
Collaborator

Hi,

I am not sure what issue you are reporting. Have you used the field "kcoords" to limit units to be only on their own electrodes? Whether you have or haven't, you can find for each unit its largest channel, and use that as your reference.

You might find some of the following information useful as well

https://github.com/kwikteam/phy-contrib/blob/master/docs/template-gui.md
http://data.cortexlab.net/dualPhase3/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants