Skip to content

Commit

Permalink
Fix(spikeglx): robust IMAX value detection from IMEC file
Browse files Browse the repository at this point in the history
  • Loading branch information
kushalbakshi committed Nov 1, 2024
1 parent 0302575 commit a3f353a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
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

* Fi(spikeglx): robust IMAX value detection from IMEC file

## v0.3.6 (2024-10-01)

### Chore
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"

0 comments on commit a3f353a

Please sign in to comment.