Skip to content

Commit 626327c

Browse files
authored
Merge pull request #210 from kushalbakshi/main
Fix(spikeglx): robust IMAX value detection from IMEC file
2 parents 6bad001 + 4f70469 commit 626327c

File tree

5 files changed

+13
-8
lines changed

5 files changed

+13
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## v0.3.7 (2024-11-01)
4+
5+
### Fix
6+
7+
* Fix(spikeglx): robust IMAX value detection from IMEC file (metadata 3.0)
8+
39
## v0.3.6 (2024-10-01)
410

511
### Chore

element_array_ephys/ephys_acute.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class AcquisitionSoftware(dj.Lookup):
126126
acq_software ( varchar(24) ): Acquisition software, e.g,. SpikeGLX, OpenEphys
127127
"""
128128

129-
definition = """ # Software used for recording of neuropixels probes
129+
definition = """ # Name of software used for recording of neuropixels probes - SpikeGLX or Open Ephys
130130
acq_software: varchar(24)
131131
"""
132132
contents = zip(["SpikeGLX", "Open Ephys"])
@@ -533,7 +533,6 @@ def make(self, key):
533533
- 1 : 0 : -self._skip_channel_counts
534534
]
535535

536-
# (sample x channel)
537536
lfp = oe_probe.lfp_timeseries[:, lfp_channel_ind]
538537
lfp = (
539538
lfp * np.array(oe_probe.lfp_meta["channels_gains"])[lfp_channel_ind]

element_array_ephys/ephys_no_curation.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ def activate(
5858
global _linking_module
5959
_linking_module = linking_module
6060

61-
# activate
6261
probe.activate(
6362
probe_schema_name, create_schema=create_schema, create_tables=create_tables
6463
)
@@ -315,8 +314,9 @@ def make(self, key):
315314
break
316315
else:
317316
raise FileNotFoundError(
318-
"Ephys recording data not found!"
319-
" Neither SpikeGLX nor Open Ephys recording files found"
317+
f"Ephys recording data not found!"
318+
f" Neither SpikeGLX nor Open Ephys recording files found"
319+
f" in {session_dir}"
320320
)
321321

322322
supported_probe_types = probe.ProbeType.fetch("probe_type")

element_array_ephys/readers/spikeglx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ def get_channel_bit_volts(self, band="ap"):
9696
dataVolts = dataInt * Vmax / Imax / gain
9797
"""
9898
vmax = float(self.apmeta.meta["imAiRangeMax"])
99+
imax = self.apmeta.meta.get("imMaxInt")
100+
imax = float(imax) if imax else IMAX[self.apmeta.probe_model]
99101

100102
if band == "ap":
101-
imax = IMAX[self.apmeta.probe_model]
102103
imroTbl_data = self.apmeta.imroTbl["data"]
103104
imroTbl_idx = 3
104105
chn_ind = self.apmeta.get_recording_channels_indices(exclude_sync=True)
105106

106107
elif band == "lf":
107-
imax = IMAX[self.lfmeta.probe_model]
108108
imroTbl_data = self.lfmeta.imroTbl["data"]
109109
imroTbl_idx = 4
110110
chn_ind = self.lfmeta.get_recording_channels_indices(exclude_sync=True)

element_array_ephys/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Package metadata."""
22

3-
__version__ = "0.3.6"
3+
__version__ = "0.3.7"

0 commit comments

Comments
 (0)