Skip to content

Commit a3bac2a

Browse files
zm711h-mayorquin
andauthored
Apply suggestions from code review Heberto + Zach
Co-authored-by: Heberto Mayorquin <[email protected]>
1 parent b864d21 commit a3bac2a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

neo/rawio/baserawio.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@
9090
("name", "U64"), # not necessarily unique
9191
("id", "U64"), # must be unique
9292
]
93-
93+
# To be left an empty array if the concept of buffer is undefined for a reader.
9494
_signal_stream_dtype = [
9595
("name", "U64"), # not necessarily unique
9696
("id", "U64"), # must be unique
97-
("buffer_id", "U64"), # optional can be ""
97+
("buffer_id", "U64"), # should be "" (empty string) when the stream is not nested under a buffer or the buffer is undefined for some reason.
9898
]
9999

100100
_signal_channel_dtype = [

neo/rawio/examplerawio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ def _parse_header(self):
112112
# In short `_parse_header()` can be slow but
113113
# `_get_analogsignal_chunk()` needs to be as fast as possible
114114

115-
# create fake signal streams and buffer information
116-
# a buffer is a group of channels that are in the same buffer for instance hdf5 or binary : this is optional
115+
# create simulated signal streams and buffer information
116+
# a buffer is a group of channels that are in the same IO buffer for instance hdf5 or binary that can mapped to with np.memmap : this is optional machinery but must be specified as an empty list if not present
117117
# a stream is a set channels that need to be grouped : this is mandatory
118118
# very often streams are similar to buffer
119119
signal_buffers = []
@@ -149,7 +149,7 @@ def _parse_header(self):
149149
# (sampling rate/dtype/t_start/units/...)
150150
stream_id = str(c // 8)
151151
# buffer_id indicates optionally if channels are in the same buffer
152-
# this is optional. In case the buffer concept do not apply then buffer_id must be ""
152+
# this is optional. In case the buffer concept does not apply then buffer_id must be ""
153153
buffer_id = str(c // 8)
154154
signal_channels.append((ch_name, chan_id, sr, dtype, units, gain, offset, stream_id, buffer_id))
155155
signal_channels = np.array(signal_channels, dtype=_signal_channel_dtype)

neo/rawio/plexon2rawio/plexon2rawio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def _parse_header(self):
211211
buffer_id = ""
212212
signal_streams.append((stream_name, stream_id, buffer_id))
213213
signal_streams = np.array(signal_streams, dtype=_signal_stream_dtype)
214-
# In plexon buffer is unkown
214+
# In plexon buffer is unknown
215215
signal_buffers = np.array([], dtype=_signal_buffer_dtype)
216216

217217
self._stream_id_samples = {}

0 commit comments

Comments
 (0)