From d8b8c5284a3fac925dd8103bc3b76613473d61e2 Mon Sep 17 00:00:00 2001 From: Divyansh Gupta Date: Tue, 12 Dec 2023 18:20:15 +0100 Subject: [PATCH 1/2] Parse spikeglx nidq without gate or trigger number --- neo/rawio/spikeglxrawio.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/neo/rawio/spikeglxrawio.py b/neo/rawio/spikeglxrawio.py index 15f969e5d..3c02e41ac 100644 --- a/neo/rawio/spikeglxrawio.py +++ b/neo/rawio/spikeglxrawio.py @@ -331,10 +331,16 @@ def parse_spikeglx_fname(fname): stream_kind = None else: # the naming do not correspond lets try something more easy + # example: sglx_xxx.imec0.ap r = re.findall(r'(\S*)\.(\S*).(ap|lf)', fname) if len(r) == 1: run_name, device, stream_kind = r[0] gate_num, trigger_num = None, None + else: + #easy case for nidaq, example: sglx_xxx.nidq + r = re.findall(r'(\S*)\.(\S*)', fname) + run_name, device = r[0] + gate_num, trigger_num, stream_kind = None, None, None if gate_num is not None: gate_num = int(gate_num) From 3388557c4841c81638620e30da5e84f6663aed97 Mon Sep 17 00:00:00 2001 From: Divyansh Gupta Date: Tue, 12 Dec 2023 18:31:33 +0100 Subject: [PATCH 2/2] pep8 fix --- neo/rawio/spikeglxrawio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neo/rawio/spikeglxrawio.py b/neo/rawio/spikeglxrawio.py index 3c02e41ac..4b6850929 100644 --- a/neo/rawio/spikeglxrawio.py +++ b/neo/rawio/spikeglxrawio.py @@ -337,7 +337,7 @@ def parse_spikeglx_fname(fname): run_name, device, stream_kind = r[0] gate_num, trigger_num = None, None else: - #easy case for nidaq, example: sglx_xxx.nidq + # easy case for nidaq, example: sglx_xxx.nidq r = re.findall(r'(\S*)\.(\S*)', fname) run_name, device = r[0] gate_num, trigger_num, stream_kind = None, None, None