Commits

Nathan Goldbaum committed 32b3509

Fixing some errors.

  • Participants
  • Parent commits 7913621

Comments (0)

Files changed (1)

File source/cookbook/find_clumps.py

 field = "Density" # this is the field we look for contours over -- we could do
                   # this over anything.  Other common choices are 'AveragedDensity'
                   # and 'Dark_Matter_Density'.
-step = 10.0 # This is the multiplicative interval between contours.
+step = 2.0 # This is the multiplicative interval between contours.
 
 pf = load(fn) # load data
 
 c_max = 10**na.floor(na.log10(data_source[field]).max()+1)
 
 # keep only clumps with at least 20 cells
-function = 'self.data[field].size > 20'
+function = 'self.data[\'%s\'].size > 20' % field
 
 # Now find get our 'base' clump -- this one just covers the whole domain.
 master_clump = Clump(data_source, None, field, function=function)
 prj = ProjectionPlot(pf, 2, field, center='c', width=(20,'kpc'))
 
 # Next we annotate the plot with contours on the borders of the clumps
-prj.annotate_clumps(all_clumps)
+prj.annotate_clumps(leaf_clumps)
 
 # Lastly, we write the plot to disk.
-slc.save('clumps')
+prj.save('clumps')
 
 # We can also save the clump object to disk to read in later so we don't have
 # to spend a lot of time regenerating the clump objects.