catalystneuro / ecogVIS

Time series visualizer and data processing tools for Electrocorticography (ECoG) signals stored in NWB files, for Python.
BSD 3-Clause "New" or "Revised" License
23 stars 18 forks source link

How to load HTK data? #115

Closed bendichter closed 4 years ago

bendichter commented 4 years ago

When I select a RawHTK folder, I get

reading htk acquisition...
Traceback (most recent call last):
  File "/Users/bendichter/dev/ecogVIS/ecogvis/ecogvis.py", line 519, in open_htk_dir
    htk_config=w.htk_config,
  File "/Users/bendichter/dev/ecogVIS/ecogvis/functions/htk_to_nwb/chang2nwb.py", line 287, in chang2nwb
    ecog_rate, data = readhtks(ecog_path)
  File "/Users/bendichter/dev/ecogVIS/ecogvis/functions/htk_to_nwb/chang2nwb.py", line 63, in readhtks
    numbers = [f.name.split('.')[0].split('Wav')[1] for f in Path(htk_path).glob('*.htk')]
  File "/Users/bendichter/dev/ecogVIS/ecogvis/functions/htk_to_nwb/chang2nwb.py", line 63, in <listcomp>
    numbers = [f.name.split('.')[0].split('Wav')[1] for f in Path(htk_path).glob('*.htk')]
IndexError: list index out of range
luiztauffer commented 4 years ago

It seems like its not finding files with the specific names format. Are you using the RawHTK folder that was shared with us? Its content should look like this:

image

bendichter commented 4 years ago

fixed OSX-specific issue