Skip to content

Commit ef10645

Browse files
Julia's suggestions
Co-authored-by: Julia Sprenger <[email protected]>
1 parent 588dc46 commit ef10645

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

neo/rawio/spikegadgetsrawio.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
"""
2-
Class for reading spikegadgets file.
3-
Only signals ability at the moment.
2+
Class for reading spikegadgets files.
3+
Only continuous signals are supported at the moment.
44
55
https://spikegadgets.com/spike-products/
66
7-
Some doc here: https://bitbucket.org/mkarlsso/trodes/wiki/Configuration
7+
Documentation of the format:
8+
https://bitbucket.org/mkarlsso/trodes/wiki/Configuration
89
910
Note :
1011
* this file format have multiple version. news version include the gain for scaling.
1112
The actual implementation do not contain this feature because we don't have
1213
files to test this. So now the gain is "hardcoded" to 1. and so units
1314
is not handled correctly.
1415
15-
The file ".rec" have :
16-
* a fist part in text with xml informations
16+
The ".rec" file format contains:
17+
* a first text part with information in an XML structure
1718
* a second part for the binary buffer
1819
1920
Author: Samuel Garcia
@@ -36,7 +37,7 @@ def __init__(self, filename='', selected_streams=None):
3637
filename ".rec"
3738
selected_streams: None, list, str
3839
sublist of streams to load/expose to API
39-
uselfull for spikeextractor when one stream isneed.
40+
useful for spikeextractor when one stream only is needed.
4041
For instance streams = ['ECU', 'trodes']
4142
'trodes' is name for ephy channel (ntrodes)
4243
"""
@@ -58,7 +59,7 @@ def _parse_header(self):
5859
break
5960

6061
if header_size is None:
61-
ValueError("SpikeGadgets : the xml header do not contain </Configuration>")
62+
ValueError("SpikeGadgets: the xml header does not contain '</Configuration>'")
6263

6364
f.seek(0)
6465
header_txt = f.read(header_size).decode('utf8')
@@ -250,11 +251,11 @@ def _get_analogsignal_chunk(self, block_index, seg_index, i_start, i_stop, strea
250251
chan_mask = self._mask_channels_bytes[stream_id][chan_ind]
251252
stream_mask |= chan_mask
252253

253-
# this do a copy from memmap to memory
254+
# this copies the data from the memmap into memory
254255
raw_unit8_mask = raw_unit8[:, stream_mask]
255256
shape = raw_unit8_mask.shape
256257
shape = (shape[0], shape[1] // 2)
257-
# reshape the and re type by view
258+
# reshape the and retype by view
258259
raw_unit16 = raw_unit8_mask.flatten().view('int16').reshape(shape)
259260

260261
if re_order is not None:

0 commit comments

Comments
 (0)