[yt-users] units in derived field

Desika Narayanan dnarayan at haverford.edu
Sun Dec 28 07:24:26 PST 2014


Hi All,

When I access some derived fields (like StarFormationRate) in a galaxy
simulation, the units are dimensionless:

In [*4*]: ad = ds.all_data()

In [*5*]: ad[("PartType0","StarFormationRate")]

Out[*5*]:

YTArray([  0.00000000e+00,   0.00000000e+00,   8.29740111e-06, ...,

         0.00000000e+00,   0.00000000e+00,   0.00000000e+00])
(dimensionless)


I'd like to assign the units to this field.  I figure I could define a
field with the right units, but it seems like it might be possible to just
assign units to the ds StarFormationRate field as is.  Is this possible, or
should I just define a new field?

thanks,
desika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20141228/76dea96b/attachment.htm>
-------------- next part --------------
_______________________________________________
yt-users mailing list
yt-users at lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org


More information about the yt-users mailing list