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

rezToPhy clusterIDs are not assigned #36

Closed
babaq opened this issue Mar 22, 2019 · 8 comments · Fixed by #595
Closed

rezToPhy clusterIDs are not assigned #36

babaq opened this issue Mar 22, 2019 · 8 comments · Fixed by #595
Assignees

Comments

@babaq
Copy link

babaq commented Mar 22, 2019

Hi,

when I do [spikeTimes, clusterIDs, amplitudes, templates, templateFeatures, ... templateFeatureInds, pcFeatures, pcFeatureInds]=rezToPhy(rez, rootdir); matlab error said it's not assigned, and indeed in rezToPhy function.

it seems the spike_clusters.npy is saved but not reflected in the clusterIDs variable in line 107.

If my guess is correct, the clusterIDs is meant to have the same meaning of spike_cluster.npy, then it could be easily fixed.

@marius10p
Copy link
Contributor

Not sure what that function is supposed to return, but if you want to use the clustering results in Matlab, you are better served by the rez structure. I think I forgot to document these outputs, I'll do that soon.

@marius10p
Copy link
Contributor

Actually, nvm, it's in the wiki: https://github.com/MouseLand/Kilosort2/wiki/7.-Output-variables

@nsteinme
Copy link
Collaborator

Sorry yes those return arguments were a deprecated old idea. As Marius says, just use rez directly, or if you discarded rez then you can load data with this function which has similar output to that list of return arguments: https://github.com/cortex-lab/spikes/blob/master/preprocessing/phyHelpers/loadKSdir.m

Fixed via: Removed the return arguments from the function e7740f6

@babaq
Copy link
Author

babaq commented Mar 26, 2019

thanks for point out the functions to read Phy exported data, but i am wandering if someone just need the spikeStruct that the loadKSdir returns without Phy workaround, it's the best place within the rezToPhy to return this spikeStruct.

@nsteinme
Copy link
Collaborator

That information is in the "rez" struct already, see the documentation that Marius linked to above. Or, you can write your own function based on rezToPhy.

@babaq
Copy link
Author

babaq commented Mar 26, 2019

yeah, I guess it's better letting rezToPhy to do just converting job, and write another function to extract similar data from rez.
But the similar data have already been extracted in rezToPhy, so I thought why not return it out. it's fairly Straightforward, I could make a pull request if you permit.

@nsteinme
Copy link
Collaborator

nsteinme commented Mar 26, 2019 via email

@babaq
Copy link
Author

babaq commented Mar 26, 2019

ok, I got it, thanks

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.

3 participants