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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 1 addition & 2 deletions element_array_ephys/ephys_acute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down Expand Up @@ -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]
Expand Down
6 changes: 3 additions & 3 deletions element_array_ephys/ephys_no_curation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 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
2 changes: 1 addition & 1 deletion element_array_ephys/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Package metadata."""

__version__ = "0.3.6"
__version__ = "0.3.7"