diff --git a/CHANGELOG.md b/CHANGELOG.md index 54926bd3..ce98a10a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # CHANGELOG +## v0.3.7 (2024-11-01) + +### Fix + +* Fix(spikeglx): robust IMAX value detection from IMEC file (metadata 3.0) + ## v0.3.6 (2024-10-01) ### Chore diff --git a/element_array_ephys/ephys_acute.py b/element_array_ephys/ephys_acute.py index 50371104..f93a66a4 100644 --- a/element_array_ephys/ephys_acute.py +++ b/element_array_ephys/ephys_acute.py @@ -126,7 +126,7 @@ class AcquisitionSoftware(dj.Lookup): acq_software ( varchar(24) ): Acquisition software, e.g,. SpikeGLX, OpenEphys """ - definition = """ # Software used for recording of neuropixels probes + definition = """ # Name of software used for recording of neuropixels probes - SpikeGLX or Open Ephys acq_software: varchar(24) """ contents = zip(["SpikeGLX", "Open Ephys"]) @@ -533,7 +533,6 @@ def make(self, key): - 1 : 0 : -self._skip_channel_counts ] - # (sample x channel) lfp = oe_probe.lfp_timeseries[:, lfp_channel_ind] lfp = ( lfp * np.array(oe_probe.lfp_meta["channels_gains"])[lfp_channel_ind] diff --git a/element_array_ephys/ephys_no_curation.py b/element_array_ephys/ephys_no_curation.py index cd0909c9..1265445a 100644 --- a/element_array_ephys/ephys_no_curation.py +++ b/element_array_ephys/ephys_no_curation.py @@ -58,7 +58,6 @@ def activate( global _linking_module _linking_module = linking_module - # activate probe.activate( probe_schema_name, create_schema=create_schema, create_tables=create_tables ) @@ -315,8 +314,9 @@ def make(self, key): break else: raise FileNotFoundError( - "Ephys recording data not found!" - " Neither SpikeGLX nor Open Ephys recording files found" + f"Ephys recording data not found!" + f" Neither SpikeGLX nor Open Ephys recording files found" + f" in {session_dir}" ) supported_probe_types = probe.ProbeType.fetch("probe_type") diff --git a/element_array_ephys/readers/spikeglx.py b/element_array_ephys/readers/spikeglx.py index ca60648d..214b70b9 100644 --- a/element_array_ephys/readers/spikeglx.py +++ b/element_array_ephys/readers/spikeglx.py @@ -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) diff --git a/element_array_ephys/version.py b/element_array_ephys/version.py index 008790cf..6b3c3b3f 100644 --- a/element_array_ephys/version.py +++ b/element_array_ephys/version.py @@ -1,3 +1,3 @@ """Package metadata.""" -__version__ = "0.3.6" +__version__ = "0.3.7"