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

Recording a subset of shanks from 4 shank probes #124

Open
harshk95 opened this issue May 16, 2024 · 2 comments
Open

Recording a subset of shanks from 4 shank probes #124

harshk95 opened this issue May 16, 2024 · 2 comments

Comments

@harshk95
Copy link

Hi,
When recording from 1/2/3 shanks out of the 4 shanks, it appears to us that during the registration, the channel locations are saved always starting from shank 1 and the xyz_picks are also therefore loaded from shank 1. This is problematic when we record say shank 3 and 4, the loaded trajectory of the probe is incorrect.

Let us know in case we are missing something, or if there is a way for the atlaselectrophysiology_gui to identify which shanks were recorded.
The channels.localCoordinates reflect the right coordinates, its just that for some sessions we only used a subset of the shanks and not all 4 and noticed that there could be a mismatch between what was loaded in the GUI and which shanks we actually used. So, for now we can correct with the channel.localCoordinates to interpret the shank.
image

Thanks!

@mayofaulkner
Copy link
Contributor

Hello,

When you load in your data in the gui do you see the option for 4 shanks to be loaded in? In the selection bar on the top right hand side of the gui, it should say 1/4 and have options for 2/4 etc?

Currently the gui detects the number of shanks based on the x distance between the channels.coordinates. Here is the snippet with the logic

        self.chn_coords_all = np.load(self.folder_path.joinpath('channels.localCoordinates.npy'))
        chn_x = np.unique(self.chn_coords_all[:, 0])
        chn_x_diff = np.diff(chn_x)
        self.n_shanks = np.sum(chn_x_diff > 100) + 1

Just looking at the image that you displayed it looks like this may only detect two shanks. Is that the case?

@harshk95
Copy link
Author

harshk95 commented May 30, 2024

Yes, it does detect only two shanks and gives us the option to load 1/2 and 2/2. However, by default it picks the 1 and 2 shank irrespective of which shank was used in the recording (basically which xyz_picks file it loads; we have one from each shank from the registration to the atlas). We used a similar logic to go from the channel_locations file and map the channel on the shank, and one can also identify similarly which shank the given channels come from. So, probably incorporating this into the gui, it could be automatically identified which shank xyz picks need to be loaded. We for now solve it in the naming of the xyz picks files accordingly.

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

No branches or pull requests

2 participants