[Mne_analysis] [MNE-analysis] stc files to text/csv

Lyam Bailey Lyam.Bailey at dal.ca
Thu Mar 2 11:24:33 EST 2017
Search archives:

Thanks for the help!


I've extracted the time course for the label using mne.extract_label_time_course, and I can write the resulting stc.data to a text file using np.savetxt


So currently this gives me a huge array of values (each one, I believe, representing a different timepoint). Is there a way to specify the 'time step' between successive values in the extracted timecourse? For example, if I only wanted to sample values at 100ms, 200ms and 300ms?


Regards

Lyam

________________________________
From: alexandre.gramfort at gmail.com <alexandre.gramfort at gmail.com> on behalf of Alexandre Gramfort <alexandre.gramfort at telecom-paristech.fr>
Sent: Tuesday, February 28, 2017 10:55:49 AM
To: Discussion and support forum for the users of MNE Software
Cc: Lyam Bailey
Subject: Re: [Mne_analysis] [MNE-analysis] stc files to text/csv

hi,

to go from label to a single time course you can use:

http://martinos.org/mne/stable/generated/mne.extract_label_time_course.html#mne.extract_label_time_course

to access time courses from stc use stc.data

to write an array to text or .csv use numpy.savetxt

https://docs.scipy.org/doc/numpy/reference/generated/numpy.savetxt.html

HTH
Alex

On Mon, Feb 27, 2017 at 10:29 PM, Lyam Bailey <Lyam.Bailey at dal.ca> wrote:
> Dear MNE users,
>
>
> I'm attempting to run source localisation on evoked MEG data from multiple
> subjects, however I'm relatively new to MNE so in need of guidance. So far
> I've computed LCMV beamformer on each subject, and generated a .stc file for
> each. Next I morphed each .stc file to an average brain surface.
>
> I would like to somehow read/extract amplitudes from the .stc files into a
> text/csv format for group analysis purposes - ideally in a way which
> specifies timecourse, ROI (I already have .label files ready) and condition.
> I'd be grateful if someone can point me towards an existing Python script /
> offer any advice on how to proceed.
>
>
> Thanks!
>
>
>
> _______________________________________________
> 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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170302/96fac88f/attachment.html 


More information about the Mne_analysis mailing list