[Mne_analysis] how to save source estamates from epoched data set with multiple events

David Leitman leitman at mail.med.upenn.edu
Mon Jan 13 13:58:29 EST 2014
Search archives:

Hi all,
 I am trying to extract from a structural roi a time series source estimate for each one of the epoch in each of my conditions 

first I read in the saved epoched data fif file:

 epochs=mne.read_epochs(fname_epoched)

next I apply the inverse operator that I created using the evoked data and the anatomic label previously created  and execute the following:

stcs = apply_inverse_epochs(epochs,inverse_operator, lambda2, method, anat_label1,
                            pick_ori="normal")

what I would like to do next is calculate the mean activation within this roi comprising 480 vertices. so that I have one average value for each of my epochs and conditions and save an output matrix comprising time series for each epoch and including a vector for event id 

I tried picking up from the a similar stage in the plot_compute_mne_inverse_epochs_in_label.py substituting my commands above for

# Read epochs
epochs = mne.Epochs(raw, events, event_id, tmin, tmax, picks=picks,
                    baseline=(None, 0), reject=dict(mag=4e-12, grad=4000e-13,
                                                    eog=150e-6))

# Compute inverse solution and stcs for each epoch
stcs = apply_inverse_epochs(epochs, inverse_operator, lambda2, method, label,
                            pick_ori="normal")

mean_stc = sum(stcs) / len(stcs)


but mean_stc is not what I want and stcs does not have attribute save like for example stc.save

any help would be appreciated
thanks dave







More information about the Mne_analysis mailing list