<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jul 13, 2014 at 12:59 AM, Kacper Kowalik <span dir="ltr"><<a href="mailto:xarthisius.kk@gmail.com" target="_blank">xarthisius.kk@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 12.07.2014 23:46, John ZuHone wrote:<br>
> Hi Kacper,<br>
><br>
>> I'm not sure I understand. Currently fields *are* stored in arbitrary<br>
>> units. That's why "field_to_cgs" was necessary to make yt use them in a<br>
>> consistent fashion.<br>
><br>
> As it stood, the GDF frontend in 3.0 was not doing anything with the units. It was returning everything as dimensionless. Also, the field units were being stored in LaTeX, so I don't know if it was able to read them.<br>


<br>
</div>It certainly wasn't. I was merely suggesting an extension to the<br>
existing format. I think YTArray is able to spit out nice LaTeX<br>
representation of its units (maybe Nathan will correct me here), so<br>
current function of "field_units" is redundant.<br></blockquote><div><br></div><div>For some YTArray named arr:</div><div><br></div><div>arr.units.latex_representation()</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div class=""><br>
><br>
>> However, now I think that with YTArray around we can go one step further<br>
>> and just directly feed constructor with `field_units`. "dataset_units"<br>
>> would be then unnecessary and each field could have separate unit system<br>
>> e.g. density in cm^-3, velocity in km/s etc. "field_to_cgs" could stay<br>
>> for backwards compatibility sake.<br>
><br>
> Sounds good to me, but see below about "dataset_units."<br>
><br>
>> This would require some additional work with things that are not pure<br>
>> data and also have units, like box size, current time etc.<br>
>> Possibly we'd need a way to define units in GDF file for all those<br>
>> people still using "dinosaurs" or "leagues"<br>
><br>
> But this is exactly what "dataset_units" is for, not for the fields themselves but for those parameters. That way we can set the attributes that hang off the dataset directly, e.g., ds.length_unit.<br>
<br>
</div>OK, that makes sense.<br>
Cheers,<br>
Kacper<br>
<div class="HOEnZb"><div class="h5"><br>
> John<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>
<br>
<br>
</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>