[yt-users] create_profile + particle_mass

John Regan johnanthonyregan at gmail.com
Fri Oct 21 02:33:44 PDT 2016


Hi Nathan,

That works for me on the sample data now too. Thanks a million!
I'll let you know if I see any other issues.

Cheers,
John

On Thu, Oct 20, 2016 at 4:24 PM, Nathan Goldbaum <nathan12343 at gmail.com>
wrote:

> Hi John,
>
> I think this PR will fix your issue:
>
> https://bitbucket.org/yt_analysis/yt/pull-requests/2423
>
> The problem is that Enzo's particle fields are a little bit special,
> because yt uses Enzo particle field names across all frontends as the
> "universal" field names. Since we want to present universal fields in CGS
> units by default, this means we need to take special care to figure out the
> units we need to attach to a piece of data for enzo particle fields. In
> practice, it means we need to make a distinction between the units a field
> has on-disk and the "output units" that we want to present to users. In
> this case, the profile machinery was using the on-disk units and not the
> output units. In the long run I'd like to get rid of output_units, because
> it's a constant source of issues, as most yt contributors are not working
> with Enzo particle data, which is the only place this distinction matters.
>
> Here's the simple test script I used to test the PR:
>
> http://paste.yt-project.org/show/6887/
>
> Before the PR it prints numbers of order ~10^-3 g, now it prints numbers
> of order 10^46 g, which seems a bit more accurate!
>
> Let me know if that fixes your issue, it's possible that there are other
> issues I'm missing just using my simple test script.
>
> -Nathan
>
> On Thu, Oct 20, 2016 at 5:49 AM, John Regan <johnanthonyregan at gmail.com>
> wrote:
>
>> Hi All,
>>
>> I'm getting some strange results when I try to profile the particle
>> distribution.
>> I'm using the Enzo64 dataset pulled from the YTHub.
>> I use the following very simple script but get values which are different
>> by 50 orders of magnitude. I must be doing something very wrong with the
>> create_profile routine but its not obvious
>>
>> prof = create_profile(sp, [("all", "particle_radius")], [("all",
>> "particle_mass")], weight_field=None)
>>
>> Any ideas what's going wrong here? Looks at a minimum that the units are
>> getting messed up?
>>
>> Cheers,
>> John
>>
>>
>>
>> _______________________________________________
>> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20161021/60794175/attachment-0001.html>


More information about the yt-users mailing list