[yt-users] adding things to a dataset

Molly Peeples molly at stsci.edu
Mon Aug 1 09:13:06 PDT 2016


Hey Britton,

Thanks; that works! Too bad it’s for just a container and not the whole dataset, but good enough :-)

—Molly



On August 1, 2016 at 11:44:29 AM, Britton Smith (brittonsmith at gmail.com<mailto:brittonsmith at gmail.com>) wrote:

Hi Molly,

If you have some data container, like a sphere, I think what you need to do is:
sphere.set_field_parameter("omega_baryon", 0.048)

Britton

On Mon, Aug 1, 2016 at 5:42 PM, Molly Peeples <molly at stsci.edu<mailto:molly at stsci.edu>> wrote:
Hi folks,

I have a dataset I’d like to add omega_baryon to (I want to use the baryon_overdensity derived field, but it seems to only have omega_matter and omega_lambda, but I know what omega_baryon is). It’s not a derived field; it’s just a number (not sure what the yt-lingo for it is!)…

I tried doing ds.omega_baryon = 0.048, but I still get


/Users/molly/anaconda2/envs/astroconda/lib/python2.7/site-packages/yt/fields/derived_field.pyc in __call__(self, data)

    277                 doesnt_have.append(p)

    278         if len(doesnt_have) > 0:

--> 279             raise NeedsParameter(doesnt_have)

    280         return True

    281


NeedsParameter: (['omega_baryon'])


when I try to plot using baryon_overdensity. Suggestions?

Thanks,
—Molly

_______________________________________________
yt-users mailing list
yt-users at lists.spacepope.org<mailto: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/20160801/3de81e15/attachment.htm>


More information about the yt-users mailing list