Skip to content

Commit

Permalink
Merge pull request #1362 from guptadivyansh/master
Browse files Browse the repository at this point in the history
Parse spikeglx nidq without gate or trigger number
  • Loading branch information
alejoe91 authored Jan 31, 2024
2 parents 790d09c + 3388557 commit 0b2e3ce
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions neo/rawio/spikeglxrawio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0b2e3ce

Please sign in to comment.