<div dir="ltr">Hi Munier,<div><br></div><div>It sounds like you have just made the leap from yt-2.x to yt-3.0.  You may find the following page helpful: <a href="http://yt-project.org/doc/yt3differences.html">http://yt-project.org/doc/yt3differences.html</a></div><div><br></div><div>One of the biggest improvements of yt-3.0 is the new units system in which all quantities within yt have units associated with them which can be converted easily.  If you have done the following:</div><div><br></div><div>import yt</div><div>ds = yt.load(some_data)</div><div><br></div><div>Then, doing the following with give you the width of the simulation box:</div><div>ds.domain_width</div><div><br></div><div>Note that it will most likely show you something like this:</div><div>YTArray([ 1.,  1.,  1.]) code_length<br></div><div><br></div><div>You can convert that into any other unit like the following</div><div><div>ds.domain_width.in_units("cm")</div><div>YTArray([  1.40258072e+26,   1.40258072e+26,   1.40258072e+26]) cm</div></div><div><br></div><div>Britton</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 7, 2014 at 1:54 PM, Munier Azzam Salem <span dir="ltr"><<a href="mailto:msalem@astro.columbia.edu" target="_blank">msalem@astro.columbia.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hey Guys,<div><br></div><div>         A false sense of complacency / hubris led me to update my dev version of yt ... I thought "how much damage could this do?" ... well ... After updating 50 derived fields in my analysis scripts, I have learned a valuable life lesson. Well played yt. Well played. But I digress ...</div><div><br></div><div>        One of the deprecated usages I couldn't figure out how to fix involves pulling units from a pf object. Specifically I'd like to do this:</div><div>    </div><div>       pf.units['cm']<br></div><div><div><br></div><div>       Alternatives I could live with: finding the length of a side of the simulation box in CGS, some way to convert between code and physical units, etc ...</div><div><br></div><div>       I'm working with enzo, if that matters.</div><div><br></div><div>          cheers,</div><div>                Munier</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><br></div>-- <br>Munier A. Salem // <a href="tel:845.489.6450" value="+18454896450" target="_blank">845.489.6450</a>
</font></span></div></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>