Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #3 #6

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion neurokin/experiments/neural_correlates.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ def get_neural_correlates_dict(neural_path,
raw, fs = get_neural_ch(neural_path, channel_of_interest, name)
is_valid_name = True
break
except:
except (AttributeError, TypeError):
pass
if not is_valid_name:
raise Exception("All stream names were invalid")
Expand Down
7 changes: 3 additions & 4 deletions neurokin/utils/neural/importing.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ def import_tdt_channel_data(folderpath, ch=0, t1=0, t2=-1, stream_name="Wav1", s
raw = stored.data
fs = stored.fs

except AttributeError:
print(f"No stream named {stream_name}, please specify the correct stream_name \n "
f"Please chose from: {data.streams.__dict__.keys()}")
except AttributeError(f"No stream named {stream_name}, please specify the correct stream_name \n "
f"Please chose from: {data.streams.__dict__.keys()}"):
return

s1 = 0
Expand All @@ -83,7 +82,7 @@ def import_tdt_channel_data(folderpath, ch=0, t1=0, t2=-1, stream_name="Wav1", s
return
stim_data = stim_data[..., s1:s2]

if fs_sync is None:
if fs_sync is not None:
if fs_sync != fs:
print("Warning: sync frequency is different from the data frequency")

Expand Down