Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions element_array_ephys/probe.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def create_neuropixels_probe_types():
"neuropixels 2.0 - SS",
"neuropixels 2.0 - MS",
"2013",
"NP2004",
):
if not (ProbeType & {"probe_type": probe_type}):
create_neuropixels_probe(probe_type)
Expand Down
8 changes: 4 additions & 4 deletions element_array_ephys/readers/spikeglx.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ def get_channel_bit_volts(self, band="ap"):
dataVolts = dataInt * Vmax / Imax / gain
"""
vmax = float(self.apmeta.meta["imAiRangeMax"])
imax = self.apmeta.meta.get("imMaxInt")
imax = float(imax) if imax else IMAX[self.apmeta.probe_model]

if band == "ap":
imax = IMAX[self.apmeta.probe_model]
imroTbl_data = self.apmeta.imroTbl["data"]
imroTbl_idx = 3
chn_ind = self.apmeta.get_recording_channels_indices(exclude_sync=True)

elif band == "lf":
imax = IMAX[self.lfmeta.probe_model]
imroTbl_data = self.lfmeta.imroTbl["data"]
imroTbl_idx = 4
chn_ind = self.lfmeta.get_recording_channels_indices(exclude_sync=True)
Expand Down Expand Up @@ -266,7 +266,7 @@ 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", 1)
probe_model = self.meta.get("imDatPrb_type", 0)
if probe_model < 1:
if "typeEnabled" in self.meta and self.probe_PN == "3A":
self.probe_model = "neuropixels 1.0 - 3A"
Expand All @@ -283,7 +283,7 @@ def __init__(self, meta_filepath):
elif probe_model == 24:
self.probe_model = "neuropixels 2.0 - MS"
else:
self.probe_model = str(probe_model)
self.probe_model = self.probe_PN

# Get recording time
self.recording_time = datetime.strptime(
Expand Down
Loading