<div dir="ltr">Hi Munier, <div><br></div><div>I think this should work:</div><div>In [1]: pf.domain_width.in_cgs()<br></div><div><div>Out[1]: YTArray([  2.80516144e+26,   2.80516144e+26,   2.80516144e+26]) cm<br></div></div><div><br></div><div>If you want just the number for some reason, you can do pf.domain_width.in_cgs().d:</div><div><div>In [2]: pf.domain_width.in_cgs().d</div><div>Out[2]: array([  2.80516144e+26,   2.80516144e+26,   2.80516144e+26])</div></div><div><br></div><div>I would suggest looking at the documentation on the new units system:</div><div><a href="http://yt-project.org/doc/analyzing/units/index.html#units">http://yt-project.org/doc/analyzing/units/index.html#units</a><br></div><div><br></div><div>Sorry to hear that the upgrade to 3.0 brought unexpected consequences. We tried to be as clear as possible about what changed, but I understand it can be difficult to follow everything. You might find this page useful going forward:</div><div><a href="http://yt-project.org/doc/yt3differences.html">http://yt-project.org/doc/yt3differences.html</a><br></div><div><br></div><div>Sam</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 7, 2014 at 10:54 AM, 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>