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

Updating make_epochs to current version of mne #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stfnrpplngr
Copy link

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.

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)
Copy link
Author

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)]
Copy link
Author

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,
Copy link
Author

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.

@stfnrpplngr stfnrpplngr changed the title Bringing the Epochs call in line with updated version Updating make_epochs to current version of mne May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant