-
Notifications
You must be signed in to change notification settings - Fork 212
Updated KilosortBase's channel map generation to support json probe maps with kcoord information. #3852
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
Conversation
…aps with kcoord information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @nikhilchandra
See comments
…y apply only to Kilosort4.
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks nice to me :)
xcoords = ([p[0] for p in positions],) | ||
ycoords = ([p[1] for p in positions],) | ||
kcoords = (groups,) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikhilchandra why do you need to make tuples here when later you're making an array and squeezing it?
Couldn't you do this directly?
xcoords = positions[:, 0]
ycoords = positions[:, 1]
kcoords = groups
These are already 1d arrays, so then you could just do:
probe = {
"chanMap": np.arange(nchan),
"xc": xcoords,
"yc": ycoords,
"kcoords": kcoords,
"n_chan": nchan,
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct. I have made the necessary changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikhilchandra one final comment :)
for more information, see https://pre-commit.ci
Fixes #3704