-
Notifications
You must be signed in to change notification settings - Fork 16
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
Updating make_epochs to current version of mne #17
base: master
Are you sure you want to change the base?
Conversation
In stream.py calling the Epochs function has been updated to the current version in mne-python. The making of events from marker stream data has been made more explicit. Minor changes have been made in the send_eeg_data.py demonstration file.
@@ -75,9 +75,8 @@ def make_events(data, marker_stream, event_duration=0): | |||
lower_time_limit = data[-1, 0] | |||
upper_time_limit = data[-1, -1] | |||
# Copy markers into a Numpy ndarray. | |||
tmp = np.array([row[:] for row in marker_stream.data | |||
if upper_time_limit >= row[-1] >= lower_time_limit], | |||
dtype=np.int32) |
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.
Without sticking to integer values, fine grained times (because of a high sampling rate) don't end up in confusing values after rounding.
@@ -38,9 +37,9 @@ | |||
i = 1 | |||
while True: | |||
y = np.sin(2 * np.pi * f * i / Fs) | |||
sample = [y for __ in xrange(n_chs)] | |||
sample = [y for __ in range(n_chs)] |
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 Python 3, there is no xrange.
@@ -298,11 +297,11 @@ def make_epochs(self, marker_stream, data_duration=None, events=None, | |||
raw = self.ica.apply(raw) | |||
# Should this be changed? ICA.apply() works in-place on raw. | |||
return Epochs(raw, events, event_id=event_id, tmin=tmin, tmax=tmax, | |||
baseline=baseline, picks=picks, name=name, | |||
baseline=baseline, picks=picks, |
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.
Those arguments aren't in the Epochs function of mne-python anymore.
In stream.py calling the
Epochs
function has been updated to the current version in mne-python.The making of events from
marker stream
data has been made more explicit.Minor changes have been made in the send_eeg_data.py demonstration file.