[yt-svn] commit/yt: atmyers: Merged in ngoldbaum/yt (pull request #2156)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed May 4 11:09:08 PDT 2016


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/02f769322a52/
Changeset:   02f769322a52
Branch:      yt
User:        atmyers
Date:        2016-05-04 18:09:01+00:00
Summary:     Merged in ngoldbaum/yt (pull request #2156)

set the field type correctly for fields added as particle fields. Closes #1163
Affected #:  1 file

diff -r 21cedef7066b43a139336890244be2c47f5af0fa -r 02f769322a522e75ad581a23e907d4af0339a086 yt/fields/local_fields.py
--- a/yt/fields/local_fields.py
+++ b/yt/fields/local_fields.py
@@ -25,7 +25,10 @@
 class LocalFieldInfoContainer(FieldInfoContainer):
     def add_field(self, name, function=None, **kwargs):
         if not isinstance(name, tuple):
-            name = ('gas', name)
+            if kwargs.setdefault('particle_type', False):
+                name = ('all', name)
+            else:
+                name = ('gas', name)
         override = kwargs.get("force_override", False)
         # Handle the case where the field has already been added.
         if not override and name in self:

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-svn-spacepope.org/attachments/20160504/1f95a9e4/attachment.html>


More information about the yt-svn mailing list