Skip to content

Commit b9e4005

Browse files
authored
Merge branch 'master' into fix-plexon2-action
2 parents 1a521ec + 132c84e commit b9e4005

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

doc/source/authors.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ and may not be the current affiliation of a contributor.
9797
* Luiz Tauffer [24]
9898
* Akshaj Verma [46]
9999
* Letizia Signorelli [47]
100+
* Daniel Parthier [48]
100101

101102
1. Centre de Recherche en Neuroscience de Lyon, CNRS UMR5292 - INSERM U1028 - Université Claude Bernard Lyon 1
102103
2. Unité de Neuroscience, Information et Complexité, CNRS UPR 3293, Gif-sur-Yvette, France
@@ -145,6 +146,7 @@ and may not be the current affiliation of a contributor.
145146
45. Maxwell Biosystems AG
146147
46. Brain Center, University Medical Center Utrecht, Utrecht University, The Netherlands
147148
47. Centre for Molecular Medicine Norway (NCMM), University of Oslo, Norway
149+
48. Charité - Universitätmedizin Berlin, Freie Universität Berlin and Humboldt Universität zu Berlin
148150

149151

150152

neo/rawio/winwcprawio.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"""
1010

1111
import struct
12+
import datetime
1213

1314
import numpy as np
1415

@@ -61,6 +62,7 @@ def _parse_header(self):
6162
continue
6263
key, val = line.split("=")
6364
if key in [
65+
"VER",
6466
"NC",
6567
"NR",
6668
"NBH",
@@ -80,6 +82,12 @@ def _parse_header(self):
8082
header[key] = val
8183

8284
nb_segment = header["NR"]
85+
86+
# get rec_datetime when WCP data file version is later than 8
87+
if header["VER"] > 8:
88+
rec_datetime = datetime.datetime.strptime(header["RTIME"], "%d/%m/%Y %H:%M:%S")
89+
else:
90+
rec_datetime = None
8391
all_sampling_interval = []
8492
# loop for record number
8593
for seg_index in range(header["NR"]):
@@ -167,6 +175,8 @@ def _parse_header(self):
167175

168176
# insert some annotation at some place
169177
self._generate_minimal_annotations()
178+
bl_annotations = self.raw_annotations["blocks"][0]
179+
bl_annotations["rec_datetime"] = rec_datetime
170180

171181
def _segment_t_start(self, block_index, seg_index):
172182
return 0.0

neo/test/iotest/test_winwcpio.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ class TestRawBinarySignalIO(
1414
):
1515
ioclass = WinWcpIO
1616
entities_to_download = ["winwcp"]
17-
entities_to_test = ["winwcp/File_winwcp_1.wcp"]
17+
entities_to_test = [
18+
"winwcp/File_winwcp_1.wcp",
19+
"winwcp/file_with_recording_time/File_winwcp_2.wcp",
20+
]
1821

1922

2023
if __name__ == "__main__":

neo/test/rawiotest/test_winwcprawio.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ class TestWinWcpRawIO(
1010
):
1111
rawioclass = WinWcpRawIO
1212
entities_to_download = ["winwcp"]
13-
entities_to_test = ["winwcp/File_winwcp_1.wcp"]
13+
entities_to_test = [
14+
"winwcp/File_winwcp_1.wcp",
15+
"winwcp/file_with_recording_time/File_winwcp_2.wcp",
16+
]
1417

1518

1619
if __name__ == "__main__":

0 commit comments

Comments
 (0)