[Yt-svn] commit/yt: MatthewTurk: This change ensures that field parameters from a parent *all* get passed on to
Bitbucket
commits-noreply at bitbucket.org
Thu Oct 20 05:21:11 PDT 2011
1 new changeset in yt:
http://bitbucket.org/yt_analysis/yt/changeset/5a39ef71743a/
changeset: 5a39ef71743a
branch: yt
user: MatthewTurk
date: 2011-10-20 14:17:55
summary: This change ensures that field parameters from a parent *all* get passed on to
the child Extracted Region, not just center.
affected #: 1 file (-1 bytes)
--- a/yt/data_objects/data_containers.py Wed Oct 19 15:21:15 2011 -0400
+++ b/yt/data_objects/data_containers.py Thu Oct 20 08:17:55 2011 -0400
@@ -2422,7 +2422,8 @@
Return an ExtractedRegion where the points contained in it are defined
as the points in `this` data object with the given *indices*.
"""
- return ExtractedRegionBase(self, indices)
+ fp = self.field_parameters.copy()
+ return ExtractedRegionBase(self, indices, **fp)
def __get_quantities(self):
if self.__quantities is None:
@@ -2651,7 +2652,8 @@
_type_name = "extracted_region"
_con_args = ('_base_region', '_indices')
def __init__(self, base_region, indices, force_refresh=True, **kwargs):
- cen = base_region.get_field_parameter("center")
+ cen = kwargs.pop("center", None)
+ if cen is None: cen = base_region.get_field_parameter("center")
AMR3DData.__init__(self, center=cen,
fields=None, pf=base_region.pf, **kwargs)
self._base_region = base_region # We don't weakly reference because
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