[yt-users] disk Profiles
Elizabeth Tasker
taskere at mcmaster.ca
Sat Jul 9 02:23:05 PDT 2011
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?
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?
Thank you~
Elizabeth
More information about the yt-users
mailing list