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

handlig of .prb file #332

Closed
jrnvndtslr opened this issue Feb 8, 2021 · 6 comments · Fixed by #595
Closed

handlig of .prb file #332

jrnvndtslr opened this issue Feb 8, 2021 · 6 comments · Fixed by #595

Comments

@jrnvndtslr
Copy link

I have a custom linear probe, so I need to create my own probe file. In order to do that I want to know how Kilosort interprets the .prb file, but I can't find the code where this happens. Could someone tell me where in the code this happens or what the values in the probe file represent (e.g. electrode site, AD, or ncs (I use Neuralynx))?

@marius10p
Copy link
Contributor

examples here: https://github.com/MouseLand/Kilosort/blob/main/configFiles/createChannelMapFile.m

you can also create it via the GUI.

@jrnvndtslr
Copy link
Author

Thanks for the quick response.

I had already found the script you referred to. My question is rather related to how Kilosort knows which channel data (a .ncs file in my case) corresponds to which xy coordinates.

@marius10p
Copy link
Contributor

You need to write your data as an int16 binary file in channel-major order, so ch1 t1, ch2 t1, ch3 t2, ... ch1 t2, ch2 t2,...

@jrnvndtslr
Copy link
Author

Ah so if I understand it correctly you're saying that the channelmap variables are matched to channels based on their index? So that would mean that as long as I match the order of my probe map variables to that of my channels the results should be correct.

If I understood that correctly then my next question is what determines the order of the channels. Is it simply the filename?

@marius10p
Copy link
Contributor

Yes, ch1 should be the first row in your binary file, ch2 should be the second row, etc. However, Kilosort won't work with ncs files. You'll have to load the data into Matlab yourself, arrange them in the correct order, and then write them back to a single binary file with the channel order I specified above.

@jrnvndtslr
Copy link
Author

Thanks a lot for the help!

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

Successfully merging a pull request may close this issue.

2 participants