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

Borders Output - Align Neuropixel channels to Brain Regions #54

Open
Filippo1993 opened this issue Nov 17, 2021 · 2 comments
Open

Borders Output - Align Neuropixel channels to Brain Regions #54

Filippo1993 opened this issue Nov 17, 2021 · 2 comments

Comments

@Filippo1993
Copy link

Hi all! Thanks a lot for this wonderful tool,
I've got a question about of the script Display_Probe_Track.m
How can I go from the output vector borders to the actual anatomical location of every channel of my probe?
Thanks a lot for your time!

Best,
Filippo

@philshams
Copy link
Collaborator

This should be possible with a bit of extra code. Here are some pointers. In theory you'll need the following inputs:

  • The best-fit line of your probe. This is computed in this file, and given by m, the midpoint of the line segment and p, the vector pointing in the direction of the line
  • The length of the probe in reference space. This is computed in Display_Probe_Track and called probe_length_histo
  • The location of the start of the active sites and the probe tip in atlas coordinates. These are plotted on line 210, and should be given by something like this:
start_of_active_sites = [m(1)+p(1)*active_probe_position(1) m(2)+p(2)*active_probe_position(1) m(3)+p(3)*active_probe_position(1)]
probe_tip = [m(1)+p(1)*active_probe_position(1) m(2)+p(2)*active_probe_position(2) m(3)+p(3)*active_probe_position(2)]

With this information, you can calculate the coodinates of a channel that is X% of the way between the start and end of active sites, e.g.:
halfway_location = start_of_active_sites * 0.5 + probe_tip * (1 - 0.5)
If your sites are positioned in two dimensions, then you'll have to know the orientation of the probe with respect to the brain, and add this offset to the position along the corresponding dimension.
hope it helps!

@Filippo1993
Copy link
Author

Thanks a lot! Definitely helpful!

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