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

Brian O'Shea bwoshea at gmail.com
Tue Aug 19 02:51:57 PDT 2014


>
>
> >
> > 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.
>

Hmm.  So when I tried that, using:

ad =
ds.region(center=[0.5,0.5,0.5],left_edge=[0,0,0],right_edge=[1,1,1],field_parameters
= {'omega_baryon':0.046})

(as ds.all_data() does not accept any additional arguments), I get this
error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-a78c8b2667cc> in <module>()
----> 1 ad =
ds.region(center=[0.5,0.5,0.5],left_edge=[0,0,0],right_edge=[1,1,1],field_parameters
= {'omega_baryon':0.046})

/Users/bwoshea/Desktop/yt-3.0/src/yt-hg/yt/data_objects/selection_data_containers.pyc
in __init__(self, center, left_edge, right_edge, fields, ds, **kwargs)
    577     def __init__(self, center, left_edge, right_edge, fields = None,
    578                  ds = None, **kwargs):
--> 579         YTSelectionContainer3D.__init__(self, center, fields, ds,
**kwargs)
    580         if not isinstance(left_edge, YTArray):
    581             self.left_edge = self.ds.arr(left_edge, 'code_length')

TypeError: __init__() got multiple values for keyword argument
'field_parameters'

Is that expected behavior, or do I misunderstand what you're saying?

Thanks,
Brian




>  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
> >
>
> _______________________________________________
> 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/20140819/b7ca0c20/attachment.htm>


More information about the yt-users mailing list