-
Notifications
You must be signed in to change notification settings - Fork 2
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
antisaccade notebook and initial refactor #3
Conversation
event_dict = {event: int(i) + 1 | ||
for i, event in enumerate(stim_names) | ||
if event != 'STI 014'} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand it when you did
for i in range(0,len(stim_names)-1):
event_dict[stim_names[i]] = i + 1
You wanted to create a dict
with each stim
channel as a key, and an integer (starting at 1) as a value, excluding the last stim
channel.. STI 014
. If True, I'd prefer this method as it is a little more explicit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact now that I'm looking at this I realized that You don't even need the int()
wrapped around that i
. I don't know why I did that.
print('no dstr label found.. continuing')""" | ||
|
||
return event_dict | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wrapping that whole commented section in triple quotes instead of having a #
on each line.
|
||
# calculate the inter trial interval between stimulus onset DIN events | ||
eeg_iti = np.diff(eeg_stims[:, 0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I refactored the section starting with elif task_name == as
.
I used np.where
to do matrix operations instead of a big for loop of the indices. I Tested the code on my side.
Can this be merged? @jadesjardins, how many changes have you made to your notebooks since you last pushed? |
Alternatively, If I don't hear back I will assume I have administrator rights and will merge next week. |
Hey @jadesjardins let me know if the code in this PR still works for you (I havent' tested in a while). On a related note I opened mne-tools/mne-python#12300 with MNE to read EGI events directly as annotations, which should make your lives easier. I started a branch for standardizing external pilot files (starting with GO), but havent' gotten around to finishing it yet.. |
yes, thanks... I had been developing things locally in an unorganized way and now I am working on bringing everything together to be current and get q1k BIDS compliant at the onset. The direct read of events to annotations would be great! thanks! I am testing a generic BIDS process to run pylossless.. once that I am happy with that I am going to start working with the events and task specific details. I will take a look at what you have done with GO. |
Alright I'll try to push that forward for you in the next week or two! If I can't I'll share the WIP work for GO that I have. |
Hey @jadesjardins I created a notebook specifically for antisaccade (so different team members don't have to change the subject/task when they pull the notebook if they want to work on a different task).
I Also refactored some of the code.. I'll leave comments to those sections for you.
As far as AS - we are close...
The head channels show up and do have the gaps as I'd expect (just visually inspecting). But the eyegaze and pupil channels are missing.