[yt-svn] commit/yt-3.0: 3 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Oct 2 14:45:11 PDT 2013


3 new commits in yt-3.0:

https://bitbucket.org/yt_analysis/yt-3.0/commits/0b58dcbdea6f/
Changeset:   0b58dcbdea6f
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-10-01 22:47:31
Summary:     Updating a few things to the 3.0 API.
Affected #:  3 files

diff -r 59d6af464edc0cb7d6322e930999bf715e54766f -r 0b58dcbdea6f82faf1b9097b1d03a189f0a2fdc8 yt/analysis_modules/halo_profiler/multi_halo_profiler.py
--- a/yt/analysis_modules/halo_profiler/multi_halo_profiler.py
+++ b/yt/analysis_modules/halo_profiler/multi_halo_profiler.py
@@ -637,7 +637,7 @@
         """
 
         sphere = self.pf.h.sphere(halo['center'], halo['r_max']/self.pf.units['mpc'])
-        if len(sphere._grids) == 0: return None
+        #if len(sphere._grids) == 0: return None
         new_sphere = False
 
         if self.recenter:
@@ -819,8 +819,8 @@
                 for hp in self.projection_fields:
                     projections.append(self.pf.h.proj(hp['field'], w,
                                                       weight_field=hp['weight_field'],
-                                                      source=region, center=halo['center'],
-                                                      serialize=False))
+                                                      data_source=region,
+                                                      center=halo['center']))
 
                 # Set x and y limits, shift image if it overlaps domain boundary.
                 if need_per:

diff -r 59d6af464edc0cb7d6322e930999bf715e54766f -r 0b58dcbdea6f82faf1b9097b1d03a189f0a2fdc8 yt/data_objects/construction_data_containers.py
--- a/yt/data_objects/construction_data_containers.py
+++ b/yt/data_objects/construction_data_containers.py
@@ -213,7 +213,7 @@
     _key_fields = YTSelectionContainer2D._key_fields + ['weight_field']
     _type_name = "proj"
     _con_args = ('axis', 'weight_field')
-    _container_fields = ('px', 'py', 'pdx', 'pdy')
+    _container_fields = ('px', 'py', 'pdx', 'pdy', 'weight_field')
     def __init__(self, field, axis, weight_field = None,
                  center = None, pf = None, data_source=None, 
                  style = "integrate", field_parameters = None):

diff -r 59d6af464edc0cb7d6322e930999bf715e54766f -r 0b58dcbdea6f82faf1b9097b1d03a189f0a2fdc8 yt/visualization/plot_collection.py
--- a/yt/visualization/plot_collection.py
+++ b/yt/visualization/plot_collection.py
@@ -416,8 +416,8 @@
             coord = center[axis]
         if obj is None:
             if field_parameters is None: field_parameters = {}
-            obj = self.pf.hierarchy.slice(axis, coord, field,
-                            center=center, **field_parameters)
+            obj = self.pf.hierarchy.slice(axis, coord, center=center,
+                            field_parameters = field_parameters)
         p = self._add_plot(PCSlicePlot(
                          obj, field, use_colorbar=use_colorbar,
                          axes=axes, figure=figure,
@@ -577,8 +577,8 @@
             center = self.c
         if not obj:
             if field_parameters is None: field_parameters = {}
-            cp = self.pf.hierarchy.cutting(normal, center, field,
-                    **field_parameters)
+            cp = self.pf.hierarchy.cutting(normal, center, 
+                    field_parameters = field_parameters)
         else:
             cp = obj
         p = self._add_plot(CuttingPlanePlot(cp, field,
@@ -677,7 +677,7 @@
         if obj is None:
             obj = self.pf.hierarchy.proj(field, axis, weight_field,
                                          source = data_source, center=center,
-                                         **field_parameters)
+                                         field_parameters = field_parameters)
         p = self._add_plot(PCProjectionPlot(obj, field,
                          use_colorbar=use_colorbar, axes=axes, figure=figure,
                          size=fig_size, periodic=periodic))
@@ -770,8 +770,8 @@
         RE[axis] += thickness/2.0
         region = self.pf.h.region(center, LE, RE)
         obj = self.pf.hierarchy.proj(field, axis, weight_field,
-                                     source = region, center=center,
-                                     **field_parameters)
+                                     data_source = region, center=center,
+                                     field_parameters = field_parameters)
         p = self._add_plot(PCProjectionPlot(obj, field,
                          use_colorbar=use_colorbar, axes=axes, figure=figure,
                          size=fig_size, periodic=periodic))
@@ -1326,8 +1326,8 @@
         axis = fix_axis(axis)
         if field_parameters is None: field_parameters = {}
         if plot_options is None: plot_options = {}
-        data_source = self.pf.h.ortho_ray(axis, coords, field,
-                        **field_parameters)
+        data_source = self.pf.h.ortho_ray(axis, coords, 
+                        field_parameters = field_parameters)
         p = self._add_plot(LineQueryPlot(data_source,
                 [axis_names[axis], field], self._get_new_id(),
                 figure=figure, axes=axes, plot_options=plot_options))
@@ -1386,8 +1386,8 @@
         """
         if field_parameters is None: field_parameters = {}
         if plot_options is None: plot_options = {}
-        data_source = self.pf.h.ray(start_point, end_point, field,
-                                    **field_parameters)
+        data_source = self.pf.h.ray(start_point, end_point, 
+                                    field_parameters = field_parameters)
         p = self._add_plot(LineQueryPlot(data_source,
                 ['t', field], self._get_new_id(),
                 figure=figure, axes=axes, plot_options=plot_options))


https://bitbucket.org/yt_analysis/yt-3.0/commits/a4db27422162/
Changeset:   a4db27422162
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-10-01 23:25:04
Summary:     A few more 3.0 API changes.
Affected #:  2 files

diff -r 0b58dcbdea6f82faf1b9097b1d03a189f0a2fdc8 -r a4db27422162324613f84db526812aafccf86538 yt/visualization/plot_collection.py
--- a/yt/visualization/plot_collection.py
+++ b/yt/visualization/plot_collection.py
@@ -676,7 +676,7 @@
             center = self.c
         if obj is None:
             obj = self.pf.hierarchy.proj(field, axis, weight_field,
-                                         source = data_source, center=center,
+                                         data_source = data_source, center=center,
                                          field_parameters = field_parameters)
         p = self._add_plot(PCProjectionPlot(obj, field,
                          use_colorbar=use_colorbar, axes=axes, figure=figure,

diff -r 0b58dcbdea6f82faf1b9097b1d03a189f0a2fdc8 -r a4db27422162324613f84db526812aafccf86538 yt/visualization/plot_types.py
--- a/yt/visualization/plot_types.py
+++ b/yt/visualization/plot_types.py
@@ -488,7 +488,7 @@
         if self.datalabel is None:
             field_name = self.axis_names["Z"]
             proj = "Proj" in self._type_name and \
-                   self.data._weight is None
+                   self.data.weight_field is None
             data_label = self.pf.field_info[field_name].get_label(proj)
         else: data_label = self.datalabel
         if self.colorbar != None:
@@ -576,8 +576,8 @@
 
     def _generate_prefix(self, prefix):
         VMPlot._generate_prefix(self, prefix)
-        if self.data._weight is not None:
-            self.prefix += "_%s" % (self.data._weight)
+        if self.data.weight_field is not None:
+            self.prefix += "_%s" % (self.data.weight_field)
 
 class PCProjectionPlotNaturalNeighbor(NNVMPlot, PCProjectionPlot):
     _type_name = "NNProj"


https://bitbucket.org/yt_analysis/yt-3.0/commits/92d56a1fd5de/
Changeset:   92d56a1fd5de
Branch:      yt-3.0
User:        MatthewTurk
Date:        2013-10-02 23:45:07
Summary:     Merged in MatthewTurk/yt-3.0 (pull request #108)

Update a handful of items to 3.0 API
Affected #:  4 files

diff -r e1fc1af0d61c57213e7f072f6971eb974707e226 -r 92d56a1fd5dec9a365da0b0cd0d3f4480f3a7d55 yt/analysis_modules/halo_profiler/multi_halo_profiler.py
--- a/yt/analysis_modules/halo_profiler/multi_halo_profiler.py
+++ b/yt/analysis_modules/halo_profiler/multi_halo_profiler.py
@@ -637,7 +637,7 @@
         """
 
         sphere = self.pf.h.sphere(halo['center'], halo['r_max']/self.pf.units['mpc'])
-        if len(sphere._grids) == 0: return None
+        #if len(sphere._grids) == 0: return None
         new_sphere = False
 
         if self.recenter:
@@ -819,8 +819,8 @@
                 for hp in self.projection_fields:
                     projections.append(self.pf.h.proj(hp['field'], w,
                                                       weight_field=hp['weight_field'],
-                                                      source=region, center=halo['center'],
-                                                      serialize=False))
+                                                      data_source=region,
+                                                      center=halo['center']))
 
                 # Set x and y limits, shift image if it overlaps domain boundary.
                 if need_per:

diff -r e1fc1af0d61c57213e7f072f6971eb974707e226 -r 92d56a1fd5dec9a365da0b0cd0d3f4480f3a7d55 yt/data_objects/construction_data_containers.py
--- a/yt/data_objects/construction_data_containers.py
+++ b/yt/data_objects/construction_data_containers.py
@@ -213,7 +213,7 @@
     _key_fields = YTSelectionContainer2D._key_fields + ['weight_field']
     _type_name = "proj"
     _con_args = ('axis', 'weight_field')
-    _container_fields = ('px', 'py', 'pdx', 'pdy')
+    _container_fields = ('px', 'py', 'pdx', 'pdy', 'weight_field')
     def __init__(self, field, axis, weight_field = None,
                  center = None, pf = None, data_source=None, 
                  style = "integrate", field_parameters = None):

diff -r e1fc1af0d61c57213e7f072f6971eb974707e226 -r 92d56a1fd5dec9a365da0b0cd0d3f4480f3a7d55 yt/visualization/plot_collection.py
--- a/yt/visualization/plot_collection.py
+++ b/yt/visualization/plot_collection.py
@@ -416,8 +416,8 @@
             coord = center[axis]
         if obj is None:
             if field_parameters is None: field_parameters = {}
-            obj = self.pf.hierarchy.slice(axis, coord, field,
-                            center=center, **field_parameters)
+            obj = self.pf.hierarchy.slice(axis, coord, center=center,
+                            field_parameters = field_parameters)
         p = self._add_plot(PCSlicePlot(
                          obj, field, use_colorbar=use_colorbar,
                          axes=axes, figure=figure,
@@ -577,8 +577,8 @@
             center = self.c
         if not obj:
             if field_parameters is None: field_parameters = {}
-            cp = self.pf.hierarchy.cutting(normal, center, field,
-                    **field_parameters)
+            cp = self.pf.hierarchy.cutting(normal, center, 
+                    field_parameters = field_parameters)
         else:
             cp = obj
         p = self._add_plot(CuttingPlanePlot(cp, field,
@@ -676,8 +676,8 @@
             center = self.c
         if obj is None:
             obj = self.pf.hierarchy.proj(field, axis, weight_field,
-                                         source = data_source, center=center,
-                                         **field_parameters)
+                                         data_source = data_source, center=center,
+                                         field_parameters = field_parameters)
         p = self._add_plot(PCProjectionPlot(obj, field,
                          use_colorbar=use_colorbar, axes=axes, figure=figure,
                          size=fig_size, periodic=periodic))
@@ -770,8 +770,8 @@
         RE[axis] += thickness/2.0
         region = self.pf.h.region(center, LE, RE)
         obj = self.pf.hierarchy.proj(field, axis, weight_field,
-                                     source = region, center=center,
-                                     **field_parameters)
+                                     data_source = region, center=center,
+                                     field_parameters = field_parameters)
         p = self._add_plot(PCProjectionPlot(obj, field,
                          use_colorbar=use_colorbar, axes=axes, figure=figure,
                          size=fig_size, periodic=periodic))
@@ -1326,8 +1326,8 @@
         axis = fix_axis(axis)
         if field_parameters is None: field_parameters = {}
         if plot_options is None: plot_options = {}
-        data_source = self.pf.h.ortho_ray(axis, coords, field,
-                        **field_parameters)
+        data_source = self.pf.h.ortho_ray(axis, coords, 
+                        field_parameters = field_parameters)
         p = self._add_plot(LineQueryPlot(data_source,
                 [axis_names[axis], field], self._get_new_id(),
                 figure=figure, axes=axes, plot_options=plot_options))
@@ -1386,8 +1386,8 @@
         """
         if field_parameters is None: field_parameters = {}
         if plot_options is None: plot_options = {}
-        data_source = self.pf.h.ray(start_point, end_point, field,
-                                    **field_parameters)
+        data_source = self.pf.h.ray(start_point, end_point, 
+                                    field_parameters = field_parameters)
         p = self._add_plot(LineQueryPlot(data_source,
                 ['t', field], self._get_new_id(),
                 figure=figure, axes=axes, plot_options=plot_options))

diff -r e1fc1af0d61c57213e7f072f6971eb974707e226 -r 92d56a1fd5dec9a365da0b0cd0d3f4480f3a7d55 yt/visualization/plot_types.py
--- a/yt/visualization/plot_types.py
+++ b/yt/visualization/plot_types.py
@@ -488,7 +488,7 @@
         if self.datalabel is None:
             field_name = self.axis_names["Z"]
             proj = "Proj" in self._type_name and \
-                   self.data._weight is None
+                   self.data.weight_field is None
             data_label = self.pf.field_info[field_name].get_label(proj)
         else: data_label = self.datalabel
         if self.colorbar != None:
@@ -576,8 +576,8 @@
 
     def _generate_prefix(self, prefix):
         VMPlot._generate_prefix(self, prefix)
-        if self.data._weight is not None:
-            self.prefix += "_%s" % (self.data._weight)
+        if self.data.weight_field is not None:
+            self.prefix += "_%s" % (self.data.weight_field)
 
 class PCProjectionPlotNaturalNeighbor(NNVMPlot, PCProjectionPlot):
     _type_name = "NNProj"

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

--

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