File tree Expand file tree Collapse file tree
data/openephys/OE_1.0_Neuropix-PXI-multi-probe Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1650,15 +1650,12 @@ def read_openephys(
16501650 info_chain = root .find ("INFO" )
16511651 oe_version = parse (info_chain .find ("VERSION" ).text )
16521652 neuropix_pxi = None
1653- record_node = None
16541653 for signal_chain in root .findall ("SIGNALCHAIN" ):
16551654 for processor in signal_chain :
16561655 if "PROCESSOR" == processor .tag :
16571656 name = processor .attrib ["name" ]
16581657 if "Neuropix-PXI" in name :
16591658 neuropix_pxi = processor
1660- if "Record Node" in name :
1661- record_node = processor
16621659
16631660 if neuropix_pxi is None :
16641661 if raise_error :
@@ -1689,8 +1686,14 @@ def read_openephys(
16891686 has_streams = False
16901687 probe_names_used = None
16911688
1689+ # for Open Ephys version < 1.0 np_probes is in the EDITOR field.
1690+ # for Open Ephys version >= 1.0 np_probes is in the CUSTOM_PARAMETERS field.
16921691 editor = neuropix_pxi .find ("EDITOR" )
1693- np_probes = editor .findall ("NP_PROBE" )
1692+ if oe_version < parse ("0.9.0" ):
1693+ np_probes = editor .findall ("NP_PROBE" )
1694+ else :
1695+ custom_parameters = editor .find ("CUSTOM_PARAMETERS" )
1696+ np_probes = custom_parameters .findall ("NP_PROBE" )
16941697
16951698 if len (np_probes ) == 0 :
16961699 if raise_error :
You can’t perform that action at this time.
0 commit comments