Wrong labeling of channels after kilosorting?

210 views
Skip to first unread message

Frederico Azevedo

unread,
Jul 25, 2019, 10:17:13 AM7/25/19
to phy-users
Hi,

I am using kilosort2 + phy TemplateGUI v2.0a1 + phylib v2.0a1. My data comes from a linear probe with 16 channels. After sorting with Kilosort2, some channels are excluded: channel_map = [0; 1; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15]. Those channels are also saved in the channel_map.npy. However, when I open phy2, the numbering in the waveform view goes from 0 to 12, instead of displaying the true channel numbers that remained (attached file). Is it right or am I doing sth wrong? Channel labeling in all the other views have the same problem. 

Another question: I can't find the "AmplitudeHistogramView" in my GUI. It's not under View -> NewView. Was it removed?

Finally, is there a way to display all the channels in the waveformView, like in phy1? I installed the plugin "ExampleNspikesViewsPlugin" and changed "controller.model.n_closest_channels" to 16 but it dind't help. Before every trial, I made sure to delete the .phy folder within my data.
phy2.PNG

Cyrille Rossant

unread,
Jul 25, 2019, 10:47:20 AM7/25/19
to Frederico Azevedo, phy-users
Le jeu. 25 juil. 2019 à 16:17, Frederico Azevedo <fazeve...@gmail.com> a écrit :
Hi,

I am using kilosort2 + phy TemplateGUI v2.0a1 + phylib v2.0a1. My data comes from a linear probe with 16 channels. After sorting with Kilosort2, some channels are excluded: channel_map = [0; 1; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15]. Those channels are also saved in the channel_map.npy. However, when I open phy2, the numbering in the waveform view goes from 0 to 12, instead of displaying the true channel numbers that remained (attached file). Is it right or am I doing sth wrong? Channel labeling in all the other views have the same problem.

Yes, phy currently displays the channel relative index, always going from 0 to nchannels-1. Please feel free to open a GitHub issue on the phy repository requesting that views display the original channel number instead.
 
Another question: I can't find the "AmplitudeHistogramView" in my GUI. It's not under View -> NewView. Was it removed?

You should be able to see the histogram directly inside the amplitude view, is that working for you?
 
Finally, is there a way to display all the channels in the waveformView, like in phy1? I installed the plugin "ExampleNspikesViewsPlugin" and changed "controller.model.n_closest_channels" to 16 but it dind't help. Before every trial, I made sure to delete the .phy folder within my data.

What is not working exactly? In your screenshot, apart from the wrong channel labeling, all channels seem to be displayed.
 

--
You received this message because you are subscribed to the Google Groups "phy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phy-users+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/phy-users/42e8900d-d9c8-40d4-9692-af9141e779a8%40googlegroups.com.

Frederico Azevedo

unread,
Jul 25, 2019, 11:49:43 AM7/25/19
to phy-users
Thanks for your prompt answer, Cyrille.

i) I will open a Github issue for the numbering of channels.

ii) Attached goes the screenshot of my whole templateGUI. Interestingly when I opened phy2 for the first time, the default layout in my pc wasn't as displayed in https://github.com/cortex-lab/phy; however, another person in my lab had exactly the default displayed in the github page. We both are running win10. Could this have happened because I had phy1 previously installed? (Note that I deleted it before installing phy2. I even reinstalled Anaconda). To have a layout as in github, I had to manually add new views but I can't find the "AmplitudeHistogramView". Can it be added manually?

iii) Opening this same analysis in Phy1, I had the waveforms of all channels displayed in the waveformview, even the excluded ones. In phy 2, the excluded ones aren't shown (red circle in the figure). However, this would be useful only because then the channel wouldn't be relabeled by phy as mentioned in (i). If the problem/feature in (i) is solved/implemented, this question can be ignored.

Thanks. 

On Thursday, July 25, 2019 at 10:47:20 AM UTC-4, Cyrille Rossant wrote:
Le jeu. 25 juil. 2019 à 16:17, Frederico Azevedo <fazev...@gmail.com> a écrit :
Hi,

I am using kilosort2 + phy TemplateGUI v2.0a1 + phylib v2.0a1. My data comes from a linear probe with 16 channels. After sorting with Kilosort2, some channels are excluded: channel_map = [0; 1; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15]. Those channels are also saved in the channel_map.npy. However, when I open phy2, the numbering in the waveform view goes from 0 to 12, instead of displaying the true channel numbers that remained (attached file). Is it right or am I doing sth wrong? Channel labeling in all the other views have the same problem.

Yes, phy currently displays the channel relative index, always going from 0 to nchannels-1. Please feel free to open a GitHub issue on the phy repository requesting that views display the original channel number instead.
 
Another question: I can't find the "AmplitudeHistogramView" in my GUI. It's not under View -> NewView. Was it removed?

You should be able to see the histogram directly inside the amplitude view, is that working for you?
 
Finally, is there a way to display all the channels in the waveformView, like in phy1? I installed the plugin "ExampleNspikesViewsPlugin" and changed "controller.model.n_closest_channels" to 16 but it dind't help. Before every trial, I made sure to delete the .phy folder within my data.

What is not working exactly? In your screenshot, apart from the wrong channel labeling, all channels seem to be displayed.
 

--
You received this message because you are subscribed to the Google Groups "phy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phy-...@googlegroups.com.
phy2.PNG

Cyrille Rossant

unread,
Jul 25, 2019, 11:58:16 AM7/25/19
to Frederico Azevedo, phy-users

i) I will open a Github issue for the numbering of channels.

thanks! 

ii) Attached goes the screenshot of my whole templateGUI. Interestingly when I opened phy2 for the first time, the default layout in my pc wasn't as displayed in https://github.com/cortex-lab/phy; however, another person in my lab had exactly the default displayed in the github page. We both are running win10. Could this have happened because I had phy1 previously installed? (Note that I deleted it before installing phy2. I even reinstalled Anaconda).

You can delete ~/.phy/TemplateGUI/state.json, it will be automatically recreated when you relaunch phy with the default layout like in the screenshot. I should add a note about this in the documentation.
 
To have a layout as in github, I had to manually add new views but I can't find the "AmplitudeHistogramView". Can it be added manually?

That view was removed after the histogram was integrated into the amplitude view, but I could look into adding it again. I'd just like to understand what that view would bring specifically that isn't already provided by the histogram integrated in the amplitude view.
 
iii) Opening this same analysis in Phy1, I had the waveforms of all channels displayed in the waveformview, even the excluded ones. In phy 2, the excluded ones aren't shown (red circle in the figure). However, this would be useful only because then the channel wouldn't be relabeled by phy as mentioned in (i). If the problem/feature in (i) is solved/implemented, this question can be ignored.

Better to fix (i) then!

Cyrille

Frederico Azevedo

unread,
Jul 25, 2019, 1:09:54 PM7/25/19
to Cyrille Rossant, phy-users
Hi,

Regarding (ii), if the "AmplitudeHistogramView" was removed, it's fine. I was just trying to understand why my layout was different. Since I've just installed Phy2, and to be honest, I am still a newbie at it, I was just trying to understand what was the problem. No need to readd it.

Thanks a lot for your help, Cyrille. All my questions were perfectly answered!
--
Frederico A. C. Azevedo, PhD
Postdoctoral researcher @ Harvard Medical School & MIT
Reply all
Reply to author
Forward
0 new messages