[yt-users] need to set omega_baryon in yt-3

Matthew Turk matthewturk at gmail.com
Mon Aug 18 19:07:17 PDT 2014


On Aug 18, 2014 9:02 PM, "Brian O'Shea" <bwoshea at gmail.com> wrote:
>
> Hi Matt,
>
>
>> >
>> > plot1 =
>> >
yt.ProjectionPlot(ds,'z',"baryon_overdensity",weight_field="baryon_overdensity",center=c,data_source=my_region)
>>
>> You should set it via "field_parameters = {'omega_baryon':
>> your_favorite_cosmology}" in this function call.  There was some
>> recent back and forth about this in a pull request and whether or not
>> it goes into my_region, but this should certainly work.
>
>
> That did the trick, thank you!
>
> Now, followup question: I am also attempting to create a 2D phase plot of
the same quantity (baryon_overdensity vs. temperature), and yt.PhasePlot
does not seem to take the field_parameters dictionary, and neither does
yt.create_profile.  Should I try another avenue to create a phase plot?
>

Nope, you can supply it to your data source when you create it. They all
take the same field_parameters argument.

Matt

> --Brian
>
>
>
>
>>
>>
>> -Matt
>>
>> >
>> > (with c, my_region being previously defined).  When I do this, it
complains:
>> >
>> > yt.fields.field_exceptions.NeedsParameter: (['omega_baryon'])
>> >
>> > which certainly makes sense from a physical perspective, and which Enzo
>> > doesn't natively carry around. I tried to set this by hand:
>> >
>> >
>> > _______________________________________________
>> > 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
>
>
>
> _______________________________________________
> 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/20140818/4a3085b6/attachment.htm>


More information about the yt-users mailing list