File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,7 +82,9 @@ def _parse_bci2k_header(fname):
8282 left , right = line .split ("=" , 1 )
8383 left_tokens = left .strip ().split ()
8484 name = left_tokens [- 1 ]
85- param_type = left_tokens [- 2 ].lower () if len (left_tokens ) >= 2 else ""
85+ param_type = (
86+ left_tokens [- 2 ].lower () if len (left_tokens ) >= 2 else ""
87+ )
8688 rhs = right .split ("//" , 1 )[0 ].strip ()
8789 rhs_tokens = rhs .split ()
8890 if not rhs_tokens :
@@ -183,7 +185,9 @@ def _read_bci2k_data(fname, info_dict):
183185 "Expected SourceChOffset and SourceChGain lengths to match SourceCh."
184186 )
185187 offsets_arr = np .array ([_parse_value_with_unit (val )[0 ] for val in offsets ])
186- gain_parsed = [_parse_value_with_unit (val , unit_scale = _VOLT_SCALE ) for val in gains ]
188+ gain_parsed = [
189+ _parse_value_with_unit (val , unit_scale = _VOLT_SCALE ) for val in gains
190+ ]
187191 gains_arr = np .array ([val for val , _ in gain_parsed ])
188192 gain_scales = np .array ([scale for _ , scale in gain_parsed ])
189193 signal = (signal + offsets_arr [:, np .newaxis ]) * (
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ def test_read_raw_bci2k():
2929 assert events .ndim == 2
3030 assert events .shape [1 ] == 3
3131 assert "RawBCI2k" in repr (raw )
32-
32+
3333 info_dict = _parse_bci2k_header (bci2k_fname )
3434 assert info_dict ["params" ]["SourceChOffset" ] == ["0" , "0" ]
3535 assert info_dict ["params" ]["SourceChGain" ] == ["0.1muV" , "0.1muV" ]
You can’t perform that action at this time.
0 commit comments