Borders Output - Align Neuropixel channels to Brain Regions · Issue #54 · cortex-lab/allenCCF · GitHub
Skip to content

Borders Output - Align Neuropixel channels to Brain Regions #54

Open

Description

@Filippo1993

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

Activity

  1. philshams commented on Nov 18, 2021

    @philshams
    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!

  2. Filippo1993 commented on Nov 25, 2021

    @Filippo1993
    Author

    Thanks a lot! Definitely helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions