From 44076782dcb86af3309fe2bda909d971f9819266 Mon Sep 17 00:00:00 2001 From: Thinh Nguyen Date: Wed, 13 Sep 2023 18:02:31 -0500 Subject: [PATCH 1/3] bugfix --- element_array_ephys/probe.py | 2 -- element_array_ephys/readers/probe_geometry.py | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/element_array_ephys/probe.py b/element_array_ephys/probe.py index b4a6d8fa..8157c022 100644 --- a/element_array_ephys/probe.py +++ b/element_array_ephys/probe.py @@ -1,8 +1,6 @@ """ Neuropixels Probes """ -from __future__ import annotations - import datajoint as dj from .readers import probe_geometry diff --git a/element_array_ephys/readers/probe_geometry.py b/element_array_ephys/readers/probe_geometry.py index f9fe7fb7..11e3ae99 100644 --- a/element_array_ephys/readers/probe_geometry.py +++ b/element_array_ephys/readers/probe_geometry.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import numpy as np import pandas as pd From 452ff31c952f641f329771c22c39a4e6845d7588 Mon Sep 17 00:00:00 2001 From: Thinh Nguyen Date: Fri, 15 Sep 2023 13:45:59 -0500 Subject: [PATCH 2/3] address PR comments Co-authored-by: Dimitri Yatsenko --- element_array_ephys/probe.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/element_array_ephys/probe.py b/element_array_ephys/probe.py index 8157c022..1d517cf3 100644 --- a/element_array_ephys/probe.py +++ b/element_array_ephys/probe.py @@ -107,13 +107,10 @@ def create_neuropixels_probe(probe_type: str = "neuropixels 1.0 - 3A"): npx_probes_config["neuropixels 2.0 - MS"] = npx_probes_config["NP2010"] probe_type = {"probe_type": probe_type} - probe_params = { - n: v - for n, v in zip( + probe_params = dict(zip( probe_geometry.geom_param_names, - npx_probes_config[probe_type["probe_type"]], - ) - } + npx_probes_config[probe_type["probe_type"]] + )) electrode_layouts = probe_geometry.build_npx_probe( **{**probe_params, **probe_type} ) From f42f1fcff03f0c312d8e09ea50828bf2a77b33b5 Mon Sep 17 00:00:00 2001 From: Thinh Nguyen Date: Fri, 15 Sep 2023 13:47:34 -0500 Subject: [PATCH 3/3] address PR comments Co-authored-by: Dimitri Yatsenko --- element_array_ephys/readers/spikeglx.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/element_array_ephys/readers/spikeglx.py b/element_array_ephys/readers/spikeglx.py index 4137aa4f..819b7b1a 100644 --- a/element_array_ephys/readers/spikeglx.py +++ b/element_array_ephys/readers/spikeglx.py @@ -450,12 +450,12 @@ def _transform_geom_to_shank(self): from . import probe_geometry - probe_params = { - n: v - for n, v in zip( - probe_geometry.geom_param_names, probe_geometry.M[self.probe_PN] + probe_params = dict( + zip( + probe_geometry.geom_param_names, + probe_geometry.M[self.probe_PN] ) - } + ) probe_params["probe_type"] = self.probe_PN elec_pos_df = probe_geometry.build_npx_probe(**probe_params)