Hi Kearn, On Thu, Nov 21, 2013 at 7:41 AM, <k.grisdale@surrey.ac.uk> wrote:
Dear yt Users
I am plotting some radial profiles from Ramses data. However some of the bins that yt is using are too small for the course grid from the Ramses data and seem to be missing cell centres from the data.
Is there anyway I can either change the bin size between certain radii or get yt to ignore data points with values of 0 and just contact the bins with data?
I think right now, it will just do either linearspace or logspace spacing for the bins. But, there's also the additional field "UsedBins" which is a boolean of the bins that contain items and the ones that don't. So for instance, this: m = rad["UsedBins"] rad["Radius"][m] rad["Density"][m] will just give back the bins that have things in them. Does that help? -Matt
Thanks in advance.
Kearn
PS: The commands that I am using are below in case they are needed:
p6 = load("Ramses_sedov_3d/HD_Runs/l9/output_00006/info_00006.txt", fields = ["Density","x-velocity", "y-velocity", "z-velocity", "Pressure"]) cen = [0, 0, 0]
sphere = p6.h.sphere(cen, 0.5/p6['cm']) r_max = sphere['Radius'][sphere['Density'] == sphere['Density'].max()] sphere.set_field_parameter('r_max', r_max)
rsh = r_max[0] rad_profile = BinnedProfile1D(sphere, 1500, 'Radius', 0.0, 1.4, log_space=False) rad_profile.add_fields("VelocityMagnitude") rad_profile.add_fields("Density") rad_profile.add_fields("Pressureā)
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org