Skip to content

Commit 976c4aa

Browse files
authored
Merge pull request #1662 from NeuralEnsemble/black-formatting
Black formatting
2 parents 1310e83 + e6ca447 commit 976c4aa

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

neo/rawio/openephysbinaryrawio.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ def _parse_header(self):
144144
# the channel is removed from stream but not the buffer
145145
stream_id = ""
146146

147-
if "ADC" in chan_id:
147+
if "ADC" in chan_id:
148148
# These are non-neural channels and their stream should be separated
149149
# We defined their stream_id as the stream_index of neural data plus the number of neural streams
150150
# This is to not break backwards compatbility with the stream_id numbering
151151
stream_id = str(stream_index + len(sig_stream_names))
152-
152+
153153
gain = float(chan_info["bit_volts"])
154154
sampling_rate = float(info["sample_rate"])
155155
offset = 0.0
@@ -224,13 +224,13 @@ def _parse_header(self):
224224
"SYNC channel is not present in the recording. " "Set load_sync_channel to False"
225225
)
226226

227-
228-
229227
# Check if ADC and non-ADC channels are contiguous
230228
is_channel_adc = ["ADC" in ch["channel_name"] for ch in info["channels"]]
231229
if any(is_channel_adc):
232230
first_adc_index = is_channel_adc.index(True)
233-
non_adc_channels_after_adc_channels = [not is_adc for is_adc in is_channel_adc[first_adc_index:]]
231+
non_adc_channels_after_adc_channels = [
232+
not is_adc for is_adc in is_channel_adc[first_adc_index:]
233+
]
234234
if any(non_adc_channels_after_adc_channels):
235235
raise ValueError(
236236
"Interleaved ADC and non-ADC channels are not supported. "
@@ -463,7 +463,7 @@ def _parse_header(self):
463463

464464
if has_sync_trace:
465465
values = values[:-1]
466-
466+
467467
neural_channels = [ch for ch in info["channels"] if "ADC" not in ch["channel_name"]]
468468
num_neural_channels = len(neural_channels)
469469
if is_neural_stream:

neo/test/rawiotest/test_openephysbinaryrawio.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class TestOpenEphysBinaryRawIO(BaseTestRawIO, unittest.TestCase):
1616
"openephysbinary/v0.6.x_neuropixels_multiexp_multistream",
1717
"openephysbinary/v0.6.x_neuropixels_with_sync",
1818
"openephysbinary/v0.6.x_neuropixels_missing_folders",
19-
"openephysbinary/neural_and_non_neural_data_mixed"
19+
"openephysbinary/neural_and_non_neural_data_mixed",
2020
]
2121

2222
def test_sync(self):
@@ -89,6 +89,5 @@ def test_separating_stream_for_non_neural_data(self):
8989
assert rawio.header["signal_streams"]["name"].tolist() == ["Rhythm_FPGA-100.0", "Rhythm_FPGA-100.0_ADC"]
9090

9191

92-
9392
if __name__ == "__main__":
9493
unittest.main()

0 commit comments

Comments
 (0)