<div dir="ltr">Hi Tom,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 16, 2014 at 3:29 PM, Abel, Tom <span dir="ltr"><<a href="mailto:tabel@slac.stanford.edu" target="_blank">tabel@slac.stanford.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">



<div dir="auto">
<div>Hi Matt,</div>
<div>User Customization is definitely a nice aspect!</div>
<div>Perhaps you could leverage the effort that has gone into these cool packages?</div>
<div><a href="http://pint.readthedocs.org/en/0.6/" target="_blank">http://pint.readthedocs.org/en/0.6/</a><br></div></div></blockquote><div><br></div><div>This one is cool, but it doesn't fully support numpy ufuncs like we do.  It's also not as fast.<br></div><div> </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="auto"><div>
<a href="https://pypi.python.org/pypi/numericalunits" target="_blank">https://pypi.python.org/pypi/numericalunits</a></div></div></blockquote><div><br></div><div>This one is interesting, but is implemented in an odd way, IMO.  It uses randomly selected floating point numbers to represent a unit symbol.  For a dimensionally correct expression, these random numbers will cancel out, but for an incorrect expression, the result will be contaminated with random garbage.<br><br><div><br></div>Our unit system is probably not as fast as this 
approach, but I'd say there is a much smaller danger for a result to be 
contaminated with bad results, so long as a calculation stays within the
 unit system.<br><br></div><div>See this scipy talk for more info about the plethora of python unit packages: <a href="https://conference.scipy.org/scipy2013/presentation_detail.php?id=17">https://conference.scipy.org/scipy2013/presentation_detail.php?id=17</a><br></div><div><br></div><div>For more technical details about yt's unit system, take a look at the unit YTEP: <a href="http://ytep.readthedocs.org/en/latest/YTEPs/YTEP-0011.html">http://ytep.readthedocs.org/en/latest/YTEPs/YTEP-0011.html</a><br><br></div><div>What Matt is talking about would (I think) mean adding a way to change the underlying unit representation from CGS to a user-selected set of units.  This is interesting, and probably doable, but will require some thought.  Things like E&M units, which are dimensionally different in different unit systems.  We would also need to make sure we're not relying on things being in CGS inside yt, separate from the unit system.<br></div><div> </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="auto">
<div><br>
</div>
<div>Normally you never want to actually multiply the actual data right? It is just for outputting ranges and labels etc. isn't it?</div></div></blockquote><div><br></div><div>We need to multiply the data anyway to get it into CGS, usually.  So long as the user-selected unit system is different from the code units of the simulation, we always need to do at least one conversion.<br><br>If you want to avoid multipying the data, you can keep everything in code units, which we tend to do internally.  Interestingly, Matt's proposal would probably make us convert data less often, because we could create custom unit systems on a dataset by dataset basis, and default to code units internally.<br></div><div> </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="auto">
<div><br>
</div>
<div>Best,</div>
<div>Tom</div>
<div><br>
</div>
<div><br>
Sent from my iPhone</div><div><div class="h5">
<div><br>
On Nov 16, 2014, at 3:17 PM, Cameron Hummels <<a href="mailto:chummels@gmail.com" target="_blank">chummels@gmail.com</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<div dir="ltr">I'm a big fan of what Matt is suggesting.</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Nov 16, 2014 at 3:57 PM, Ben Thompson <span dir="ltr">
<<a href="mailto:bthompson2090@gmail.com" target="_blank">bthompson2090@gmail.com</a>></span> wrote:<br>
<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>Personally, with the amount of codes (and the different astrophysics people are doing with those code). Some sort of config/user-set-defaults system would be cool ... Which is what I think you are suggesting? cgs is a nice "default go-to".. but it would
 be cool to have a few settings pre-saved (maybe into a JSON file or something).. in which a user can provide at anytime.. so that there is no need to add on .in_units(MSun, Gyr, Mpc).<span><font color="#888888"><br>
<br>
</font></span></div>
<span><font color="#888888">Ben.</font></span></div>
<div>
<div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Nov 16, 2014 at 7:08 PM, Nathan Goldbaum <span dir="ltr">
<<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I don't think it will be simple - there are almost certainly places where we assume the underlying representation is CGS. That said, I think it would be possible.<br>
<br>
Matt, can you write up a YTEP for this first so we have a better idea of your implementation and design ideas?
<div>
<div><br>
<div class="gmail_quote">On Sun, Nov 16, 2014 at 10:40 AM John Zuhone <<a href="mailto:jzuhone@gmail.com" target="_blank">jzuhone@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I'm assuming that "underneath the hood" everything would still have to be based on *something* by default, which would be cgs?<br>
<div class="gmail_quote">On Sun, Nov 16, 2014 at 10:09 AM Matthew Turk <<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi all,
<div><br>
</div>
<div>Would it be feasible (I am volunteering to do this if so) to change instances of convert_to_cgs to something like convert_to_native, and then adding a new set of unit collections?  This would basically mean if we wanted units to be in 10^10MSun + Mpc +
 GYr, it would convert to that, rather than cgs.  My naive assumption is that if we had string keys for unit collections, this would be simple, and the unit object would simply check the string key, get the units, and go.</div>
<div><br>
</div>
<div>-Matt</div>
______________________________<u></u>_________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/<u></u>listinfo.cgi/yt-dev-spacepope.<u></u>org</a><br>
</blockquote>
</div>
______________________________<u></u>_________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/<u></u>listinfo.cgi/yt-dev-spacepope.<u></u>org</a><br>
</blockquote>
</div>
</div>
</div>
<br>
_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
<br>
_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div>Cameron Hummels
<div>Postdoctoral Researcher</div>
<div>Steward Observatory</div>
<div>University of Arizona</div>
<div><a href="http://chummels.org" target="_blank">http://chummels.org</a></div>
</div>
</div>
</div>
</blockquote>
<blockquote type="cite">
<div><span>_______________________________________________</span><br>
<span>yt-dev mailing list</span><br>
<span><a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a></span><br>
<span><a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a></span><br>
</div>
</blockquote>
</div></div></div>

<br>_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
<br></blockquote></div><br></div></div></div>