Commits

John ZuHone  committed 38156b8

Cosmetic fixes

  • Participants
  • Parent commits 7eef966

Comments (0)

Files changed (2)

File yt/frontends/stream/data_structures.py

             if data[i].has_key("number_of_particles") :
                 grid.NumberOfParticles = data[i].pop("number_of_particles")
             for key in data[i].keys() :
-                if key in grid.keys() : del grid[key]
+                if key in grid.keys() : grid.field_data.pop(key, None)
                 self.stream_handler.fields[grid.id][key] = data[i][key]
             
         self._detect_fields()
-        
-        
+                
 class StreamStaticOutput(StaticOutput):
     _hierarchy_class = StreamHierarchy
     _fieldinfo_fallback = StreamFieldInfo

File yt/utilities/particle_generator.py

         """
         return self.num_particles
 
-    def get_from_grid(self, grid) :
+    def get_for_grid(self, grid) :
         """
         Return a dict containing all of the particle fields in the specified grid.
         """
             else :
                 data["number_of_particles"] = self.NumberOfParticles[i] + \
                                               g.NumberOfParticles
-            grid_particles = self.get_from_grid(g)
+            grid_particles = self.get_for_grid(g)
             for field in self.field_list :
                 if data["number_of_particles"] > 0 :
                     # We have particles in this grid
                         # Particles already exist
                         if field in self.pf.h.field_list :
                             # This field already exists
-                            #prev_particles = self.pf.h.io._read_data_set(g,field)
                             prev_particles = g[field]
                         else :
                             # This one doesn't, set the previous particles' field