<div dir="ltr">Are you on an old version of MNE (mne.__version__)? I get this on latest `master` and the 0.14.1 branch:<div></div><div class="markdown-here-wrapper" style=""><pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline;white-space:pre;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important">&gt;&gt;&gt; label = mne.read_label(mne.datasets.sample.data_path() + &#39;/subjects/sample/label/lh.BA45.label&#39;)
&gt;&gt;&gt; label.center_of_mass(&#39;sample&#39;, subjects_dir=mne.datasets.sample.data_path() + &#39;/subjects&#39;)
136871
</code></pre><div title="MDH:PGRpdj5gYGA8L2Rpdj48ZGl2PjxkaXY+Jmd0OyZndDsmZ3Q7IGxhYmVsID0gbW5lLnJlYWRfbGFi
ZWwobW5lLmRhdGFzZXRzLnNhbXBsZS5kYXRhX3BhdGgoKSArICcvc3ViamVjdHMvc2FtcGxlL2xh
YmVsL2xoLkJBNDUubGFiZWwnKTwvZGl2PjxkaXY+Jmd0OyZndDsmZ3Q7IGxhYmVsLmNlbnRlcl9v
Zl9tYXNzKCdzYW1wbGUnLCBzdWJqZWN0c19kaXI9bW5lLmRhdGFzZXRzLnNhbXBsZS5kYXRhX3Bh
dGgoKSArICcvc3ViamVjdHMnKTxicj48L2Rpdj48ZGl2PjEzNjg3MTwvZGl2PjwvZGl2PjxkaXY+
YGBgPC9kaXY+PGRpdj48L2Rpdj4=" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0">​</div></div><div>Eric<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 11, 2017 at 3:00 PM, Gladia Hotan <span dir="ltr">&lt;<a href="mailto:gladiach@gmail.com" target="_blank">gladiach@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Eric,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">When I try to do label.center_of_mass I get the error &quot;AttributeError: &#39;Label&#39; object has no attribute &#39;center_of_mass&#39;&quot;. However, SourceEstimate.center_of_mass does work. Do I need to do something to the label to access the function?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks and Best,</div><div class="gmail_default" style="font-size:small">Gladia</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 11, 2017 at 2:42 PM, Eric Larson <span dir="ltr">&lt;<a href="mailto:larson.eric.d@gmail.com" target="_blank">larson.eric.d@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes indeed:<div><br></div><div><a href="https://mne-tools.github.io/dev/generated/mne.Label.html#mne.Label.center_of_mass" target="_blank">https://mne-tools.github.io/de<wbr>v/generated/mne.Label.html#mne<wbr>.Label.center_of_mass</a><br></div><div><br></div><div>Eric</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_-1902304168569652805h5">On Fri, Aug 11, 2017 at 2:28 PM, Gladia Hotan <span dir="ltr">&lt;<a href="mailto:gladiach@gmail.com" target="_blank">gladiach@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_-1902304168569652805h5"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Is there still the function label.center_of_mass which computes the spatial center of mass of a label?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks and Best Regards,</div><div class="gmail_default" style="font-size:small">Gladia</div></div>
<br></div></div>______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.e<wbr>du</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.e<wbr>du/mailman/listinfo/mne_analys<wbr>is</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/compli<wbr>anceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.e<wbr>du</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.e<wbr>du/mailman/listinfo/mne_analys<wbr>is</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/compli<wbr>anceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu">Mne_analysis@nmr.mgh.harvard.<wbr>edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.<wbr>edu/mailman/listinfo/mne_<wbr>analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/<wbr>complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div>