1. Sam Skillman
  2. yt

Commits

Sam Skillman  committed 84ec8a8 Merge

Merging from mainline.

  • Participants
  • Parent commits ce28dfa, db1d802
  • Branches yt

Comments (0)

Files changed (6)

File CREDITS

View file
  • Ignore whitespace
 YT is a group effort.
 
-Contributors:                   Matthew Turk (matthewturk@gmail.com)
-                                Britton Smith (brittonsmith@gmail.com)
-                                Jeff Oishi (jsoishi@gmail.com)
-                                Stephen Skory (s@skory.us)
-                                Sam Skillman (samskillman@gmail.com)
-                                Devin Silvia (devin.silvia@gmail.com)
-                                John Wise (jwise@astro.princeton.edu)
-                                David Collins (dcollins@physics.ucsd.edu)
-                                Christopher Moody (cemoody@ucsc.edu)
-                                Oliver Hahn (ohahn@stanford.edu)
-                                John ZuHone (jzuhone@cfa.harvard.edu)
-                                Chris Malone (cmalone@mail.astro.sunysb.edu)
-                                Cameron Hummels (chummels@astro.columbia.edu)
-                                Stefan Klemer (sklemer@phys.uni-goettingen.de)
-                                Tom Abel (tabel@stanford.edu)
-                                Andrew Myers (atmyers@astro.berkeley.edu)
-                                Michael Kuhlen (mqk@astro.berkeley.edu)
-                                Casey Stark (caseywstark@gmail.com)
-                                JC Passy (jcpassy@gmail.com)
-                                Eve Lee (elee@cita.utoronto.ca)
-                                Elizabeth Tasker (tasker@astro1.sci.hokudai.ac.jp)
-                                Kacper Kowalik (xarthisius.kk@gmail.com)
-                                Nathan Goldbaum (goldbaum@ucolick.org)
-                                Anna Rosen (rosen@ucolick.org)
+Contributors:                   Tom Abel (tabel@stanford.edu)
+				David Collins (dcollins@physics.ucsd.edu)
+				Brian Crosby (crosby.bd@gmail.com)
+				Andrew Cunningham (ajcunn@gmail.com)
+				Nathan Goldbaum (goldbaum@ucolick.org)
+				Markus Haider (markus.haider@uibk.ac.at)
+				Cameron Hummels (chummels@gmail.com)
+				Christian Karch (chiffre@posteo.de)
+				Ji-hoon Kim (me@jihoonkim.org)
+				Steffen Klemer (sklemer@phys.uni-goettingen.de)
+				Kacper Kowalik (xarthisius.kk@gmail.com)
+				Michael Kuhlen (mqk@astro.berkeley.edu)
+				Eve Lee (elee@cita.utoronto.ca)
+				Yuan Li (yuan@astro.columbia.edu)
+				Chris Malone (chris.m.malone@gmail.com)
+				Josh Maloney (joshua.moloney@colorado.edu)
+				Chris Moody (cemoody@ucsc.edu)
+				Andrew Myers (atmyers@astro.berkeley.edu)
+				Jeff Oishi (jsoishi@gmail.com)
+				Jean-Claude Passy (jcpassy@uvic.ca)
+				Mark Richardson (Mark.L.Richardson@asu.edu)
+				Thomas Robitaille (thomas.robitaille@gmail.com)
+				Anna Rosen (rosen@ucolick.org)
+				Anthony Scopatz (scopatz@gmail.com)
+				Devin Silvia (devin.silvia@colorado.edu)
+				Sam Skillman (samskillman@gmail.com)
+				Stephen Skory (s@skory.us)
+				Britton Smith (brittonsmith@gmail.com)
+				Geoffrey So (gsiisg@gmail.com)
+				Casey Stark (caseywstark@gmail.com)
+				Elizabeth Tasker (tasker@astro1.sci.hokudai.ac.jp)
+				Stephanie Tonnesen (stonnes@gmail.com)
+				Matthew Turk (matthewturk@gmail.com)
+				Rich Wagner (rwagner@physics.ucsd.edu)
+				John Wise (jwise@physics.gatech.edu)
+				John ZuHone (jzuhone@gmail.com)
 
 We also include the Delaunay Triangulation module written by Robert Kern of
 Enthought, the cmdln.py module by Trent Mick, and the progressbar module by

File setup.cfg

  • Ignore whitespace
File contents unchanged.

File yt/analysis_modules/halo_merger_tree/enzofof_merger_tree.py

View file
  • Ignore whitespace
         ax.set_xscale("log")
     if y_log:
         ax.set_yscale("log")
-    ofn = "%s_%s_%s.png" % (basename, fields[0], fields[1])
+    ofn = "%s/%s_%s_%s.png" % (FOF_directory, basename, fields[0], fields[1])
     plt.savefig(ofn)
     plt.clf()

File yt/utilities/particle_generator.py

View file
  • Ignore whitespace
 
     default_fields = ["particle_position_x",
                       "particle_position_y",
-                      "particle_position_z",
-                      "particle_index"]
-
+                      "particle_position_z"]
+    
     def __init__(self, pf, num_particles, field_list) :
         """
         Base class for generating particle fields which may be applied to
         self.pf = pf
         self.num_particles = num_particles
         self.field_list = field_list
-            
+        self.field_list.append("particle_index")
+        
         try :
             self.posx_index = self.field_list.index(self.default_fields[0])
             self.posy_index = self.field_list.index(self.default_fields[1])
             self.posz_index = self.field_list.index(self.default_fields[2])
-            self.index_index = self.field_list.index(self.default_fields[3])
         except :
             raise KeyError("Field list must contain the following fields: " +
                            "\'particle_position_x\', \'particle_position_y\'" +
-                           ", \'particle_position_z\', \'particle_index\' ")
-
+                           ", \'particle_position_z\' ")
+        self.index_index = self.field_list.index("particle_index")
+        
         self.num_grids = self.pf.h.num_grids
         self.NumberOfParticles = np.zeros((self.num_grids), dtype='int64')
-        self.ParticleIndices = np.zeros(self.num_grids + 1, dtype='int64')
+        self.ParticleGridIndices = np.zeros(self.num_grids + 1, dtype='int64')
         
         self.num_fields = len(self.field_list)
         
         Return a dict containing all of the particle fields in the specified grid.
         """
         ind = grid.id-grid._id_offset
-        start = self.ParticleIndices[ind]
-        end = self.ParticleIndices[ind+1]
+        start = self.ParticleGridIndices[ind]
+        end = self.ParticleGridIndices[ind+1]
         return dict([(field, self.particles[start:end,self.field_list.index(field)])
                      for field in self.field_list])
     
                                              minlength=self.num_grids)
         if self.num_grids > 1 :
             np.add.accumulate(self.NumberOfParticles.squeeze(),
-                              out=self.ParticleIndices[1:])
+                              out=self.ParticleGridIndices[1:])
         else :
-            self.ParticleIndices[1] = self.NumberOfParticles.squeeze()
+            self.ParticleGridIndices[1] = self.NumberOfParticles.squeeze()
         if setup_fields is not None:
             for key, value in setup_fields.items():
                 if key not in self.default_fields:
         for i, grid in enumerate(self.pf.h.grids) :
             pbar.update(i)
             if self.NumberOfParticles[i] > 0:
-                start = self.ParticleIndices[i]
-                end = self.ParticleIndices[i+1]
+                start = self.ParticleGridIndices[i]
+                end = self.ParticleGridIndices[i+1]
                 # Note we add one ghost zone to the grid!
                 cube = grid.retrieve_ghost_zones(1, mapping_dict.keys())
                 le = np.array(grid.LeftEdge).astype(np.float64)
         >>> le = np.array([0.25,0.25,0.25])
         >>> re = np.array([0.75,0.75,0.75])
         >>> fields = ["particle_position_x","particle_position_y",
-        >>>           "particle_position_z","particle_index",
+        >>>           "particle_position_z",
         >>>           "particle_density","particle_temperature"]
         >>> particles = LatticeParticleGenerator(pf, dims, le, re, fields)
         """
         >>> sphere = pf.h.sphere(pf.domain_center, 0.5)
         >>> num_p = 100000
         >>> fields = ["particle_position_x","particle_position_y",
-        >>>           "particle_position_z","particle_index",
+        >>>           "particle_position_z",
         >>>           "particle_density","particle_temperature"]
         >>> particles = WithDensityParticleGenerator(pf, sphere, num_particles,
         >>>                                          fields, density_field='Dark_Matter_Density')

File yt/visualization/plot_collection.py

View file
  • Ignore whitespace
         self.images.append((os.path.basename(fn), np.fromfile(fn, dtype='c')))
 
 class PlotCollection(object):
-    r"""The primary interface for creating plots.
-
-    The PlotCollection object was created to ease the creation of multiple
+    r"""The PlotCollection object was created to ease the creation of multiple
     slices, projections and so forth made from a single parameter file.
     The concept is that when the width on one image changes, it should
     change on all the others.  The PlotCollection can create all plot types

File yt/visualization/volume_rendering/camera.py

View file
  • Ignore whitespace
         px = (res[1]*(dy/self.width[1])).astype('int')
         return px, py, dz
 
-    def draw_grids(self, im, alpha=0.3, cmap='algae'):
+    def draw_grids(self, im, alpha=0.3, cmap='algae', min_level=None, 
+                   max_level=None):
         r"""Draws Grids on an existing volume rendering.
 
         By mapping grid level to a color, drawes edges of grids on 
             Default : 0.3
         cmap : string, optional
             Colormap to be used mapping grid levels to colors.
+        min_level, max_level : int, optional
+            Optional parameters to specify the min and max level grid boxes 
+            to overplot on the image.  
         
         Returns
         -------
         """
         corners = self.pf.h.grid_corners
         levels = self.pf.h.grid_levels[:,0]
+
+        if max_level is not None:
+            subset = levels <= max_level
+            levels = levels[subset]
+            corners = corners[:,:,subset]
+        if min_level is not None:
+            subset = levels >= min_level
+            levels = levels[subset]
+            corners = corners[:,:,subset]
+            
         colors = apply_colormap(levels*1.0,
                                 color_bounds=[0,self.pf.h.max_level],
                                 cmap_name=cmap)[0,:,:]*1.0/255.