[yt-dev] Native field discussion

Casey W. Stark caseywstark at gmail.com
Mon May 6 15:33:33 PDT 2013


Hey yt.

Nathan and I had a cool idea as an extension of the units work, but I am
hitting a yt internals knowledge wall writing a YTEP. I would like some
input on technical details or general feelings before I move ahead with the
write-up.

One of the things mentioned in the units YTEP is handling code units.
Basically each frontend static output should register the code units. In
Nyx for instance, we would do something like registering "code_length" as
Mpccm, "code_mass" as Msun, etc. Then any field from the dataset can be
loaded in code units with something like
dd["density"].in_units("code_density").

This got us thinking -- why load native fields in CGS now? Instead, we can
define native fields exactly as they are on disk and users who want code
units will never have to convert by hand again. If frontend developers
define the fields and units on disk, and some mapping to the universal
fields, we shouldn't have to define or convert units anywhere else.

I made a quick and dirty example of what we're thinking here:
http://paste.yt-project.org/show/3441/

So, is something like this a good idea? Is it realistic? Would this make
for a simpler field info container? Nathan, is there anything I missed?

- Casey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20130506/14b003c6/attachment.htm>


More information about the yt-dev mailing list