Hi Anna,
See below for my reply. Maybe others can chime in with ideas on how to
analyze your data.
Hi!
I'm currently working with Catherine Kerr on some meditation data
(collected at Martinos) and would like to use the mne python library.
We are looking to run induced power on our data sets using the python
mne tool. Unfortunately our data is resting data and does not have
easily recognizable events (not much is picked up by mne.find_events),
mne will only find events if stim channels were used. So if your
experiment doesn't have any predefined events you will not get anything
using mne.find_events
and we'd like to define our own events/epochs. We'd also like to look at
data with no events.
Is there a way to do this with python? If not, is there a way to
predefine these events using another tool (maybe mne_browse_raw) and
then plug the .fif output into mne's induced_power function.
Defining your own events in mne-python is simple. If you look at the
example
http://martinos.org/mne/auto_examples/extract_events_from_raw.html
You see that "events" is a "number of events" x 3 matrix. The first
column is the event time (in samples) and the last the event ID. Say you
want to create evenly spaced events 1s apart you would use (assuming
1kHz sampling rate, excluding 1s at the start and end):
t_events = np.arange(raw.first_samp + 1000, raw.last_samp - 1000, 1000)
events = np.zeros((len(ev_times), 3), dtype=np.int)
events[:, 0] = ev_times
events[:, 2] = 1 # ID of the event
You can then use this event matrix to create epochs etc. in mne-python.
That being said, as your data is resting data, you will not find
anything by averaging epochs. As there is no signal that is time locked
to the events. An alternative approach may be to compute the inverse
solution for different frequency bands and then compare the power in
source space for different conditions.
I hope this helps,
Martin