[Yt-svn] commit/yt: MatthewTurk: Fix for ensuring grids in contour extraction have the correct field parameters.

Bitbucket commits-noreply at bitbucket.org
Mon Oct 24 12:28:02 PDT 2011


1 new commit in yt:


https://bitbucket.org/yt_analysis/yt/changeset/7da720c9a9ea/
changeset:   7da720c9a9ea
branch:      yt
user:        MatthewTurk
date:        2011-10-24 21:27:46
summary:     Fix for ensuring grids in contour extraction have the correct field parameters.
affected #:  1 file

diff -r 0b9dfdb3b8e8d1002f4d9a2653c2c87fe7b71e0a -r 7da720c9a9ea0d5fc76ef1e3aec1c41e343bf76d yt/analysis_modules/level_sets/contour_finder.py
--- a/yt/analysis_modules/level_sets/contour_finder.py
+++ b/yt/analysis_modules/level_sets/contour_finder.py
@@ -77,8 +77,11 @@
         pbar.update(gi+1)
         cm = data_source._get_cut_mask(grid)
         if cm is True: cm = na.ones(grid.ActiveDimensions, dtype='bool')
+        old_field_parameters = grid.field_parameters
+        grid.field_parameters = data_source.field_parameters
         local_ind = na.where( (grid[field] > min_val)
                             & (grid[field] < max_val) & cm )
+        grid.field_parameters = old_field_parameters
         if local_ind[0].size == 0: continue
         kk = na.arange(cur_max_id, cur_max_id-local_ind[0].size, -1)
         grid["tempContours"] = na.ones(grid.ActiveDimensions, dtype='int64') * -1

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