@@ -1700,6 +1700,15 @@ def read_openephys(
1700
1700
raise Exception ("NP_PROBE field not found in settings" )
1701
1701
return None
1702
1702
1703
+ # In neuropixel plugin 0.7.0, the option for enabling/disabling probes was added.
1704
+ # Make sure we only keep enabled probes.
1705
+ if neuropix_pxi_version >= parse ("0.7.0" ) and neuropix_pxi_version < parse ("1.0.0dev0" ):
1706
+ np_probes = [probe for probe in np_probes if probe .attrib ["isEnabled" ] == "1" ]
1707
+ if len (np_probes ) == 0 :
1708
+ if raise_error :
1709
+ raise Exception ("No enabled probes found in settings" )
1710
+ return None
1711
+
1703
1712
# read probes info
1704
1713
# If STREAMs are not available, probes are sequentially named based on the node id
1705
1714
if not has_streams :
@@ -1861,23 +1870,23 @@ def read_openephys(
1861
1870
if available_probe_name not in stream_name :
1862
1871
if raise_error :
1863
1872
raise Exception (
1864
- f"Inconsistency betweem provided stream { stream_name } and available probe "
1873
+ f"Inconsistency between provided stream { stream_name } and available probe "
1865
1874
f"{ available_probe_name } "
1866
1875
)
1867
1876
return None
1868
1877
if probe_name :
1869
1878
if probe_name != available_probe_name :
1870
1879
if raise_error :
1871
1880
raise Exception (
1872
- f"Inconsistency betweem provided probe name { probe_name } and available probe "
1881
+ f"Inconsistency between provided probe name { probe_name } and available probe "
1873
1882
f"{ available_probe_name } "
1874
1883
)
1875
1884
return None
1876
1885
if serial_number :
1877
1886
if str (serial_number ) != available_serial_number :
1878
1887
if raise_error :
1879
1888
raise Exception (
1880
- f"Inconsistency betweem provided serial number { serial_number } and available serial numbers "
1889
+ f"Inconsistency between provided serial number { serial_number } and available serial numbers "
1881
1890
f"{ available_serial_number } "
1882
1891
)
1883
1892
return None
0 commit comments