<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><p><span style="padding: 3px 10px; border-radius: 5px; color: #ffffff; font-weight: bold; display: inline-block; background-color: #ff0000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;External Email - Use Caution&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p><p></p>
I can’t recall offhand if there is an explicit way to do this. One work around would be to loop through your epochs and send them one-by-one. In prior versions, you could need to put the epoch back into a list (of length 1) in order for the function to function.
 So, for example: for epoch in epochs: spectral_connectivity([epoch], …)
<div class=""><br class="">
</div>
<div class=""><br class="">
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Nov 4, 2020, at 7:12 AM, <a href="mailto:balandongiv@gmail.com" class="">
balandongiv@gmail.com</a> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<p style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="padding: 3px 10px; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; color: rgb(255, 255, 255); font-weight: bold; display: inline-block; background-color: rgb(255, 0, 0);" class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;External
 Email - Use Caution&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p>
<div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<br class="webkit-block-placeholder">
</div>
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">Dear Group,<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class=""><o:p class="">&nbsp;</o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">The objective is to compute frequency connectivity measures. Say we have 70 epochs of an event with the id 1, and I would like the connectivity measures each of the epoch.<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">However, I noticed the spectral_connectivity() return an average connectivity measures value of all the 70 epochs (please correct this if I'm wrong).<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class=""><o:p class="">&nbsp;</o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">I have checked the documentation (<a href="https://secure-web.cisco.com/1JHYhvePBuZSfOcyruZnRTehIQyF7J9JjEGEij4dTwDwIzig9G_08JjrORapltjEh-y4IYa1s33w-ptI7jOo3n3_RHj7rLrtZrC90_5dtZDqqX_PsCW08u572k0XxLnqMinNJzvLhirSTO0_BZX-rmfuvAPv5Ex4zkP2qCA2jKsZw43bLALj7X7FWthZsRLYY-vN3d2o-WucVqmoUm1i5uA/https%3A%2F%2Fmne.tools%2Fstable%2Fgenerated%2Fmne.connectivity.spectral_connectivity.html%23mne.connectivity.spectral_connectivity" style="color: rgb(5, 99, 193); text-decoration: underline;" class=""><font color="red" class=""><b class="">MailScanner
 has detected a possible fraud attempt from &quot;secure-web.cisco.com&quot; claiming to be</b></font><span class="Apple-converted-space">&nbsp;</span>https://mne.tools/stable/generated/mne.connectivity.spectral_connectivity.html#mne.connectivity.spectral_connectivity</a>),
 but I did not found any related setting to return connectivity measures value of each of the epoch.<span class="Apple-converted-space">&nbsp;</span><o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">But, the accompanying documentation (<a href="https://secure-web.cisco.com/16q_3CCS_-dCdBv55zRM9Mtz76ztHmZbDKvB1V5VuuUY7wPZ6_th_XEA_MU62svsGuFO3zSFw7HGe5-eDe2cjhIMP1eGhnQpK8ie_dOyqW18dgiF4GR46UwI8NEQv17PpeJbqo4Wo5GgBtHVbFjIkrR2jfLGllQ6m9lDyPho6CwrAx533ELYGNBy5NrckURLfnKW6b4edAwKIHGsW1AXKDg/https%3A%2F%2Fgithub.com%2Fmne-tools%2Fmne-python%2Fblob%2F0e080a5a645b5934445ef4da6da744d7dfa7f68d%2Fmne%2Fconnectivity%2Fspectral.py%23L630%29" style="color: rgb(5, 99, 193); text-decoration: underline;" class=""><font color="red" class=""><b class="">MailScanner
 has detected a possible fraud attempt from &quot;secure-web.cisco.com&quot; claiming to be</b></font><span class="Apple-converted-space">&nbsp;</span>https://github.com/mne-tools/mne-python/blob/0e080a5a645b5934445ef4da6da744d7dfa7f68d/mne/connectivity/spectral.py#L630)<span class="Apple-converted-space">&nbsp;</span></a>&nbsp;not
 explicitly mention `</span><span lang="EN-US" class=""><span class="Apple-converted-space">&nbsp;</span></span><span lang="EN-US" class="">con` will be the average value of all epoch. This leads me to believe that the function can return the connectivity measures
 value of each of the epoch. Appreciate for confirmation about this issue.<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class=""><o:p class="">&nbsp;</o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">Code example lead to the above observation is as below:<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class=""><o:p class="">&nbsp;</o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class=""><o:p class="">&nbsp;</o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">import mne<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">from mne import io<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">from mne.connectivity import spectral_connectivity<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">from mne.datasets import sample<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class=""><o:p class="">&nbsp;</o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">data_path = sample.data_path()<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">raw_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif'<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">event_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw-eve.fif'<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">raw = io.read_raw_fif(raw_fname)<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">events = mne.read_events(event_fname)<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">ch_names =<span class="Apple-converted-space">&nbsp;</span><a href="http://secure-web.cisco.com/1aFtFSijGjjMel_yKXswsCC_aPBeyZc8i-Tlqhd_dqrm7ntacmB3pF4R5TPayXofr_MA9Wop01CMVnyhbbOPanpZ7tMIPSEU1YJxS2xDprMNOkqPaQX0o6WikdIHSWfm43ic2DIa6UEnWOlj6Cdlb4gJF80fE4pm4kUDsowquzOGmUG3W4q4BV0RyN2mpJYT73PX9U9wolJBpIozSMftkNQ/http%3A%2F%2Fraw.info%2F" style="color: rgb(5, 99, 193); text-decoration: underline;" class=""><font color="red"><b>MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be</b></font> raw.info</a>['ch_names']<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">picks = mne.pick_channels(ch_names=ch_names,include=['EEG 001','EEG 002','EEG 003'])<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">event_id, tmin, tmax = 1, -10, 0<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">epochs = mne.Epochs(raw, events, event_id, tmin, tmax, picks=picks)<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">fmin, fmax = (1.,5.),(4.,9.)<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">sfreq =<span class="Apple-converted-space">&nbsp;</span><a href="http://secure-web.cisco.com/1aFtFSijGjjMel_yKXswsCC_aPBeyZc8i-Tlqhd_dqrm7ntacmB3pF4R5TPayXofr_MA9Wop01CMVnyhbbOPanpZ7tMIPSEU1YJxS2xDprMNOkqPaQX0o6WikdIHSWfm43ic2DIa6UEnWOlj6Cdlb4gJF80fE4pm4kUDsowquzOGmUG3W4q4BV0RyN2mpJYT73PX9U9wolJBpIozSMftkNQ/http%3A%2F%2Fraw.info%2F" style="color: rgb(5, 99, 193); text-decoration: underline;" class=""><font color="red"><b>MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be</b></font> raw.info</a>['sfreq']&nbsp; # the sampling frequency<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">tmin = 0&nbsp; # exclude the baseline period<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">tmax=2<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">epochs.load_data()<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">con, freqs, times, n_epochs, n_tapers = spectral_connectivity(<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">&nbsp;&nbsp;&nbsp; epochs, method='pli', mode='multitaper', sfreq=sfreq, fmin=fmin, fmax=fmax,<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">&nbsp;&nbsp;&nbsp; faverage=True, tmin=tmin, tmax=tmax,mt_adaptive=False, n_jobs=1)<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class=""><o:p class="">&nbsp;</o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class=""><o:p class="">&nbsp;</o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">Regards<o:p class=""></o:p></span></div>
<div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<span lang="EN-US" class="">Rodney<o:p class=""></o:p></span></div>
</div>
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Mne_analysis
 mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" style="color: rgb(5, 99, 193); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">Mne_analysis@nmr.mgh.harvard.edu</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="https://secure-web.cisco.com/1c4b4Bxko8iRoqpgzbYe3I-E1vUHSrzFsc738n_mp5LCiNlj7sqotCwkPJTSQZtSRGeNiNRsG1NX0oFomdh4FjsQN7RwippDDG3Ms8ujLgxyXPCss-ekzfxH54TZFEYRLtUpgCl1MWqKiLpkJv46Sys7TVFXMPYdrpsWRl7wlxTaSNyl3T6uSvuPUcjOMp5XqBN2w-2pTMG-_bO9UdGmw_g/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis" style="color: rgb(5, 99, 193); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><font color="red"><b>MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be</b></font> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</body>
</html>