[yt-svn] commit/yt: 4 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Feb 24 15:08:16 PST 2016


4 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/394d47d81af7/
Changeset:   394d47d81af7
Branch:      yt
User:        qobilidop
Date:        2016-01-26 18:52:12+00:00
Summary:     pass nneighbors to the next level
Affected #:  1 file

diff -r cd0a29c8ed02c58096e6e0f3f6c7aaa6b8cf6dc3 -r 394d47d81af746cb2e2d5dd010f31d4461ce9c4d yt/fields/particle_fields.py
--- a/yt/fields/particle_fields.py
+++ b/yt/fields/particle_fields.py
@@ -796,7 +796,8 @@
                          method="volume_weighted",
                          create_octree=True,
                          index_fields=[smooth_cutoff],
-                         kernel_name=kernel_name)[0]
+                         kernel_name=kernel_name,
+                         **kwargs)[0]
         rv[np.isnan(rv)] = 0.0
         # Now some quick unit conversions.
         # This should be used when seeking a non-normalized value:


https://bitbucket.org/yt_analysis/yt/commits/16e267ae3a28/
Changeset:   16e267ae3a28
Branch:      yt
User:        qobilidop
Date:        2016-01-26 19:14:32+00:00
Summary:     change default value to make the parameter passing clearer
Affected #:  1 file

diff -r 394d47d81af746cb2e2d5dd010f31d4461ce9c4d -r 16e267ae3a28ad176d361c8810c95db039044206 yt/fields/particle_fields.py
--- a/yt/fields/particle_fields.py
+++ b/yt/fields/particle_fields.py
@@ -764,7 +764,7 @@
 
 def add_volume_weighted_smoothed_field(ptype, coord_name, mass_name,
         smoothing_length_name, density_name, smoothed_field, registry,
-        nneighbors = None, kernel_name = 'cubic'):
+        nneighbors = 64, kernel_name = 'cubic'):
     if kernel_name == 'cubic':
         field_name = ("deposit", "%s_smoothed_%s" % (ptype, smoothed_field))
     else:
@@ -785,9 +785,6 @@
         else:
             hsml = data[ptype, smoothing_length_name]
             hsml.convert_to_units("code_length")
-        kwargs = {}
-        if nneighbors:
-            kwargs['nneighbors'] = nneighbors
         # This is for applying cutoffs, similar to in the SPLASH paper.
         smooth_cutoff = data["index","cell_volume"]**(1./3)
         smooth_cutoff.convert_to_units("code_length")
@@ -796,8 +793,8 @@
                          method="volume_weighted",
                          create_octree=True,
                          index_fields=[smooth_cutoff],
-                         kernel_name=kernel_name,
-                         **kwargs)[0]
+                         nneighbors=nneighbors,
+                         kernel_name=kernel_name)[0]
         rv[np.isnan(rv)] = 0.0
         # Now some quick unit conversions.
         # This should be used when seeking a non-normalized value:


https://bitbucket.org/yt_analysis/yt/commits/0db5580d5b33/
Changeset:   0db5580d5b33
Branch:      yt
User:        qobilidop
Date:        2016-01-26 19:21:27+00:00
Summary:     reorder params to make easier comparison with the interface of OctreeSubset.smooth
Affected #:  1 file

diff -r 16e267ae3a28ad176d361c8810c95db039044206 -r 0db5580d5b33a10d0ea913cf9a14cff7b6d84236 yt/fields/particle_fields.py
--- a/yt/fields/particle_fields.py
+++ b/yt/fields/particle_fields.py
@@ -790,9 +790,9 @@
         smooth_cutoff.convert_to_units("code_length")
         # volume_weighted smooth operations return lists of length 1.
         rv = data.smooth(pos, [mass, hsml, dens, quan],
+                         index_fields=[smooth_cutoff],
                          method="volume_weighted",
                          create_octree=True,
-                         index_fields=[smooth_cutoff],
                          nneighbors=nneighbors,
                          kernel_name=kernel_name)[0]
         rv[np.isnan(rv)] = 0.0


https://bitbucket.org/yt_analysis/yt/commits/7130b7cef71f/
Changeset:   7130b7cef71f
Branch:      yt
User:        xarthisius
Date:        2016-02-24 23:08:09+00:00
Summary:     Merged in qobilidop/yt (pull request #1962)

Fix a parameter passing problem
Affected #:  1 file

diff -r 0d84f831f09afe85d40dbb220b4eda18202eb958 -r 7130b7cef71f9422cc6191b755e1bd5ca96fbaa0 yt/fields/particle_fields.py
--- a/yt/fields/particle_fields.py
+++ b/yt/fields/particle_fields.py
@@ -764,7 +764,7 @@
 
 def add_volume_weighted_smoothed_field(ptype, coord_name, mass_name,
         smoothing_length_name, density_name, smoothed_field, registry,
-        nneighbors = None, kernel_name = 'cubic'):
+        nneighbors = 64, kernel_name = 'cubic'):
     if kernel_name == 'cubic':
         field_name = ("deposit", "%s_smoothed_%s" % (ptype, smoothed_field))
     else:
@@ -785,17 +785,15 @@
         else:
             hsml = data[ptype, smoothing_length_name]
             hsml.convert_to_units("code_length")
-        kwargs = {}
-        if nneighbors:
-            kwargs['nneighbors'] = nneighbors
         # This is for applying cutoffs, similar to in the SPLASH paper.
         smooth_cutoff = data["index","cell_volume"]**(1./3)
         smooth_cutoff.convert_to_units("code_length")
         # volume_weighted smooth operations return lists of length 1.
         rv = data.smooth(pos, [mass, hsml, dens, quan],
+                         index_fields=[smooth_cutoff],
                          method="volume_weighted",
                          create_octree=True,
-                         index_fields=[smooth_cutoff],
+                         nneighbors=nneighbors,
                          kernel_name=kernel_name)[0]
         rv[np.isnan(rv)] = 0.0
         # Now some quick unit conversions.

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