[Mne_analysis] extract label time course for resting state data

Peled, Noam NPELED at mgh.harvard.edu
Fri Oct 20 16:46:17 EDT 2017
Search archives:

I ended up using the following code, instead of stc.extract_label_time_course:

label_flip = mne.label_sign_flip(label, src)[:, None].squeeze()
label_flip = np.tile(label_flip, (stc.data.shape[1], 1)).T
label_tc = np.mean(label_flip * stc.data, axis=0)

The problem was in the last line. originally it's:

np.mean(flip * stc.data[vertidx, :], axis=0)

Which doesn't work if the stc was calculated specifically for the label using


mne.minimum_norm.apply_inverse_raw(
    raw, inverse_operator, lambda2, inverse_method, label=label)


Does it make sense?
Thanks,

Noam





________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of Peled, Noam <NPELED at mgh.harvard.edu>
Sent: Friday, October 20, 2017 4:10:46 PM
To: mne_analysis at nmr.mgh.harvard.edu
Subject: [Mne_analysis] extract label time course for resting state data


Hi all,

I'm trying to extract the labels time course for a long resting state data (from HCP)

What would be a good approach for that?

I've tried first to use mne.minimum_norm.apply_inverse_raw, but it was too much for my computer and it crashed because of memory error.

Then, I've tried to create an stc file for each label, to extract later the time course. But then I got the error that the stc is not compatible with source space, which it true.

Maybe I should use the apply_inverse_raw each time for short windows? I prefer to get the full time course of each label if possible.


Thanks,

Noam

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20171020/74410d70/attachment.html 


More information about the Mne_analysis mailing list