[yt-users] disk Profiles
Elizabeth Tasker
taskere at mcmaster.ca
Mon Jul 11 07:24:50 PDT 2011
Hi Sam,
Hmm, now you lay it out it seems kind of obvious. Thank you!!
Elizabeth
On 2011-07-11, at 11:20 PM, Sam Skillman wrote:
> Hi Elizabeth,
>
> On Sat, Jul 9, 2011 at 3:23 AM, Elizabeth Tasker <taskere at mcmaster.ca> wrote:
> Hi all,
>
> I'm trying to create a profile object of the density in my disk as a function of radius. I don't actually want to plot it; I just need to grab an average to use as a background value elsewhere.
>
> I think I've almost got it:
>
> source = pf.h. disk((16,16,16), (0,0,1), 12, 15.6e-3/pf['kpc'])
> profile = BinnedProfile1D(source, 128, "RadiusCode", 0.5, 12.0)
> profile.add_fields("CellMass", weight="CellVolume")
> print profile["CellMass"]
>
> I just have a couple of questions:
>
> 1. Is there a way to print out the radial bins being used? i.e. the value at the centre of each bin?
>
> You can access this through profile["RadiusCode"] or profile.data._bins. Note that this will be the bin edges, and thus there will be 129 of them.
>
>
> 2. RadiusCode is going to be the 3d radius, is that true? I can create my own variable for the in-disk radius, but is there a quantity already in yt for that to use with the disk profile?
>
> Not that I know of, but someone else may know better.
>
> Best,
> Sam
>
>
> Thank you~
>
> Elizabeth
>
>
> _______________________________________________
> 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/20110711/cbc31df0/attachment.html>
More information about the yt-users
mailing list