Skip to content

Commit 2f76309

Browse files
committed
Add argument
1 parent 366ac39 commit 2f76309

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

neo/rawio/openephysrawio.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ class OpenEphysRawIO(BaseRawIO):
6262
extensions = ['continuous', 'openephys', 'spikes', 'events', 'xml']
6363
rawmode = 'one-dir'
6464

65-
def __init__(self, dirname='', ignore_timestamps_errors=None):
65+
def __init__(self, dirname='', ignore_timestamps_errors=None, fill_gap_value=0):
6666
BaseRawIO.__init__(self)
6767
self.dirname = dirname
68+
self.fill_gap_value = int(fill_gap_value)
6869
if ignore_timestamps_errors is not None:
6970
self.logger.warning("OpenEphysRawIO ignore_timestamps_errors=True/False is not used anymore")
7071

@@ -313,7 +314,7 @@ def _get_analogsignal_chunk(self, block_index, seg_index, i_start, i_stop,
313314
channel_indexes = slice(None)
314315
global_channel_indexes = global_channel_indexes[channel_indexes]
315316

316-
sigs_chunk = np.zeros((i_stop - i_start, len(global_channel_indexes)), dtype='int16')
317+
sigs_chunk = np.ones((i_stop - i_start, len(global_channel_indexes)), dtype='int16') * self.fill_gap_value
317318

318319
if not self._gap_mode:
319320
# previous behavior block index are linear

0 commit comments

Comments
 (0)