From 6764f8c1adb9a80569f75233028e551cf58d8917 Mon Sep 17 00:00:00 2001 From: Thinh Nguyen Date: Thu, 15 Aug 2024 18:24:10 -0500 Subject: [PATCH] fix(spikeglx): minor bugfix --- element_array_ephys/readers/spikeglx.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/element_array_ephys/readers/spikeglx.py b/element_array_ephys/readers/spikeglx.py index 01f1046d..3e5f7a36 100644 --- a/element_array_ephys/readers/spikeglx.py +++ b/element_array_ephys/readers/spikeglx.py @@ -266,15 +266,15 @@ def __init__(self, meta_filepath): self.probe_PN = self.meta.get("imDatPrb_pn", "3A") # Infer npx probe model (e.g. 1.0 (3A, 3B) or 2.0) - probe_model = self.meta.get("imDatPrb_type") - if probe_model is None: + probe_model = self.meta.get("imDatPrb_type", 1) + if probe_model < 1: if "typeEnabled" in self.meta and self.probe_PN == "3A": self.probe_model = "neuropixels 1.0 - 3A" elif "typeImEnabled" in self.meta and self.probe_PN == "NP1010": self.probe_model = "neuropixels 1.0" else: self.probe_model = self.probe_PN - if probe_model == 1100: + elif probe_model == 1100: self.probe_model = "neuropixels UHD" elif probe_model == 21: self.probe_model = "neuropixels 2.0 - SS"