<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><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hai Alex, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks for help.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Here is a snippet :</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">##creating volume source space</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">src= setup_volume_source_space(subj</span><span style="font-family:Arial,Helvetica,sans-serif">, pos=5.0,mri=aseg_fname, </span><span style="font-family:Arial,Helvetica,sans-serif"> bem=fname_model,mindist=7.0, subjects_dir=subjects_dir)</span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">##forward model<br style="font-family:Arial,Helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">fwd = mne.make_forward_solution(info</span><span style="font-family:Arial,Helvetica,sans-serif">=</span><a href="http://raw.info/" rel="noreferrer" target="_blank" style="font-family:Arial,Helvetica,sans-serif">raw.info</a><span style="font-family:Arial,Helvetica,sans-serif">, trans=None, src=src, </span><span style="font-family:Arial,Helvetica,sans-serif">bem=fname_bem, mindist=2.0, meg=False, eeg=True, n_jobs=1)</span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">##computing noise covariance<br style="font-family:Arial,Helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">noise_cov = mne.compute_covariance(epochs, tmin=0, tmax=0.2,</span><span style="font-family:Arial,Helvetica,sans-serif"> method=&#39;empirical&#39;,</span><span style="font-family:Arial,Helvetica,sans-serif"> rank=&#39;full&#39;)</span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">##computing data covariance<br style="font-family:Arial,Helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif">data_cov = mne.compute_covariance(epochs, tmin=0.2, tmax=epochs.tmax, </span><span style="font-family:Arial,Helvetica,sans-serif">method=&#39;empirical&#39;, rank=&#39;full&#39;)</span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">##<br style="font-family:Arial,Helvetica,sans-serif"><span style="font-family:Arial,Helvetica,sans-serif"> filters = make_lcmv(info=</span><a href="http://epochs.info/" rel="noreferrer" target="_blank" style="font-family:Arial,Helvetica,sans-serif">epochs.info</a><span style="font-family:Arial,Helvetica,sans-serif">, forward=fwd, data_cov=data_cov,</span><span style="font-family:Arial,Helvetica,sans-serif">reg=0.05, </span><span style="font-family:Arial,Helvetica,sans-serif">noise_cov=noise_cov, pick_ori=&#39;max-power&#39;, </span><span style="font-family:Arial,Helvetica,sans-serif">weight_norm=&#39;nai&#39;,reduce_</span><span style="font-family:Arial,Helvetica,sans-serif">rank=True)</span>  <br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Let me know anything more is required.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thank You</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 3, 2019 at 8:34 AM pooja prabhu &lt;<a href="mailto:prabhuppooja@gmail.com">prabhuppooja@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hai Eric,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I tried exclude=10 but no luck.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">What else i can change to solve this error?<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 31, 2019 at 3:35 PM pooja prabhu &lt;<a href="mailto:prabhuppooja@gmail.com" target="_blank">prabhuppooja@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hai <font face="arial,sans-serif">group,</font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font face="arial,sans-serif">I encountered the problem while executing the function make_lcmv. The error is ,</font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font face="arial,sans-serif">ValueError: The eigenspectrum of the leadfield at this voxel is complex. Consider reducing the rank of the leadfield by using reduce_rank=True.</font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font face="arial,sans-serif"><br></font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font face="arial,sans-serif">As recommended i changed included the parameter reduce_rank=True in the function &#39;make_lcmv&#39;, even after that the code gives the same error. <br></font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font face="arial,sans-serif">I am not sure what is the problem. <br></font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font face="arial,sans-serif">This work uses 19 channel EEG signals.<br></font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font face="arial,sans-serif">-------------------------------------<br></font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font face="arial,sans-serif">Snippet of the code:</font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font face="arial,sans-serif">src= setup_volume_source_space(subj, pos=5.0,mri=aseg_fname, bem=fname_model,mindist=7.0, subjects_dir=subjects_dir)</font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font face="arial,sans-serif">fwd = mne.make_forward_solution(info=<a href="http://raw.info" target="_blank">raw.info</a>, trans=None, src=src, bem=fname_bem, mindist=2.0, meg=False, eeg=True, n_jobs=1)<br>noise_cov = mne.compute_covariance(epochs, tmin=0, tmax=0.2, method=&#39;empirical&#39;,<br>                                   rank=None)<br>data_cov = mne.compute_covariance(epochs, tmin=0.2, tmax=epochs.tmax,<br>                                  method=&#39;empirical&#39;, rank=&#39;full&#39;)<br>filters = make_lcmv(info=<a href="http://epochs.info" target="_blank">epochs.info</a>, forward=fwd, data_cov=data_cov, reg=0.05, <br>                    noise_cov=noise_cov, pick_ori=&#39;max-power&#39;, <br>                    weight_norm=&#39;nai&#39;,reduce_rank=True)</font></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><font face="arial,sans-serif">---------------------------------------<br></font></div>-- <br><div dir="ltr" class="gmail-m_7708391450393121484gmail-m_-785285182745116779gmail_signature"><div dir="ltr"><div><div dir="ltr">Thank You<div>Pooja Prabhu</div><div><br></div></div></div></div></div></div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail-m_7708391450393121484gmail_signature"><div dir="ltr"><div><div dir="ltr">Thank You<div>Pooja Prabhu</div><div><br></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Thank You<div>Pooja Prabhu</div><div><br></div></div></div></div></div>