cortex-lab / phylib

Lightweight electrophysiological data analysis library
BSD 3-Clause "New" or "Revised" License
11 stars 23 forks source link

Fix broken `_load_channel_shanks()`. #41

Open JoeZiminski opened 10 months ago

JoeZiminski commented 10 months ago

Currently in Phy the sh entry on the ClusterView and SimilarityView table's is always zero. It seems this is because the files these were originally read from are not longer available. This PR reads them instead from the channel_positions.npy.

This may require re-running tests somewhere, please let me know if there any other considerations, I have not tested this past loading Phy and checking the sh column now contains indices which match the shank with the largest loading for a unit.

zm711 commented 10 months ago

This would be great. So many probes are moving to multi-shank these days.

JoeZiminski commented 10 months ago

Hi @rossant would you mind taking a look at this one too? cheers!

JoeZiminski commented 10 months ago

Actually apologies @rossant some further testing shows the assumption that channel positions will contain 1 unique x-position per shank is wrong. Will convert to draft and have a think.