[Mne_analysis] Creating Events in fif file
Martin Luessi
mluessi at nmr.mgh.harvard.edu
Wed Jul 25 13:13:00 EDT 2012
Hi Anna,
See below for my reply. Maybe others can chime in with ideas on how to
analyze your data.
On 07/25/12 11:47, Herlihy, Anna wrote:
> 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
> I'm quite new to all of this and would appreciate any help you may have!
>
> Thank you,
>
> Anna
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
--
Martin Luessi, Ph.D.
Research Fellow
Department of Radiology
Athinoula A. Martinos Center for Biomedical Imaging
Massachusetts General Hospital
Harvard Medical School
149 13th Street
Charlestown, MA 02129
Fax: +1 617 726-7422
More information about the Mne_analysis
mailing list