|
37 | 37 | from pathlib import Path |
38 | 38 | import json |
39 | 39 | import datetime |
40 | | -import sys |
| 40 | +import sys |
41 | 41 | import re |
42 | 42 |
|
43 | 43 | import numpy as np |
@@ -165,7 +165,7 @@ def _parse_header(self): |
165 | 165 | # and because all data is stored in the same buffer stream for the moment all channels |
166 | 166 | # will be in stream_id = 0. In the future this will be split into sub_streams based on |
167 | 167 | # type but for now it will be the end-users responsability for this. |
168 | | - stream_id = '0' # hard-coded see note above |
| 168 | + stream_id = "0" # hard-coded see note above |
169 | 169 | for channel_index, channel_name in enumerate(channel_info["chan_name"]): |
170 | 170 | channel_id = channel_info["ntv_chan_name"][channel_index] |
171 | 171 | # 'ai0' indicates analog data which is stored as microvolts |
@@ -223,11 +223,11 @@ def _parse_header(self): |
223 | 223 |
|
224 | 224 | # date comes out as: '2024-07-01T13:04:49.4972245-04:00' so in ISO format |
225 | 225 | datetime_string = self.metadata["status"]["start_time"] |
226 | | - |
| 226 | + |
227 | 227 | # Python 3.10 and older expect iso format to only have 3 or 6 decimal places |
228 | 228 | if sys.version_info.minor < 11: |
229 | 229 | datetime_string = re.sub(r"(\.\d{6})\d+", r"\1", datetime_string) |
230 | | - |
| 230 | + |
231 | 231 | rec_datetime = datetime.datetime.fromisoformat(datetime_string) |
232 | 232 |
|
233 | 233 | bl_annotations = self.raw_annotations["blocks"][0] |
@@ -297,4 +297,4 @@ def read_metadata(self, fname_metadata): |
297 | 297 | # this is pretty useless right now, but I think after a |
298 | 298 | # refactor with sub streams we could adapt this for the sub-streams |
299 | 299 | # so let's leave this here for now :) |
300 | | -stream_id_to_stream_name = {'0': "Neuronexus Allego Data"} |
| 300 | +stream_id_to_stream_name = {"0": "Neuronexus Allego Data"} |
0 commit comments