From 6c2fdffd062717e09a6cfb486dc06571ea23218c Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Tue, 14 Oct 2025 12:57:56 -0600 Subject: [PATCH 1/5] remove invalid escpae character in neuropixels --- src/probeinterface/neuropixels_tools.py | 30 +++++++++++++++---------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/src/probeinterface/neuropixels_tools.py b/src/probeinterface/neuropixels_tools.py index d101b62..48c5e95 100644 --- a/src/probeinterface/neuropixels_tools.py +++ b/src/probeinterface/neuropixels_tools.py @@ -148,18 +148,24 @@ def get_probe_contour_vertices(shank_width, tip_length, probe_length) -> list: Function to get the vertices of the probe contour from probe properties. The probe contour can be constructed from five points. These are the vertices shown in the following figure: - A | | E - | | - . - . - . - | | - B | | D - \\ / - \\/ - C - - This function returns the points indicated in the diagram above in a list [A,B,C,D,E]. + Top of probe (y = probe_length) + A +-------------------------------+ E + | | + | | + | Shank body | + | (shank_width) | + | | + | | + B +------------------------------+ D (y = 0) + \ / + \ Tip region / + \ (tip_length) / + \ / + \ / + \ / + +------------------+ C (y = -tip_length) + + This function returns the vertices in the order [A, B, C, D, E] as a list of (x, y) coordinates. Parameters ---------- From 2a4bcbd63c96a6f40ab48c8fc2428cb2801557c1 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Tue, 14 Oct 2025 13:05:27 -0600 Subject: [PATCH 2/5] imprve docs --- src/probeinterface/neuropixels_tools.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/probeinterface/neuropixels_tools.py b/src/probeinterface/neuropixels_tools.py index 48c5e95..9d4fd26 100644 --- a/src/probeinterface/neuropixels_tools.py +++ b/src/probeinterface/neuropixels_tools.py @@ -145,8 +145,10 @@ def make_mux_table_array(mux_information) -> np.array: def get_probe_contour_vertices(shank_width, tip_length, probe_length) -> list: """ - Function to get the vertices of the probe contour from probe properties. The probe contour can be constructed - from five points. These are the vertices shown in the following figure: + Function to get the vertices of the probe contour from probe properties. + The probe contour can be constructed from five points. + + These are the vertices shown in the following figure: Top of probe (y = probe_length) A +-------------------------------+ E @@ -178,8 +180,14 @@ def get_probe_contour_vertices(shank_width, tip_length, probe_length) -> list: Returns ------- - polygon_vertices : list - List of five points which make up the probe contour. + polygon_vertices : tuple of tuple + Five vertices as (x, y) coordinate pairs in micrometers, returned in the + order [A, B, C, D, E] corresponding to the diagram above: + A = (0, probe_length) - top-left corner + B = (0, 0) - bottom-left corner at shank base + C = (shank_width/2, -tip_length) - tip point (center bottom) + D = (shank_width, 0) - bottom-right corner at shank base + E = (shank_width, probe_length) - top-right corner """ # this dict define the contour for one shank (duplicated when several shanks so) From 9443ab80d373358093a82c0d3da4563a02a03f30 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 19:09:36 +0000 Subject: [PATCH 3/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/probeinterface/neuropixels_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/probeinterface/neuropixels_tools.py b/src/probeinterface/neuropixels_tools.py index 9d4fd26..e28f1e5 100644 --- a/src/probeinterface/neuropixels_tools.py +++ b/src/probeinterface/neuropixels_tools.py @@ -146,8 +146,8 @@ def make_mux_table_array(mux_information) -> np.array: def get_probe_contour_vertices(shank_width, tip_length, probe_length) -> list: """ Function to get the vertices of the probe contour from probe properties. - The probe contour can be constructed from five points. - + The probe contour can be constructed from five points. + These are the vertices shown in the following figure: Top of probe (y = probe_length) From f19b9f1e1adf32d14a1d41cb51d40c14338b34b2 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Wed, 15 Oct 2025 08:54:01 -0600 Subject: [PATCH 4/5] Apply suggestion from @chrishalcrow Co-authored-by: Chris Halcrow <57948917+chrishalcrow@users.noreply.github.com> --- src/probeinterface/neuropixels_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/probeinterface/neuropixels_tools.py b/src/probeinterface/neuropixels_tools.py index e28f1e5..0bd50ef 100644 --- a/src/probeinterface/neuropixels_tools.py +++ b/src/probeinterface/neuropixels_tools.py @@ -158,7 +158,7 @@ def get_probe_contour_vertices(shank_width, tip_length, probe_length) -> list: | (shank_width) | | | | | - B +------------------------------+ D (y = 0) + B +-------------------------------+ D (y = 0) \ / \ Tip region / \ (tip_length) / From 1409e1e232b68be848046915a72d2d3dd078e04b Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Wed, 15 Oct 2025 08:54:07 -0600 Subject: [PATCH 5/5] Apply suggestion from @chrishalcrow Co-authored-by: Chris Halcrow <57948917+chrishalcrow@users.noreply.github.com> --- src/probeinterface/neuropixels_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/probeinterface/neuropixels_tools.py b/src/probeinterface/neuropixels_tools.py index 0bd50ef..99241f3 100644 --- a/src/probeinterface/neuropixels_tools.py +++ b/src/probeinterface/neuropixels_tools.py @@ -165,7 +165,7 @@ def get_probe_contour_vertices(shank_width, tip_length, probe_length) -> list: \ / \ / \ / - +------------------+ C (y = -tip_length) + +-----------------+ C (y = -tip_length) This function returns the vertices in the order [A, B, C, D, E] as a list of (x, y) coordinates.