<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Reju,<div><br></div><div>If you want to see exactly what the function looks like, you can just examine you source directly for yt.</div><div><br></div><div>e.g. go into </div><div><br></div><div>~/<span style="font-family: Menlo; font-size: 11px;">yt/src/yt-hg</span></div><div><br></div><div>and then grep for “virial_mass” (bearing in mind there are subdirectories). So:</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">grep virial_mass */*/*/*py</div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div><div style="margin: 0px;">will tell you that this particular routine lives in:</div><div style="margin: 0px;"><br></div><div style="margin: 0px;"><div style="margin: 0px; font-size: 11px; font-family: Menlo;">~/yt/src/yt-hg/yt/analysis_modules/halo_finding/halo_objects.py</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div><div style="margin: 0px;"><div style="font-family: Menlo; font-size: 11px; margin: 0px;"><span style="color: #d03cff">def</span> <span style="color: #afd7ff; background-color: #b32ab2">virial</span><span style="color: #5e34ff">_mass</span>(<span style="color: #d03cff">self</span>, <span style="background-color: #affeff">virial</span>_overdensity=200., bins=300):</div><div style="font-family: Menlo; font-size: 11px; margin: 0px;">.</div><div style="font-family: Menlo; font-size: 11px; margin: 0px;">.</div><div style="font-family: Menlo; font-size: 11px; margin: 0px;">.</div><div style="font-family: Menlo; font-size: 11px; margin: 0px;"><br></div><div style="margin: 0px;"><br></div><div style="margin: 0px;">Hope that helps!</div><div style="margin: 0px;"><br></div><div style="margin: 0px;">If you explain a more clearly what you’d like a new function to do, we might be able to help a little more or point you to similar examples.</div><div style="margin: 0px;"><br></div><div style="margin: 0px;">Elizabeth</div><div style="font-family: Menlo; font-size: 11px; margin: 0px;"><br></div><div style="font-family: Menlo; font-size: 11px; margin: 0px;"><br></div></div></div><div><br><div><div>On Jun 7, 2014, at 9:18 PM, Reju Sam John <<a href="mailto:rejusamjohn@gmail.com">rejusamjohn@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Where can I find the definition (source code) of the following function  ?<div><br></div><div>virial_mass(virial_overdensity=200.0, bins=300)</div><div><br></div><div>Like this function I have to create a new function for my derived field. <br clear="all">
<div><br></div>-- <br><div dir="ltr">Reju Sam John</div>
</div></div>
_______________________________________________<br>yt-dev mailing list<br><a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org<br></blockquote></div><br></div></body></html>