[yt-svn] commit/yt: xarthisius: Merged in qobilidop/yt (pull request #1962)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Feb 24 15:08:15 PST 2016
1 new commit in yt:
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