Advertisement
Guest User

2D clump finding error

a guest
Jul 5th, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.82 KB | None | 0 0
  1. $ yt load cloud_hdf5_plt_cnt_0000
  2. yt : [WARNING  ] 2013-07-05 13:05:05,266 integer runtime parameter checkpointfilenumber overwrites a simulation scalar of the same name
  3. yt : [INFO     ] 2013-07-05 13:05:05,269 Parameters: current_time              = 0.0
  4. yt : [INFO     ] 2013-07-05 13:05:05,269 Parameters: domain_dimensions         = [ 8 32  1]
  5. yt : [INFO     ] 2013-07-05 13:05:05,270 Parameters: domain_left_edge          = [ -2.46854420e+22   0.00000000e+00  -2.46854420e+22]
  6. yt : [INFO     ] 2013-07-05 13:05:05,270 Parameters: domain_right_edge         = [  2.46854420e+22   1.97483536e+23   2.46854420e+22]
  7. yt : [INFO     ] 2013-07-05 13:05:05,271 Parameters: cosmological_simulation   = 0.0
  8. Python 2.7.4 (default, Jun 11 2013, 16:44:34)
  9. Type "copyright", "credits" or "license" for more information.
  10.  
  11. IPython 0.13.1 -- An enhanced Interactive Python.
  12. ?         -> Introduction and overview of IPython's features.
  13. %quickref -> Quick reference.
  14. help      -> Python's own help system.
  15. object?   -> Details about 'object', use 'object??' for extra details.
  16.  
  17. In [1]: from yt.analysis_modules.level_sets.api import *
  18.  
  19. In [2]: dd=pf.h.all_data()
  20. yt : [WARNING  ] 2013-07-05 13:05:34,768 Dimensionality less than 3: reverting to overlap_proj
  21.  
  22. In [3]: function='self.data["Density"].size>20'
  23.  
  24. In [4]: master_clump = Clump(dd,None,"Density",function=function)
  25. yt : [INFO     ] 2013-07-05 13:06:19,576 Getting field dens from 3648
  26.  
  27. In [5]: find_clumps(master_clump,1.0e-29,1.0e-24,2.0)
  28. Finding clumps: min: 1.000000e-29, max: 1.000000e-24, step: 2.000000
  29. yt : [ERROR    ] 2013-07-05 13:07:05,792 Covering problem: 181 cells are uncovered
  30. ---------------------------------------------------------------------------
  31. KeyError                                  Traceback (most recent call last)
  32. /home/jforbes/yt-x86_64/src/yt-hg/yt/mods.py in <module>()
  33. ----> 1 find_clumps(master_clump,1.0e-29,1.0e-24,2.0)
  34.  
  35. /home/jforbes/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py in find_clumps(clump, min_val, max_val, d_clump)
  36.     177     print "Finding clumps: min: %e, max: %e, step: %f" % (min_val, max_val, d_clump)
  37.     178     if min_val >= max_val: return
  38. --> 179     clump.find_children(min_val)
  39.     180
  40.     181     if (len(clump.children) == 1):
  41.  
  42. /home/jforbes/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/clump_handling.py in find_children(self, min_val, max_val)
  43.     118         if max_val is None: max_val = self.max_val
  44.     119         contour_info = identify_contours(self.data, self.field, min_val, max_val,
  45. --> 120                                          self.cached_fields)
  46.     121         for cid in contour_info:
  47.     122             new_clump = self.data.extract_region(contour_info[cid])
  48.  
  49. /home/jforbes/yt-x86_64/src/yt-hg/yt/analysis_modules/level_sets/contour_finder.py in identify_contours(data_source, field, min_val, max_val, cached_fields)
  50.     105     for gi,grid in enumerate(grids):
  51.     106         pbar.update(gi)
  52. --> 107         cg = grid.retrieve_ghost_zones(1, "tempContours", smoothed=False)
  53.     108         grid_set.update(set(cg._grids))
  54.     109         fd = cg["tempContours"].astype('int64')
  55.  
  56. /home/jforbes/yt-x86_64/src/yt-hg/yt/data_objects/grid_patch.py in retrieve_ghost_zones(self, n_zones, fields, all_levels, smoothed)
  57.     477                 level, new_left_edge, **kwargs)
  58.     478         else:
  59. --> 479             cube = self.hierarchy.covering_grid(level, new_left_edge, **kwargs)
  60.     480
  61.     481         return cube
  62.  
  63. /home/jforbes/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py in __init__(self, level, left_edge, dims, fields, pf, num_ghost_zones, use_pbar, **kwargs)
  64.    3712         self.domain_width = np.rint((self.pf.domain_right_edge -
  65.    3713                     self.pf.domain_left_edge)/self.dds).astype('int64')
  66. -> 3714         self._refresh_data()
  67.    3715
  68.    3716     def _get_list_of_grids(self, buffer = 0.0):
  69.  
  70. /home/jforbes/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py in _refresh_data(self)
  71.    3729
  72.    3730     def _refresh_data(self):
  73. -> 3731         AMR3DData._refresh_data(self)
  74.    3732         self['dx'] = self.dds[0] * np.ones(self.ActiveDimensions, dtype='float64')
  75.    3733         self['dy'] = self.dds[1] * np.ones(self.ActiveDimensions, dtype='float64')
  76.  
  77. /home/jforbes/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py in _refresh_data(self)
  78.     318         """
  79.    319         self.clear_data()
  80. --> 320         self.get_data()
  81.    321
  82.    322     def keys(self):
  83.  
  84. /home/jforbes/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py in get_data(self, fields)
  85.   3773             n_bad = np.where(self[obtain_fields[0]]==-999)[0].size
  86.   3774             mylog.error("Covering problem: %s cells are uncovered", n_bad)
  87. -> 3775             raise KeyError(n_bad)
  88.   3776
  89.   3777     def _generate_field(self, field):
  90.  
  91. KeyError: 181
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement