Skip to content

Commit 958de5b

Browse files
committed
small fixes
1 parent d8aa2df commit 958de5b

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

brainbox/io/one.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ class SpikeSortingLoader:
865865
"""Class for loading spike sorting"""
866866
pid: str
867867
one: ONE
868-
atlas: atlas.BrainAtlas = None
868+
atlas: None
869869
# the following properties are the outcome of the post init funciton
870870
eid: str = ''
871871
session_path: Path = ''

ibllib/dsp/voltage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def decompress_destripe_cbin(sr_file, output_file=None, h=None, wrot=None, appen
316316
channel_labels = detect_bad_channels_cbin(sr)
317317
assert isinstance(sr_file, str) or isinstance(sr_file, Path)
318318
butter_kwargs, k_kwargs, spatial_fcn = _get_destripe_parameters(sr.fs, butter_kwargs, k_kwargs, k_filter)
319-
h = neuropixel.trace_header(version=1) if h is None else h
319+
h = sr.geometry if h is None else h
320320
ncv = h['sample_shift'].size # number of channels
321321
output_file = sr.file_bin.with_suffix('.bin') if output_file is None else output_file
322322
assert output_file != sr.file_bin

ibllib/io/spikeglx.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,12 @@ def open(self):
5858
self._raw.open(self.file_bin, self.file_bin.with_suffix('.ch'))
5959
if self._raw.shape != (self.ns, self.nc):
6060
ftsec = self._raw.shape[0] / self.fs
61-
_logger.warning(f"{sglx_file} : meta data and compressed chunks dont checkout\n"
62-
f"File duration: expected {self.meta['fileTimeSecs']},"
63-
f" actual {ftsec}\n"
64-
f"Will attempt to fudge the meta-data information.")
6561
self.meta['fileTimeSecs'] = ftsec
62+
if ftsec > 1: # avoid the checks for streaming data
63+
_logger.warning(f"{sglx_file} : meta data and compressed chunks dont checkout\n"
64+
f"File duration: expected {self.meta['fileTimeSecs']},"
65+
f" actual {ftsec}\n"
66+
f"Will attempt to fudge the meta-data information.")
6667
else:
6768
if self.nc * self.ns * 2 != self.nbytes:
6869
ftsec = self.file_bin.stat().st_size / 2 / self.nc / self.fs

0 commit comments

Comments
 (0)