Skip to content

Commit

Permalink
Add Cheetah560 headers and acquisition type.
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter N. Steinmetz authored and Peter N. Steinmetz committed Apr 13, 2023
1 parent b7fb77e commit a53d6c2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions neo/rawio/neuralynxrawio/nlxheader.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ def _to_bool(txt):
r' At Time: (?P<time>\S+)',
filename_regex=r'## File Name: (?P<filename>\S+)',
datetimeformat='%m/%d/%Y %H:%M:%S.%f'),
# Cheetah version 5.6.0, some range of versions in between
'v5.6.0': dict(
datetime1_regex=r'## Time Opened: \(m/d/y\): (?P<date>\S+)'
r' At Time: (?P<time>\S+)',
filename_regex=r'## File Name: (?P<filename>\S+)',
datetimeformat='%m/%d/%Y %H:%M:%S.%f'),
# Cheetah version 5 before and including v 5.6.4 as well as version 1
'bv5.6.4': dict(
datetime1_regex=r'## Time Opened \(m/d/y\): (?P<date>\S+)'
Expand Down Expand Up @@ -223,6 +229,8 @@ def __init__(self, filename):
hpd = NlxHeader.header_pattern_dicts['bv5']
elif av <= Version('5.4.0'):
hpd = NlxHeader.header_pattern_dicts['v5.4.0']
elif av == Version('5.6.0'):
hpd = NlxHeader.header_pattern_dicts['v5.6.0']
elif av <= Version('5.6.4'):
hpd = NlxHeader.header_pattern_dicts['bv5.6.4']
else:
Expand Down Expand Up @@ -303,11 +311,11 @@ def type_of_recording(self):

elif 'FileType' in self:

if self['FileVersion'] in ['3.3', '3.4']:
if 'FileVersion' in self and self['FileVersion'] in ['3.3', '3.4']:
return self['AcquisitionSystem'].split()[1].upper()

else:
return 'UNKNOWN'
return 'CHEETAH560' # only known case of FileType without FileVersion

else:
return 'UNKNOWN'

0 comments on commit a53d6c2

Please sign in to comment.