Comments (13)
I think the channel number is decided by Phy, which takes them consecutively from the channel map of connected channels. When KS2 sets a channel as bad, it just sets connected to 0.
@rossant, do you think Phy could show the original channel number?
from kilosort.
Thank you for your quick reply Marius. Yes, that makes sense. Channel depths are shown correctly though, so should be possible to include the correct channel numbers in Phy too.
from kilosort.
I think phy already shows the channel numbers that appear in channel_map.npy
from kilosort.
I don't think so, I just looked.
from kilosort.
channel_map refers to the rows of the data file, and this doesn't necessarily correspond to anything the user cares about. Perhaps we should make this more clear by introducing a "channel_numbers.npy" or "channel_names.npy"? The labels in phy would be taken from this new file, though the channel_map would still be used as it currently is to read the file.
from kilosort.
are you saying that the requested information is currently not saved anywhere?
from kilosort.
but the GUI doesn't actually show the channel map numbers from channel_map.npy.
from kilosort.
Right, the raw data file is swapped according to channel_map
, and the displayed channels are just 0..nchannels-1. If you want different channel labels you need another channel_names.tsv
(could be names also, I guess?)
from kilosort.
Ok, I can output that from Kilosort2. How is the tsv file formatted? I tried a few things that gave an error:
phy template-gui params.py
14:43:38 [E] cli:36 An error has occurred (ValueError): axes don't match array
from kilosort.
I think this should work (where \t
is a tab character)
cluster_id\tchannel_name
0\tmychannelname
...
but the logic to display this is not yet implemented in phy
from kilosort.
Thanks Cyrille. I think the defaults for channel number should be the ones from the channel map file, because those are the actual, original channels in the data file.
If you don't think it should be that way, I can open an issue in Phy to add arbitrary user-defined labels, and then output the correct channel numbers from Kilosort itself.
from kilosort.
Thanks Cyrille. I think the defaults for channel number should be the ones from the channel map file, because those are the actual, original channels in the data file.
sounds good!
from kilosort.
Hi I was seeing this exact issue on my data, where the best channel based on template and raw waveforms don't match up. For context, I'm running kilosort 2.5 wrapped through ecephys pipeline, and visualizing results in phy2. This error occurs especially obviously in sessions some noisy channels were extracted before running kilosort.
I've tracked down the issue to channel_map.npy too. Currently this channel map saves chanMap0ind = int32([1:rez.ops.Nchan]-1);
regardless of channel connectivity situation in rezToPhy.m. And immediately before this line chanMap0ind = int32(chanMap0ind);
was commented out. I saw that if I rewrite channel_map.npy with results from chanMap0ind = int32(chanMap0ind);
I get the correct channel mappings displayed in phy. @marius10p Was there any particular reason that chanMap0ind = int32(chanMap0ind);
was commented out in the first place?
from kilosort.
Related Issues (20)
- Release notes for version 4.0.3 HOT 2
- BUG: Kilosort3 output isn't deterministic HOT 3
- Cannot load .bin file in the most updated kilosort4 HOT 9
- Poor performance in kilosort4 for rectangular and hexagonal arrays. HOT 15
- FEATURE: Correcting for misaligned spikes within units HOT 3
- Question About How to Export the Local Field Potential HOT 2
- how to tell Kilosort some channels are bad, do not use them? HOT 2
- KS4 over-merging units HOT 7
- BUG: Tetrode data is garbled in Kilosort4 but not Kilosort3 HOT 4
- BUG: Creating a New Probe HOT 6
- CUDA out of memory during saving to phy HOT 8
- Questions of data from custom electrodes HOT 1
- Question about the error message "Bytes in binary file did not divide evenly, incorrect n_chan_bin" HOT 14
- BUG: Spike timing in the first batch is not aligned to original signal HOT 2
- FEATURE: Support for MacOS M series chips HOT 2
- Kilosort 4 - Algorithm missing fast-spiking units/narrow shaped units HOT 5
- BUG: dminx not calulated HOT 2
- BUG: CUDA out of memory HOT 27
- 2D MEA Probe creation HOT 8
- Initial Usage Error(s): NumPy array is not writable, 0 spikes extracted HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kilosort.