I am having some trouble with the yt clump finder. Mostly, my issue is that I don't understand what I am getting when I annotate the projectionplot. Instead of the nice lines in the example, I get strange filled-in circles?
ds = yt.load("/mnt/ceph/users/stonnesen/runs/JO204wind/DD"+loop[i]+"/JO204cw"+loop[i])
ad = ds.all_data()
data_source = ad.cut_region(["obj['z'] > 0.27"]) #ds.disk([0.5, 0.5, 0.5], [0., 0., 1.],(80, 'kpc'), (145, 'kpc'))
# the field to be used for contouring
field = ("gas", "density")
# This is the multiplicative interval between contours.
step = 2.0
# Now we set some sane min/max values between which we want to find contours
# This is how we tell the clump finder what to look for -- it won't look for
# contours connected below or above these threshold values.
c_min = 2e-25 #10**np.floor(np.log10(data_source[field]).min()+3 )
c_max = 10**np.floor(np.log10(data_source[field]).max()+1)
# Now find get our 'base' clump -- this one just covers the whole domain.
master_clump = Clump(data_source, 'density')
# Add a "validator" to weed out clumps with less than 16 cells.
# As many validators can be added as you want.
master_clump.add_validator("min_cells", 16)
# Calculate center of mass for all clumps.
master_clump.add_info_item("center_of_mass")
# Begin clump finding.
find_clumps(master_clump, c_min, c_max, step)
# Save the clump tree as a reloadable dataset
fn = master_clump.save_as_dataset(fields=["density"])
# Traverse the clump hierarchy to get a list of all of the 'leaf' clumps
leaf_clumps = get_lowest_clumps(master_clump)
# To visualize these clumps, a list of clumps can be supplied to
# the "clumps" callback on a plot. First, we create a projection plot:
prj = yt.ProjectionPlot(ds, 0, 'density', center=[0.5,0.5,0.5],width=(160,'kpc'))
prj.set_buff_size(4000)
# Next we annotate the plot with contours on the borders of the clumps
prj.annotate_clumps(leaf_clumps)
# Save the plot to disk.
prj.save('JO204cw'+loop[i]+'_clumps_16pix')
##########################
Also, when I have
> print (leaf_clumps[0]["gas","density"])
I get 22 outputs, which seems like a lot less than what is getting put on the figure?
Anyway, I am lost and any help would be greatly appreciated.
Best,
Stephanie