@@ -499,11 +499,9 @@ def _read_oebin_electrode_indices(oebin_file, stream_name):
499499 """Read electrode_index metadata from an oebin file for a given stream."""
500500 with open (oebin_file ) as f :
501501 oebin = json .load (f )
502- is_neo_stream = "#" in stream_name
503- oebin_stream_name = stream_name .split ("#" )[- 1 ] if is_neo_stream else stream_name
504502 for cs in oebin .get ("continuous" , []):
505503 folder_name = cs .get ("folder_name" , "" ).rstrip ("/" )
506- if folder_name == oebin_stream_name :
504+ if folder_name == stream_name :
507505 indices = []
508506 for ch in cs .get ("channels" , []):
509507 for m in ch .get ("channel_metadata" , []):
@@ -526,6 +524,8 @@ def test_read_openephys_with_oebin_wiring():
526524
527525 assert probe .get_contact_count () == 384
528526 assert probe .device_channel_indices is not None
527+ assert "adc_group" in probe .contact_annotations
528+ assert "adc_sample_order" in probe .contact_annotations
529529
530530 # Wiring invariant
531531 oebin_electrode_indices = _read_oebin_electrode_indices (oebin , stream_name )
@@ -708,7 +708,6 @@ def test_read_openephys_onebox_nonsequential_wiring():
708708 f"at column { column } , got { oebin_electrode_indices [column ]} "
709709 )
710710
711-
712711if __name__ == "__main__" :
713712 # test_multiple_probes()
714713 # test_NP_Ultra()
0 commit comments