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

Alexandre Gramfort alexandre.gramfort at telecom-paristech.fr
Mon Jan 13 17:43:08 EST 2014
Search archives:

hi David,

have a look at:

http://martinos.org/mne/stable/auto_examples/inverse/plot_label_source_activations.html

extract_label_time_course will give you a time series per stc, then you can make
an array from all time courses and save it as a numpy binary file with np.save

let me know if you need more help

HTH
Alex


On Mon, Jan 13, 2014 at 7:58 PM, David Leitman
<leitman at mail.med.upenn.edu> wrote:
> 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
>
>
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.
>




More information about the Mne_analysis mailing list