[yt-users] Getting yt to ignore empty bins in Radial profile
k.grisdale at surrey.ac.uk
k.grisdale at surrey.ac.uk
Thu Nov 21 04:41:46 PST 2013
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?
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”)
More information about the yt-users
mailing list