[Yt-svn] commit/yt: 2 new changesets

Bitbucket commits-noreply at bitbucket.org
Tue Jun 7 16:00:57 PDT 2011


2 new changesets in yt:

http://bitbucket.org/yt_analysis/yt/changeset/8b80bf27db2a/
changeset:   8b80bf27db2a
branch:      yt
user:        MatthewTurk
date:        2011-06-07 08:09:29
summary:     Reducing memory overhead for Quadtree nodes by removing level and nvals.
Adding a new Cython-routine for more quickly detecting and identify
child/parent relationships in Boxlib data.
affected #:  3 files (1.4 KB)

--- a/yt/frontends/castro/data_structures.py	Mon Jun 06 22:10:38 2011 -0400
+++ b/yt/frontends/castro/data_structures.py	Mon Jun 06 23:09:29 2011 -0700
@@ -46,6 +46,8 @@
            StaticOutput
 from yt.utilities.definitions import \
     mpc_conversion
+from yt.utilities.amr_utils import \
+    get_box_grids_level
 
 from .definitions import \
     castro2enzoDict, \
@@ -380,8 +382,13 @@
             grid._setup_dx()
 
     def __setup_grid_tree(self):
+        mask = na.empty(self.grids.size, dtype='int32')
         for i, grid in enumerate(self.grids):
-            children = self._get_grid_children(grid)
+            get_box_grids_level(grid.LeftEdge, grid.RightEdge, grid.Level + 1,
+                                self.grid_left_edge, self.grid_right_edge,
+                                self.grid_levels, mask)
+            children = self.grids[mask.astype("bool")]
+            #assert(len(children) == len(self._get_grid_children(grid)))
             for child in children:
                 self.gridReverseTree[child.id].append(i)
                 self.gridTree[i].append(weakref.proxy(child))


--- a/yt/utilities/_amr_utils/QuadTree.pyx	Mon Jun 06 22:10:38 2011 -0400
+++ b/yt/utilities/_amr_utils/QuadTree.pyx	Mon Jun 06 23:09:29 2011 -0700
@@ -41,18 +41,17 @@
     np.float64_t *val
     np.float64_t weight_val
     np.int64_t pos[2]
-    int level
-    int nvals
     QuadTreeNode *children[2][2]
 
 cdef void QTN_add_value(QuadTreeNode *self,
-        np.float64_t *val, np.float64_t weight_val):
+        np.float64_t *val, np.float64_t weight_val,
+        int nvals):
     cdef int i
-    for i in range(self.nvals):
+    for i in range(nvals):
         self.val[i] += val[i]
     self.weight_val += weight_val
 
-cdef void QTN_refine(QuadTreeNode *self):
+cdef void QTN_refine(QuadTreeNode *self, int nvals):
     cdef int i, j, i1, j1
     cdef np.int64_t npos[2]
     cdef QuadTreeNode *node
@@ -62,27 +61,22 @@
             npos[1] = self.pos[1] * 2 + j
             # We have to be careful with allocation...
             self.children[i][j] = QTN_initialize(
-                        npos,
-                        self.nvals, self.val, self.weight_val,
-                        self.level + 1)
-    for i in range(self.nvals): self.val[i] = 0.0
+                        npos, nvals, self.val, self.weight_val)
+    for i in range(nvals): self.val[i] = 0.0
     self.weight_val = 0.0
 
 cdef QuadTreeNode *QTN_initialize(np.int64_t pos[2], int nvals,
-                        np.float64_t *val, np.float64_t weight_val,
-                        int level):
+                        np.float64_t *val, np.float64_t weight_val):
     cdef QuadTreeNode *node
     cdef int i, j
     node = <QuadTreeNode *> malloc(sizeof(QuadTreeNode))
     node.pos[0] = pos[0]
     node.pos[1] = pos[1]
-    node.nvals = nvals
     node.val = <np.float64_t *> malloc(
                 nvals * sizeof(np.float64_t))
     for i in range(2):
         for j in range(2):
             node.children[i][j] = NULL
-    node.level = level
     if val != NULL:
         for i in range(nvals):
             node.val[i] = val[i]
@@ -106,6 +100,7 @@
     cdef QuadTreeNode ***root_nodes
     cdef np.int64_t top_grid_dims[2]
     cdef int merged
+    cdef int num_cells
 
     def __cinit__(self, np.ndarray[np.int64_t, ndim=1] top_grid_dims,
                   int nvals):
@@ -136,7 +131,8 @@
             for j in range(top_grid_dims[1]):
                 pos[1] = j
                 self.root_nodes[i][j] = QTN_initialize(
-                    pos, nvals, vals, weight_val, 0)
+                    pos, nvals, vals, weight_val)
+        self.num_cells = self.top_grid_dims[0] * self.top_grid_dims[1]
 
     cdef int count_total_cells(self, QuadTreeNode *root):
         cdef int total = 0
@@ -184,7 +180,7 @@
             for j in range(2):
                 pos[0] = root.pos[0]*2 + i
                 pos[1] = root.pos[1]*2 + j
-                child = QTN_initialize(pos, self.nvals, NULL, 0.0, root.level+1)
+                child = QTN_initialize(pos, self.nvals, NULL, 0.0)
                 root.children[i][j] = child
                 curpos = self.unfill_buffer(child, curpos, refined, values, wval)
         return curpos
@@ -198,6 +194,7 @@
         self.merged = 1 # Just on the safe side
         cdef int curpos = 0
         cdef QuadTreeNode *root
+        self.num_cells = wval.shape[0]
         for i in range(self.top_grid_dims[0]):
             for j in range(self.top_grid_dims[1]):
                 curpos = self.unfill_buffer(self.root_nodes[i][j], curpos,
@@ -206,10 +203,7 @@
     @cython.boundscheck(False)
     @cython.wraparound(False)
     def tobuffer(self):
-        cdef int total = 0
-        for i in range(self.top_grid_dims[0]):
-            for j in range(self.top_grid_dims[1]):
-                total += self.count_total_cells(self.root_nodes[i][j])
+        cdef int total = self.num_cells
         # We now have four buffers:
         # Refined or not (total,) int32
         # Values in each node (total, nvals) float64
@@ -240,13 +234,14 @@
         cdef np.int64_t fac
         for L in range(level):
             if node.children[0][0] == NULL:
-                QTN_refine(node)
+                QTN_refine(node, self.nvals)
+                self.num_cells += 4
             # Maybe we should use bitwise operators?
             fac = self.po2[level - L - 1]
             i = (pos[0] >= fac*(2*node.pos[0]+1))
             j = (pos[1] >= fac*(2*node.pos[1]+1))
             node = node.children[i][j]
-        QTN_add_value(node, val, weight_val)
+        QTN_add_value(node, val, weight_val, self.nvals)
             
     @cython.cdivision(True)
     cdef QuadTreeNode *find_on_root_level(self, np.int64_t pos[2], int level):
@@ -292,7 +287,7 @@
         vals = []
         for i in range(self.top_grid_dims[0]):
             for j in range(self.top_grid_dims[1]):
-                total += self.count_at_level(self.root_nodes[i][j], level)
+                total += self.count_at_level(self.root_nodes[i][j], level, 0)
         if count_only: return total
         # Allocate our array
         cdef np.ndarray[np.int64_t, ndim=2] npos
@@ -313,14 +308,14 @@
                 for vi in range(self.nvals): vtoadd[vi] = 0.0
                 wtoadd = 0.0
                 curpos += self.fill_from_level(self.root_nodes[i][j],
-                    level, curpos, pdata, vdata, wdata, vtoadd, wtoadd)
+                    level, curpos, pdata, vdata, wdata, vtoadd, wtoadd, 0)
         return npos, nvals, nwvals
 
-    cdef int count_at_level(self, QuadTreeNode *node, int level):
+    cdef int count_at_level(self, QuadTreeNode *node, int level, int cur_level):
         cdef int i, j
         # We only really return a non-zero, calculated value if we are at the
         # level in question.
-        if node.level == level:
+        if cur_level == level:
             # We return 1 if there are no finer points at this level and zero
             # if there are
             return (node.children[0][0] == NULL)
@@ -328,7 +323,8 @@
         cdef int count = 0
         for i in range(2):
             for j in range(2):
-                count += self.count_at_level(node.children[i][j], level)
+                count += self.count_at_level(node.children[i][j], level,
+                                             cur_level + 1)
         return count
 
     cdef int fill_from_level(self, QuadTreeNode *node, int level,
@@ -337,9 +333,10 @@
                               np.float64_t *vdata,
                               np.float64_t *wdata,
                               np.float64_t *vtoadd,
-                              np.float64_t wtoadd):
+                              np.float64_t wtoadd,
+                              int cur_level):
         cdef int i, j
-        if node.level == level:
+        if cur_level == level:
             if node.children[0][0] != NULL: return 0
             for i in range(self.nvals):
                 vdata[self.nvals * curpos + i] = node.val[i] + vtoadd[i]
@@ -357,7 +354,7 @@
             for j in range(2):
                 added += self.fill_from_level(node.children[i][j],
                         level, curpos + added, pdata, vdata, wdata,
-                        vtoadd, wtoadd)
+                        vtoadd, wtoadd, cur_level + 1)
         if self.merged == 1:
             for i in range(self.nvals):
                 vtoadd[i] -= node.val[i]
@@ -372,7 +369,7 @@
             free(self.root_nodes[i])
         free(self.root_nodes)
 
-cdef void QTN_merge_nodes(QuadTreeNode *n1, QuadTreeNode *n2):
+cdef void QTN_merge_nodes(QuadTreeNode *n1, QuadTreeNode *n2, int nvals):
     # We have four choices when merging nodes.
     # 1. If both nodes have no refinement, then we add values of n2 to n1.
     # 2. If both have refinement, we call QTN_merge_nodes on all four children.
@@ -381,13 +378,13 @@
     # 4. If n1 has refinement and n2 does not, we add the value of n2 to n1.
     cdef int i, j
 
-    QTN_add_value(n1, n2.val, n2.weight_val)
+    QTN_add_value(n1, n2.val, n2.weight_val, nvals)
     if n1.children[0][0] == n2.children[0][0] == NULL:
         pass
     elif n1.children[0][0] != NULL and n2.children[0][0] != NULL:
         for i in range(2):
             for j in range(2):
-                QTN_merge_nodes(n1.children[i][j], n2.children[i][j])
+                QTN_merge_nodes(n1.children[i][j], n2.children[i][j], nvals)
     elif n1.children[0][0] == NULL and n2.children[0][0] != NULL:
         for i in range(2):
             for j in range(2):
@@ -400,8 +397,12 @@
 
 def merge_quadtrees(QuadTree qt1, QuadTree qt2):
     cdef int i, j
+    qt1.num_cells = 0
     for i in range(qt1.top_grid_dims[0]):
         for j in range(qt1.top_grid_dims[1]):
             QTN_merge_nodes(qt1.root_nodes[i][j],
-                            qt2.root_nodes[i][j])
+                            qt2.root_nodes[i][j],
+                            qt1.nvals)
+            qt1.num_cells += qt1.count_total_cells(
+                                qt1.root_nodes[i][j])
     qt1.merged = 1


--- a/yt/utilities/_amr_utils/misc_utilities.pyx	Mon Jun 06 22:10:38 2011 -0400
+++ b/yt/utilities/_amr_utils/misc_utilities.pyx	Mon Jun 06 23:09:29 2011 -0700
@@ -50,3 +50,26 @@
             if v < mi: mi = v
             if v > ma: ma = v
     return (mi, ma)
+
+def get_box_grids_level(np.ndarray[np.float64_t, ndim=1] left_edge,
+                        np.ndarray[np.float64_t, ndim=1] right_edge,
+                        int level,
+                        np.ndarray[np.float64_t, ndim=2] left_edges,
+                        np.ndarray[np.float64_t, ndim=2] right_edges,
+                        np.ndarray[np.int64_t, ndim=2] levels,
+                        np.ndarray[np.int32_t, ndim=1] mask):
+    cdef int i, n
+    cdef int nx = left_edges.shape[0]
+    cdef int inside 
+    for i in range(nx):
+        if levels[i,0] != level:
+            mask[i] = 0
+            continue
+        inside = 1
+        for n in range(3):
+            if left_edge[n] > right_edges[i,n] or \
+               right_edge[n] < left_edges[i,n]:
+                inside = 0
+                break
+        if inside == 1: mask[i] = 1
+        else: mask[i] = 0


http://bitbucket.org/yt_analysis/yt/changeset/c475201c2e9e/
changeset:   c475201c2e9e
branch:      yt
user:        MatthewTurk
date:        2011-06-08 01:00:46
summary:     Merge
affected #:  7 files (14.1 KB)

--- a/yt/analysis_modules/light_ray/light_ray.py	Mon Jun 06 23:09:29 2011 -0700
+++ b/yt/analysis_modules/light_ray/light_ray.py	Tue Jun 07 16:00:46 2011 -0700
@@ -164,7 +164,8 @@
 
     def make_light_ray(self, seed=None, fields=None, 
                        solution_filename=None, data_filename=None,
-                       get_nearest_galaxy=False, get_los_velocity=False, **kwargs):
+                       get_nearest_galaxy=False, get_los_velocity=False, 
+                       halo_mass_field='TotalMassMsun_200', **kwargs):
         """
         Create a light ray and get field values for each lixel.  A light ray consists of 
         a list of field values for cells intersected by the ray and the path length of 
@@ -184,7 +185,7 @@
 
         GETTING THE NEAREST GALAXIES
         The light ray tool will use the HaloProfiler to calculate the distance and mass 
-        of the nearest halo to that pixel.  In order to do this, three additional keyword 
+        of the nearest halo to that pixel.  In order to do this, four additional keyword 
         arguments must be supplied to tell the HaloProfiler what to do.
 
         :param halo_profiler_kwargs (dict): a dictionary of standard HaloProfiler keyword 
@@ -211,6 +212,9 @@
         :param halo_list (string): 'all' to use the full halo list, or 'filtered' to use 
         the filtered halo list created after calling make_profiles.
                EXAMPLE: halo_list = 'filtered'
+
+        :param halo_mass_field (string): the field from the halo list to use for mass.  
+        Default: 'TotalMassMsun_200'.
         """
 
         # Calculate solution.
@@ -293,7 +297,8 @@
             # Calculate distance to nearest object on halo list for each lixel.
             if get_nearest_galaxy:
                 sub_data['nearest_galaxy'], sub_data['nearest_galaxy_mass'] = \
-                    self._get_nearest_galaxy_distance(sub_data, halo_list)
+                    self._get_nearest_galaxy_distance(sub_data, halo_list,
+                                                      halo_mass_field=halo_mass_field)
                 sub_data['nearest_galaxy'] *= pf.units['mpccm']
 
             # Remove empty lixels.
@@ -371,7 +376,8 @@
         del hp
         return return_list
 
-    def _get_nearest_galaxy_distance(self, data, halo_list):
+    def _get_nearest_galaxy_distance(self, data, halo_list, 
+                                     halo_mass_field='TotalMassMsun_200'):
         """
         Calculate distance to nearest object in halo list for each lixel in data.
         Return list of distances and masses of nearest objects.
@@ -379,7 +385,7 @@
 
         # Create position array from halo list.
         halo_centers = na.array(map(lambda halo: halo['center'], halo_list))
-        halo_mass = na.array(map(lambda halo: halo['TotalMassMsun'], halo_list))
+        halo_mass = na.array(map(lambda halo: halo[halo_mass_field], halo_list))
 
         nearest_distance = na.zeros(data['x'].shape)
         nearest_mass = na.zeros(data['x'].shape)


--- a/yt/analysis_modules/simulation_handler/enzo_simulation.py	Mon Jun 06 23:09:29 2011 -0700
+++ b/yt/analysis_modules/simulation_handler/enzo_simulation.py	Tue Jun 07 16:00:46 2011 -0700
@@ -43,7 +43,7 @@
     Super class for performing the same operation over all data dumps in 
     a simulation from one redshift to another.
     """
-    def __init__(self, EnzoParameterFile, initial_time=None, final_time=None, initial_redshift=None, final_redshift=None,
+    def __init__(self, enzo_parameter_file, initial_time=None, final_time=None, initial_redshift=None, final_redshift=None,
                  links=False, enzo_parameters=None, get_time_outputs=True, get_redshift_outputs=True, get_available_data=False,
                  get_data_by_force=False):
         """
@@ -70,14 +70,14 @@
                is loaded up to get the time and redshift manually.  This is useful with collapse simulations that use 
                OutputFirstTimeAtLevel or with simulations that make outputs based on cycle numbers.  Default: False.
         """
-        self.EnzoParameterFile = EnzoParameterFile
+        self.enzo_parameter_file = enzo_parameter_file
         self.enzoParameters = {}
         self.redshift_outputs = []
         self.allOutputs = []
         self.InitialTime = initial_time
         self.FinalTime = final_time
-        self.InitialRedshift = initial_redshift
-        self.FinalRedshift = final_redshift
+        self.initial_redshift = initial_redshift
+        self.final_redshift = final_redshift
         self.links = links
         self.get_time_outputs = get_time_outputs
         self.get_redshift_outputs = get_redshift_outputs
@@ -202,20 +202,20 @@
         """
 
         # Check for sufficient starting/ending parameters.
-        if self.InitialTime is None and self.InitialRedshift is None:
+        if self.InitialTime is None and self.initial_redshift is None:
             if self.enzoParameters['ComovingCoordinates'] and \
                'CosmologyInitialRedshift' in self.enzoParameters:
-                self.InitialRedshift = self.enzoParameters['CosmologyInitialRedshift']
+                self.initial_redshift = self.enzoParameters['CosmologyInitialRedshift']
             elif 'InitialTime' in self.enzoParameters:
                 self.InitialTime = self.enzoParameters['InitialTime']
             else:
                 mylog.error("Couldn't find parameter for initial time or redshift from parameter file.")
                 return None
 
-        if self.FinalTime is None and self.FinalRedshift is None:
+        if self.FinalTime is None and self.final_redshift is None:
             if self.enzoParameters['ComovingCoordinates'] and \
                'CosmologyFinalRedshift' in self.enzoParameters:
-                self.FinalRedshift = self.enzoParameters['CosmologyFinalRedshift']
+                self.final_redshift = self.enzoParameters['CosmologyFinalRedshift']
             elif 'StopTime' in self.enzoParameters:
                 self.FinalTime = self.enzoParameters['StopTime']
             else:
@@ -236,11 +236,11 @@
                                                 OmegaMatterNow = self.enzoParameters['CosmologyOmegaMatterNow'],
                                                 OmegaLambdaNow = self.enzoParameters['CosmologyOmegaLambdaNow'],
                                                 InitialRedshift = self.enzoParameters['CosmologyInitialRedshift'])
-            if self.InitialRedshift is not None:
-                self.InitialTime = self.enzo_cosmology.ComputeTimeFromRedshift(self.InitialRedshift) / \
+            if self.initial_redshift is not None:
+                self.InitialTime = self.enzo_cosmology.ComputeTimeFromRedshift(self.initial_redshift) / \
                     self.enzo_cosmology.TimeUnits
-            if self.FinalRedshift is not None:
-                self.FinalTime = self.enzo_cosmology.ComputeTimeFromRedshift(self.FinalRedshift) / \
+            if self.final_redshift is not None:
+                self.FinalTime = self.enzo_cosmology.ComputeTimeFromRedshift(self.final_redshift) / \
                     self.enzo_cosmology.TimeUnits
 
         # Get initial time of simulation.
@@ -286,7 +286,7 @@
 
     def _read_enzo_parameter_file(self):
         "Reads an Enzo parameter file looking for cosmology and output parameters."
-        lines = open(self.EnzoParameterFile).readlines()
+        lines = open(self.enzo_parameter_file).readlines()
         for line in lines:
             if line.find("#") >= 0: # Keep the commented lines
                 line=line[:line.find("#")]
@@ -383,8 +383,8 @@
                the lowest redshift dataset present will be used.  Default: None.
         """
 
-        if initial_redshift is None: initial_redshift = self.InitialRedshift
-        if final_redshift is None: final_redshift = self.FinalRedshift
+        if initial_redshift is None: initial_redshift = self.initial_redshift
+        if final_redshift is None: final_redshift = self.final_redshift
 
         # Calculate maximum delta z for each data dump.
         self._calculate_deltaz_max()


--- a/yt/frontends/ramses/_ramses_reader.pyx	Mon Jun 06 23:09:29 2011 -0700
+++ b/yt/frontends/ramses/_ramses_reader.pyx	Tue Jun 07 16:00:46 2011 -0700
@@ -457,6 +457,8 @@
         if self.snapshot_name != NULL: del self.snapshot_name
         if self.rsnap != NULL: del self.rsnap
         
+    @cython.boundscheck(False)
+    @cython.wraparound(False)
     def count_zones(self):
         # We need to do simulation domains here
 
@@ -468,10 +470,9 @@
 
         # All the loop-local pointers must be declared up here
 
-        cell_count = []
+        cdef np.ndarray[np.int64_t, ndim=1] cell_count
+        cell_count = np.zeros(self.rsnap.m_header.levelmax + 1, 'int64')
         cdef int local_count = 0
-        for ilevel in range(self.rsnap.m_header.levelmax + 1):
-            cell_count.append(0)
         for idomain in range(1, self.rsnap.m_header.ncpu + 1):
             local_tree = new RAMSES_tree(deref(self.rsnap), idomain,
                                          self.rsnap.m_header.levelmax, 0)
@@ -545,6 +546,9 @@
 
         return header_info
 
+    @cython.cdivision(True)
+    @cython.boundscheck(False)
+    @cython.wraparound(False)
     def fill_hierarchy_arrays(self, 
                               np.ndarray[np.int32_t, ndim=1] top_grid_dims,
                               np.ndarray[np.float64_t, ndim=2] left_edges,
@@ -575,8 +579,8 @@
 
         cdef np.int32_t rr
         cdef int i
-        cell_count = []
-        level_cell_counts = {}
+        cdef np.ndarray[np.int64_t, ndim=1] level_cell_counts
+        level_cell_counts = np.zeros(self.rsnap.m_header.levelmax + 1, 'int64')
         for idomain in range(1, self.rsnap.m_header.ncpu + 1):
             local_tree = new RAMSES_tree(deref(self.rsnap), idomain,
                                          self.rsnap.m_header.levelmax, 0)


--- a/yt/utilities/command_line.py	Mon Jun 06 23:09:29 2011 -0700
+++ b/yt/utilities/command_line.py	Tue Jun 07 16:00:46 2011 -0700
@@ -654,13 +654,30 @@
         print "Hi there!  Welcome to the yt bugreport taker."
         print
         print "==============================================================="
+        print "At any time in advance of the upload of the bug, you should feel free"
+        print "to ctrl-C out and submit the bug report manually by going here:"
+        print "   http://hg.enzotools.org/yt/issues/new"
+        print 
+        print "Also, in order to submit a bug through this interface, you"
+        print "need a Bitbucket account. If you don't have one, exit this "
+        print "bugreport now and run the 'yt bootstrap_dev' command to create one."
         print
-        print "At any time in advance of the upload of the bug, you"
-        print "should feel free to ctrl-C out and submit the bug "
-        print "report manually by going here:"
-        print "   http://hg.enzotools.org/yt/issues/new"
+        print "Have you checked the existing bug reports to make"
+        print "sure your bug has not already been recorded by someone else?"
+        print "   http://hg.enzotools.org/yt/issues?status=new&status=open"
         print
-        print "First off, how about a nice, pithy summary of the bug?"
+        print "Finally, are you sure that your bug is, in fact, a bug? It might"
+        print "simply be a misunderstanding that could be cleared up by"
+        print "visiting the yt irc channel or getting advice on the email list:"
+        print "   http://yt.enzotools.org/irc.html"
+        print "   http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org"
+        print
+        summary = raw_input("Press <enter> if you remain firm in your conviction to continue.")
+        print
+        print
+        print "Okay, sorry about that. How about a nice, pithy ( < 12 words )"
+        print "summary of the bug?  (e.g. 'Particle overlay problem with parallel "
+        print "projections')"
         print
         try:
             current_version = get_yt_version()
@@ -669,11 +686,12 @@
         summary = raw_input("Summary? ")
         bugtype = "bug"
         data = dict(title = summary, type=bugtype)
+        print
         print "Okay, now let's get a bit more information."
         print
         print "Remember that if you want to submit a traceback, you can run"
         print "any script with --paste or --detailed-paste to submit it to"
-        print "the pastebin."
+        print "the pastebin and then include the link in this bugreport."
         if "EDITOR" in os.environ:
             print
             print "Press enter to spawn your editor, %s" % os.environ["EDITOR"]
@@ -730,7 +748,8 @@
         print 
         print "==============================================================="
         print
-        print "Thanks for your bug report!  You can view it here:"
+        print "Thanks for your bug report!  Together we'll make yt totally bug free!"
+        print "You can view bug report here:"
         print "   %s" % url
         print
         print "Keep in touch!"


--- a/yt/visualization/_colormap_data.py	Mon Jun 06 23:09:29 2011 -0700
+++ b/yt/visualization/_colormap_data.py	Tue Jun 07 16:00:46 2011 -0700
@@ -974,3 +974,185 @@
         1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.]),
    )
 
+### kamae ###
+
+color_map_luts['kamae'] = \
+   (
+array([ 0.10189667,  0.11463894,  0.12755761,  0.1405963 ,  0.15373037,
+        0.16694395,  0.18022534,  0.1935652 ,  0.2069557 ,  0.22039001,
+        0.23386204,  0.24736623,  0.26089743,  0.27445076,  0.28802162,
+        0.30160555,  0.31519826,  0.32879554,  0.34239328,  0.35598743,
+        0.36957396,  0.38314889,  0.39670823,  0.41024801,  0.42376423,
+        0.43725291,  0.45071   ,  0.46413146,  0.47751319,  0.49085107,
+        0.5041409 ,  0.51737848,  0.53055952,  0.54367968,  0.55673458,
+        0.56971976,  0.58263072,  0.59546287,  0.60821158,  0.62087213,
+        0.63343975,  0.6459096 ,  0.65827678,  0.6705363 ,  0.68268311,
+        0.69471212,  0.70661814,  0.71839593,  0.73004018,  0.74154553,
+        0.75290655,  0.76411775,  0.7751736 ,  0.7860685 ,  0.79679679,
+        0.8073528 ,  0.81773078,  0.82792495,  0.83792951,  0.8477386 ,
+        0.85734636,  0.86674688,  0.87593426,  0.88490256,  0.89364586,
+        0.90215822,  0.9104337 ,  0.9184664 ,  0.92625041,  0.93377986,
+        0.94104891,  0.94805175,  0.95478263,  0.96123586,  0.9674058 ,
+        0.97328689,  0.97887365,  0.98416071,  0.98914277,  0.99381466,
+        0.99817132,  0.9998451 ,  1.        ,  1.        ,  1.        ,
+        1.        ,  1.        ,  1.        ,  1.        ,  1.        ,
+        1.        ,  1.        ,  1.        ,  1.        ,  1.        ,
+        1.        ,  1.        ,  1.        ,  1.        ,  1.        ,
+        1.        ,  1.        ,  1.        ,  1.        ,  0.99786575,
+        0.99359386,  0.98863281,  0.98330578,  0.97761561,  0.97156558,
+        0.96515943,  0.95840133,  0.95129595,  0.94384841,  0.93606432,
+        0.92794977,  0.91951136,  0.91075617,  0.90169178,  0.8923263 ,
+        0.88266832,  0.87272695,  0.86251183,  0.85203309,  0.84130138,
+        0.83032786,  0.81912419,  0.80770256,  0.79607564,  0.78425658,
+        0.77225906,  0.76009721,  0.74778563,  0.7353394 ,  0.72277404,
+        0.71010551,  0.69735019,  0.68452487,  0.67164675,  0.65873339,
+        0.6458027 ,  0.63287295,  0.6199627 ,  0.60709082,  0.59427645,
+        0.58153897,  0.56889796,  0.55637322,  0.54398469,  0.53175245,
+        0.51969665,  0.50783755,  0.4961954 ,  0.48479047,  0.47364299,
+        0.46277308,  0.45220078,  0.44194595,  0.43202827,  0.42246716,
+        0.41328178,  0.40449095,  0.39611313,  0.38816637,  0.38066827,
+        0.3736359 ,  0.36708582,  0.36103397,  0.35549565,  0.3504855 ,
+        0.34601741,  0.34210448,  0.33875902,  0.33599244,  0.33381526,
+        0.33223703,  0.33126631,  0.3309106 ,  0.33117634,  0.33206882,
+        0.33359218,  0.33574936,  0.33854206,  0.3419707 ,  0.34603442,
+        0.35073099,  0.35605684,  0.362007  ,  0.36857511,  0.37575334,
+        0.38353244,  0.39190166,  0.4008488 ,  0.41036015,  0.42042051,
+        0.43101317,  0.44211993,  0.4537211 ,  0.46579548,  0.47832042,
+        0.49127178,  0.504624  ,  0.51835009,  0.53242166,  0.54680899,
+        0.561481  ,  0.57640533,  0.59154841,  0.60687543,  0.62235047,
+        0.63793653,  0.65359557,  0.66928861,  0.68497576,  0.70061634,
+        0.71616893,  0.73159144,  0.74684123,  0.76187518,  0.77664977,
+        0.79112121,  0.80524551,  0.81897859,  0.83227639,  0.84509499,
+        0.85739069,  0.86912016,  0.88024052,  0.8907095 ,  0.9004855 ,
+        0.90952776,  0.91779647,  0.92525286,  0.93185938,  0.93757975,
+        0.94237913,  0.94622424,  0.94908343,  0.95092687,  0.9517266 ,
+        0.95145666,  0.95009324,  0.94761471,  0.9440018 ,  0.93923763,
+        0.93330785,  0.92620073,  0.9179072 ,  0.90842097,  0.89773857,
+        0.88585945,  0.87278601,  0.85852366,  0.84308084,  0.8264691 ,
+        0.80870311]),
+array([ 0.09276197,  0.12828558,  0.14148276,  0.15073629,  0.15792564,
+        0.16377875,  0.16867726,  0.17285336,  0.17646219,  0.17961453,
+        0.18239341,  0.18486353,  0.18707683,  0.18907613,  0.19089745,
+        0.19257166,  0.19412563,  0.19558306,  0.1969651 ,  0.19829085,
+        0.19957764,  0.2008414 ,  0.20209683,  0.20335757,  0.20463637,
+        0.20594518,  0.20729526,  0.20869724,  0.21016118,  0.21169665,
+        0.21331273,  0.21501809,  0.21682099,  0.2187293 ,  0.22075054,
+        0.22289189,  0.2251602 ,  0.22756199,  0.23010349,  0.23279061,
+        0.23562896,  0.23862389,  0.24178042,  0.24510329,  0.24859697,
+        0.25226561,  0.25611312,  0.26014306,  0.26435875,  0.2687632 ,
+        0.27335911,  0.27814891,  0.28313472,  0.28831836,  0.29370134,
+        0.29928488,  0.30506987,  0.31105692,  0.31724629,  0.32363796,
+        0.33023158,  0.33702647,  0.34402165,  0.35121581,  0.35860731,
+        0.3661942 ,  0.37397421,  0.38194473,  0.39010283,  0.39844526,
+        0.40696847,  0.41566854,  0.42454128,  0.43358216,  0.44278633,
+        0.45214864,  0.46166362,  0.47132551,  0.48112825,  0.49106545,
+        0.50113048,  0.51131639,  0.52161595,  0.53202168,  0.54252581,
+        0.55312033,  0.56379697,  0.57454721,  0.58536232,  0.59623332,
+        0.60715103,  0.61810606,  0.62908884,  0.64008959,  0.65109838,
+        0.66210512,  0.67309958,  0.68407136,  0.69500998,  0.70590484,
+        0.71674524,  0.7275204 ,  0.73821948,  0.74883161,  0.75934584,
+        0.76975124,  0.78003687,  0.79019179,  0.80020509,  0.81006592,
+        0.81976349,  0.82928706,  0.83862603,  0.84776989,  0.85670824,
+        0.86543087,  0.87392769,  0.88218883,  0.8902046 ,  0.89796551,
+        0.90546232,  0.91268605,  0.91962797,  0.92627962,  0.93263287,
+        0.93867988,  0.94441315,  0.94982552,  0.95491021,  0.95966079,
+        0.96407124,  0.96813594,  0.97184967,  0.97520769,  0.97820564,
+        0.98083967,  0.98310638,  0.98500283,  0.98652659,  0.98767574,
+        0.98844883,  0.98884498,  0.98886377,  0.98850537,  0.98777045,
+        0.98666024,  0.98517652,  0.98332159,  0.98109835,  0.97851023,
+        0.9755612 ,  0.97225582,  0.9685992 ,  0.96459698,  0.96025538,
+        0.95558116,  0.95058161,  0.94526459,  0.93963846,  0.93371212,
+        0.92749498,  0.92099698,  0.91422853,  0.90720053,  0.89992437,
+        0.89241189,  0.88467538,  0.87672756,  0.86858155,  0.86025091,
+        0.85174954,  0.84309173,  0.8342921 ,  0.8253656 ,  0.81632747,
+        0.80719325,  0.79797873,  0.78869994,  0.7793731 ,  0.77001465,
+        0.76064116,  0.75126936,  0.74191609,  0.73259824,  0.7233328 ,
+        0.71413676,  0.70502712,  0.69602085,  0.68713487,  0.678386  ,
+        0.66979095,  0.6613663 ,  0.65312845,  0.64509359,  0.63727769,
+        0.62969646,  0.6223653 ,  0.61529933,  0.60851328,  0.60202154,
+        0.59583809,  0.58997647,  0.58444976,  0.57927057,  0.574451  ,
+        0.5700026 ,  0.56593638,  0.56226276,  0.55899154,  0.55613191,
+        0.5536924 ,  0.55168088,  0.55010452,  0.54896977,  0.5482824 ,
+        0.54804739,  0.54826898,  0.54895066,  0.5500951 ,  0.55170422,
+        0.5537791 ,  0.55632002,  0.55932646,  0.56279704,  0.56672959,
+        0.57112109,  0.57596767,  0.58126467,  0.58700657,  0.59318702,
+        0.59979888,  0.60683417,  0.61428411,  0.62213911,  0.63038884,
+        0.63902214,  0.64802713,  0.65739119,  0.66710095,  0.67714237,
+        0.68750069,  0.69816052,  0.70910582,  0.72031994,  0.73178563,
+        0.74348511,  0.75540005,  0.76751163,  0.77980056,  0.79224712,
+        0.80483118,  0.81753226,  0.83032956,  0.84320195,  0.85612808,
+        0.86908639]),
+array([ 0.03921569,  0.14755333,  0.15484709,  0.15910372,  0.16221813,
+        0.164691  ,  0.16675074,  0.16852161,  0.17007905,  0.17147245,
+        0.17273603,  0.17389454,  0.17496647,  0.17596607,  0.17690456,
+        0.17779096,  0.17863263,  0.1794357 ,  0.1802053 ,  0.18094581,
+        0.18166101,  0.18235416,  0.18302812,  0.18368543,  0.18432833,
+        0.18495885,  0.18557879,  0.1861898 ,  0.1867934 ,  0.18739095,
+        0.18798372,  0.18857288,  0.18915953,  0.18974468,  0.19032928,
+        0.19091421,  0.19150034,  0.19208844,  0.19267928,  0.19327356,
+        0.19387199,  0.1944752 ,  0.19508383,  0.19569847,  0.19631971,
+        0.1969481 ,  0.19758419,  0.19822848,  0.1988815 ,  0.19954371,
+        0.20021562,  0.20089767,  0.20159031,  0.202294  ,  0.20300915,
+        0.2037362 ,  0.20447555,  0.20522761,  0.20599277,  0.20677142,
+        0.20756395,  0.20837073,  0.20919213,  0.21002852,  0.21088026,
+        0.21174769,  0.21263118,  0.21353106,  0.21444767,  0.21538136,
+        0.21633245,  0.21730128,  0.21828817,  0.21929344,  0.22031742,
+        0.22136043,  0.22242277,  0.22350476,  0.22460671,  0.22572894,
+        0.22687174,  0.22803542,  0.22922029,  0.23042665,  0.2316548 ,
+        0.23290505,  0.23417769,  0.23547304,  0.23679141,  0.23813309,
+        0.2394984 ,  0.24088767,  0.24230121,  0.24373936,  0.24520245,
+        0.24669084,  0.2482049 ,  0.24974502,  0.25131159,  0.25290506,
+        0.25452588,  0.25617456,  0.25785162,  0.25955767,  0.26129335,
+        0.26305936,  0.26485651,  0.26668567,  0.26854783,  0.27044409,
+        0.27237568,  0.27434399,  0.2763506 ,  0.27839725,  0.28048592,
+        0.28261885,  0.28479853,  0.28702776,  0.28930969,  0.29164781,
+        0.29404606,  0.29650878,  0.29904082,  0.30164751,  0.30433477,
+        0.30710909,  0.3099776 ,  0.31294808,  0.31602901,  0.31922957,
+        0.3225597 ,  0.32603009,  0.32965219,  0.33343823,  0.33740118,
+        0.34155475,  0.34591336,  0.35049209,  0.3553066 ,  0.36037309,
+        0.36570818,  0.37132881,  0.37725211,  0.38349527,  0.39007533,
+        0.39700904,  0.40431267,  0.41200173,  0.42009082,  0.42859331,
+        0.43752115,  0.44688456,  0.45669178,  0.46694881,  0.47765913,
+        0.48882341,  0.50043933,  0.51250128,  0.52500019,  0.53792329,
+        0.55125402,  0.56497186,  0.57905222,  0.59346649,  0.60818194,
+        0.62316185,  0.6383656 ,  0.65374881,  0.66926358,  0.68485877,
+        0.70048031,  0.71607158,  0.73157387,  0.7469268 ,  0.76206891,
+        0.77693813,  0.79147243,  0.80561039,  0.81929181,  0.83245833,
+        0.84505406,  0.85702617,  0.86832547,  0.87890699,  0.88873043,
+        0.89776066,  0.90596815,  0.91332926,  0.91982658,  0.92544909,
+        0.93019232,  0.93405839,  0.937056  ,  0.93920033,  0.94051286,
+        0.94102111,  0.94075835,  0.93976317,  0.93807909,  0.93575405,
+        0.93283987,  0.92939168,  0.92546733,  0.92112679,  0.91643153,
+        0.91144386,  0.9062264 ,  0.90084141,  0.89535028,  0.88981297,
+        0.88428753,  0.87882965,  0.87349223,  0.86832508,  0.86337457,
+        0.85868342,  0.8542905 ,  0.85023073,  0.84653492,  0.84322986,
+        0.84033823,  0.83787874,  0.83586622,  0.83431172,  0.83322277,
+        0.83260351,  0.83245497,  0.83277526,  0.83355988,  0.83480196,
+        0.83649253,  0.83862079,  0.84117439,  0.84413967,  0.84750191,
+        0.8512456 ,  0.85535461,  0.85981245,  0.86460243,  0.86970782,
+        0.87511204,  0.88079878,  0.88675211,  0.89295658,  0.89939731,
+        0.90606008,  0.91293132,  0.91999822,  0.92724869,  0.93467142,
+        0.94225589,  0.94999229,  0.9578716 ,  0.96588553,  0.97402646,
+        0.98228749]),
+array([ 1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,
+        1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.,  1.]),
+   )
+


--- a/yt/visualization/image_writer.py	Mon Jun 06 23:09:29 2011 -0700
+++ b/yt/visualization/image_writer.py	Tue Jun 07 16:00:46 2011 -0700
@@ -291,7 +291,8 @@
     return mapped.copy("C")
 
 def strip_colormap_data(fn = "color_map_data.py",
-            cmaps = ("jet", "algae", "hot", "gist_stern", "RdBu")):
+            cmaps = ("jet", "algae", "hot", "gist_stern", "RdBu",
+                     "kamae")):
     import pprint
     import color_maps as rcm
     f = open(fn, "w")


--- a/yt/visualization/volume_rendering/camera.py	Mon Jun 06 23:09:29 2011 -0700
+++ b/yt/visualization/volume_rendering/camera.py	Tue Jun 07 16:00:46 2011 -0700
@@ -497,7 +497,7 @@
         --------
 
         >>> for i, snapshot in enumerate(cam.rotation(na.pi, 10)):
-        ...     iw.write_bitmap(snapshot, "rotation_%04i.png" % i)
+        ...     iw.write_bitmap(snapshot, 'rotation_%04i.png' % i)
         """
 
         dtheta = (1.0*theta)/n_steps

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list