[yt-users] code units

David Collins dcollins4096 at gmail.com
Tue May 26 06:57:21 PDT 2015


Thanks, Nathan.  Let me know if I can help out.

On Fri, May 22, 2015 at 12:28 PM, Nathan Goldbaum <nathan12343 at gmail.com>
wrote:

>
>
> On Fri, May 22, 2015 at 7:25 AM, David Collins <dcollins4096 at gmail.com>
> wrote:
>
>> Hi, Matt-
>>
>>
>>> It's neither a bug nor a feature; "density" is represented as a
>>> "code_mass / code_length**3" primitive.
>>>
>>
>> So what does code_density do?
>>
>
> This is supposed to be set to code_mass/code_length**3, but you've
> actually spotted an oversight in the way we set up units in the Enzo
> frontend such that Enzo units turn out subtly different from units in the
> other frontends.
>
> I've gone ahead and issued a pull request to fix this:
>
>
> https://bitbucket.org/yt_analysis/yt/pull-request/1597/delegate-setting-enzo-code-unit-symbols-to/diff
>
>
>>
>> Thanks a bunch!
>> d.
>>
>>
>>>
>>> -Matt
>>>
>>> On Fri, May 22, 2015 at 9:20 AM, David Collins <dcollins4096 at gmail.com>
>>> wrote:
>>> > Hi, Everyone--
>>> >
>>> > I'm trying to get code units from enzo for a cosmology run, but
>>> > in_units('code_density')
>>> > seems to do nothing.
>>> > 'code_mass/code_length**3'
>>> > seems to work.  Is this a bug, or a feature?
>>> >
>>> >
>>> >>>> ad['density'].in_units('code_mass/code_length**3')
>>> > YTArray([ 0.9970247 ,  0.99774731,  0.99854185, ...,  0.99993769,
>>> >         0.99914176,  0.99841755]) code_mass/code_length**3
>>> >>>> ad['density'].in_units('code_density')
>>> > YTArray([  1.87321000e-29,   1.87456764e-29,   1.87606042e-29, ...,
>>> >          1.87868293e-29,   1.87718755e-29,   1.87582689e-29])
>>> code_density
>>> >
>>> > Thanks!
>>> > d.
>>> >
>>> > --
>>> > -- Sent from a computer.
>>> >
>>> > _______________________________________________
>>> > yt-users mailing list
>>> > yt-users at lists.spacepope.org
>>> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>> >
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>
>>
>>
>> --
>> -- Sent from a computer.
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>


-- 
-- Sent from a computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150526/abcc5d58/attachment.html>
-------------- 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