Skip to content

Commit 99501cd

Browse files
authored
black formatting
1 parent af7c53c commit 99501cd

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

neo/rawio/plexonrawio.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ def _parse_header(self):
212212
# To avoid overflow errors when doing arithmetic operations on numpy scalars
213213
np_scalar_to_python_scalar = lambda x: x.item() if isinstance(x, np.generic) else x
214214
bl_header = {key: np_scalar_to_python_scalar(bl_header[key]) for key in bl_header.dtype.names}
215-
215+
216216
current_upper_byte_of_5_byte_timestamp = int(bl_header["UpperByteOf5ByteTimestamp"])
217217
current_bl_timestamp = int(bl_header["TimeStamp"])
218218
timestamp = current_upper_byte_of_5_byte_timestamp * 2**32 + current_bl_timestamp
@@ -260,11 +260,13 @@ def _parse_header(self):
260260
chan_loop = range(nb_sig_chan)
261261
for chan_index in chan_loop:
262262
slow_channel_headers = slowChannelHeaders[chan_index]
263-
263+
264264
# To avoid overflow errors when doing arithmetic operations on numpy scalars
265265
np_scalar_to_python_scalar = lambda x: x.item() if isinstance(x, np.generic) else x
266-
slow_channel_headers = {key: np_scalar_to_python_scalar(slow_channel_headers[key]) for key in slow_channel_headers.dtype.names}
267-
266+
slow_channel_headers = {
267+
key: np_scalar_to_python_scalar(slow_channel_headers[key]) for key in slow_channel_headers.dtype.names
268+
}
269+
268270
name = slow_channel_headers["Name"].decode("utf8")
269271
chan_id = slow_channel_headers["Channel"]
270272
length = self._data_blocks[5][chan_id]["size"].sum() // 2
@@ -281,7 +283,10 @@ def _parse_header(self):
281283
gain = 5000.0 / (2048 * slow_channel_headers["Gain"] * slow_channel_headers["PreampGain"])
282284
elif global_header["Version"] >= 103:
283285
gain = global_header["SlowMaxMagnitudeMV"] / (
284-
0.5 * (2 ** global_header["BitsPerSpikeSample"]) * slow_channel_headers["Gain"] * slow_channel_headers["PreampGain"]
286+
0.5
287+
* (2 ** global_header["BitsPerSpikeSample"])
288+
* slow_channel_headers["Gain"]
289+
* slow_channel_headers["PreampGain"]
285290
)
286291
offset = 0.0
287292

@@ -381,7 +386,10 @@ def _parse_header(self):
381386
)
382387
elif global_header["Version"] >= 105:
383388
wf_gain = global_header["SpikeMaxMagnitudeMV"] / (
384-
0.5 * 2.0 ** (global_header["BitsPerSpikeSample"]) * dsp_channel_headers["Gain"] * global_header["SpikePreAmpGain"]
389+
0.5
390+
* 2.0 ** (global_header["BitsPerSpikeSample"])
391+
* dsp_channel_headers["Gain"]
392+
* global_header["SpikePreAmpGain"]
385393
)
386394
wf_offset = 0.0
387395
wf_left_sweep = -1 # DONT KNOWN

0 commit comments

Comments
 (0)