diff --git a/neo/rawio/neuralynxrawio/ncssections.py b/neo/rawio/neuralynxrawio/ncssections.py index 016f49c89..ea62528d1 100644 --- a/neo/rawio/neuralynxrawio/ncssections.py +++ b/neo/rawio/neuralynxrawio/ncssections.py @@ -411,12 +411,12 @@ def build_for_ncs_file(ncsMemMap, nlxHdr): # digital lynx style with fractional frequency and micros per samp determined from # block times - elif acqType == "DIGITALLYNX" or acqType == "DIGITALLYNXSX": + elif acqType == "DIGITALLYNX" or acqType == "DIGITALLYNXSX" or acqType == 'CHEETAH64': nomFreq = nlxHdr['sampling_rate'] nb = NcsSectionsFactory._buildForMaxGap(ncsMemMap, nomFreq) - # BML style with fractional frequency and micros per samp - elif acqType == "BML": + # BML & ATLAS style with fractional frequency and micros per samp + elif acqType == "BML" or acqType == "ATLAS": sampFreqUsed = nlxHdr['sampling_rate'] nb = NcsSectionsFactory._buildGivenActualFrequency(ncsMemMap, sampFreqUsed, math.floor(sampFreqUsed)) diff --git a/neo/rawio/neuralynxrawio/nlxheader.py b/neo/rawio/neuralynxrawio/nlxheader.py index dddcc8f77..7a0aa981c 100644 --- a/neo/rawio/neuralynxrawio/nlxheader.py +++ b/neo/rawio/neuralynxrawio/nlxheader.py @@ -152,14 +152,14 @@ def __init__(self, filename): # convert channel ids if 'channel_ids' in self: - chid_entries = re.findall(r'\w+', self['channel_ids']) + chid_entries = re.findall(r'\S+', self['channel_ids']) self['channel_ids'] = [int(c) for c in chid_entries] else: self['channel_ids'] = ['unknown'] # convert channel names if 'channel_names' in self: - name_entries = re.findall(r'\w+', self['channel_names']) + name_entries = re.findall(r'\S+', self['channel_names']) if len(name_entries) == 1: self['channel_names'] = name_entries * len(self['channel_ids']) assert len(self['channel_names']) == len(self['channel_ids']), \ @@ -288,6 +288,13 @@ def type_of_recording(self): elif self['HardwareSubSystemType'] == 'DigitalLynxSX': return 'DIGITALLYNXSX' + # Cheetah64 + elif self['HardwareSubSystemType'] == 'Cheetah64': + return 'CHEETAH64' + + else: + return 'UNKNOWN' + elif 'FileType' in self: if self['FileVersion'] in ['3.3', '3.4']: