[Mne_analysis] Computing Connectivity 1Samp Cluster
Geller, Jason
jason-geller at uiowa.edu
Mon Oct 28 16:47:51 EDT 2019
External Email - Use Caution
Hello,
I am trying to compute the connectivity matrix after having morphed all my Ss to fsaverage so I can perform a cluster permutation test. I keep getting this error:
ValueError: connectivity (len 8196) must be of the correct size, i.e. be equal to or evenly divide the number of tests (50370156).
If connectivity was computed for a source space, try using the fwd["src"] or inv["src"] as some original source space vertices can be excluded during forward computation
This is the function I am using to get stcs for each Subject and Condition;
def morph_data_to_fsaverage(subject, inverse, path6, stc, save_dir, subjects_dir, method, overwrite):
inverse_operator = read_inverse_operator(inverse + subject + '-inv.fif') # each subject inv file
src=mne.read_source_spaces(path6 +'fsaverage-oct-6-src.fif') #fsaverage src
stcs = mne.read_source_estimate(stc + subject + '_' + 'NS' + '_' + 'dSPM' + '-lh.stc') # only left hemisphere
subject_to = 'fsaverage'
stc_morph_name = subject + '_' + 'VO6' + '_' + method + '_morph'
stc_morph_path = save_dir + stc_morph_name
src=inverse_operator['src']
stcs_morph = mne.compute_source_morph(src,subject_to,
subjects_dir=subjects_dir).apply(stcs)
stcs_morph.save(stc_morph_path)
________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of mne_analysis-request at nmr.mgh.harvard.edu <mne_analysis-request at nmr.mgh.harvard.edu>
Sent: Sunday, October 27, 2019 11:00 AM
To: mne_analysis at nmr.mgh.harvard.edu <mne_analysis at nmr.mgh.harvard.edu>
Subject: [External] Mne_analysis Digest, Vol 141, Issue 33
Send Mne_analysis mailing list submissions to
mne_analysis at nmr.mgh.harvard.edu
To subscribe or unsubscribe via the World Wide Web, visit
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
or, via email, send a message with subject or body 'help' to
mne_analysis-request at nmr.mgh.harvard.edu
You can reach the person managing the list at
mne_analysis-owner at nmr.mgh.harvard.edu
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Mne_analysis digest..."
Today's Topics:
1. Re: INCORRECT VALUES PRODUCED WHEN EPOCHING A CONTINOUS
DISCRETE SIGNAL USING MNE EPOCH FUNCTION (Dan McCloy)
----------------------------------------------------------------------
Message: 1
Date: Sat, 26 Oct 2019 09:58:29 -0700
From: Dan McCloy <dan.mccloy at gmail.com>
Subject: Re: [Mne_analysis] INCORRECT VALUES PRODUCED WHEN EPOCHING A
CONTINOUS DISCRETE SIGNAL USING MNE EPOCH FUNCTION
To: Discussion and support forum for the users of MNE Software
<mne_analysis at nmr.mgh.harvard.edu>
Message-ID:
<CAOE0pYk3hiXO_6ZPAJb0Xy8DMChf4juXmEkO7Y1eeJjdTdu+=g at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
External Email - Use Caution
mne.Epochs defaults to tmin=-0.2 and tmax=0.5. So you are not getting
20-second long epochs, you are getting 700ms epochs. You need to set, for
example, tmin=0 and tmax=20, or tmin=-5 and tmax=15, etc.
On Sat, Oct 26, 2019 at 6:47 AM RODNEY PETRUS BALANDONG <
rodney.petrus_g03291 at utp.edu.my> wrote:
> External Email - Use Caution
>
> Dear All,
>
>
>
> The idea was to epoch the continuous EEG data of 386.936 s long into non
> overlapping epoch window, of size 20 s. With a sampling frequency 250 Hz,
> theoretically each epochs should contain 5000 data points per epoch.
>
>
>
> To achieve the objective, the following code was utilised,
>
>
>
> *epochs = mne.Epochs(raw, events=events, event_id=event_id,
> baseline=None, verbose=True)*
>
> *MneApproach=epochs.to_data_frame()*
>
>
>
>
>
> To confirm whether the value return from the mne.Epoch was correct or
> not, I had created a script that can performed the epoching manually. The
> output from the script has been validated visually and was working as
> intended.
>
> However, I noticed there were different between the script output and the
> value from dataframe MneApproach. Apart from different values, the
> MneApproach contained only 176 datasets per epoch.
>
>
>
> May I know what did I do wrong while inputting the mne.Epoch function.
>
>
>
> The above problem can be reproduced from the following ipynb
> <https://colab.research.google.com/github/balandongiv/Downsample/blob/master/helpMne.ipynb>
> via Google Colab
>
>
>
>
>
> Really appreciate for any feedback and help.
>
>
>
> Regards
>
> Rpb
> DISCLAIMER : This e-mail and any files transmitted with it ("Message") is
> intended only for the use of the recipient(s) named above and may contain
> confidential information. You are hereby notified that the taking of any
> action in reliance upon, or any review, retransmission, dissemination,
> distribution, printing or copying of this Message or any part thereof by
> anyone other than the intended recipient(s) is strictly prohibited. If you
> have received this Message in error, you should delete this Message
> immediately and advise the sender by return e-mail. Opinions, conclusions
> and other information in this Message that do not relate to the official
> business of Universiti Teknologi PETRONAS (UTP) shall be understood as
> neither given nor endorsed by Universiti Teknologi PETRONAS (UTP).
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20191026/93e1d4ba/attachment-0001.html
------------------------------
_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
End of Mne_analysis Digest, Vol 141, Issue 33
*********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20191028/9a0d454a/attachment.html
More information about the Mne_analysis
mailing list