[Yt-svn] yt-commit r1704 - trunk/yt/lagos
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Tue Apr 27 21:31:02 PDT 2010
Author: mturk
Date: Tue Apr 27 21:31:01 2010
New Revision: 1704
URL: http://yt.enzotools.org/changeset/1704
Log:
Fixing projection coordinates not having DomainLeftEdge offset.
Modified:
trunk/yt/lagos/BaseDataTypes.py
Modified: trunk/yt/lagos/BaseDataTypes.py
==============================================================================
--- trunk/yt/lagos/BaseDataTypes.py (original)
+++ trunk/yt/lagos/BaseDataTypes.py Tue Apr 27 21:31:01 2010
@@ -1400,8 +1400,10 @@
# We now convert to half-widths and center-points
data = {}
data['pdx'] = dxs
- data['px'] = (coord_data[0,:]+0.5) * data['pdx']
- data['py'] = (coord_data[1,:]+0.5) * data['pdx']
+ ox = self.pf["DomainLeftEdge"][x_dict[self.axis]]
+ oy = self.pf["DomainLeftEdge"][y_dict[self.axis]]
+ data['px'] = (coord_data[0,:]+0.5) * data['pdx'] + ox
+ data['py'] = (coord_data[1,:]+0.5) * data['pdx'] + oy
data['weight_field'] = coord_data[3,:].copy()
del coord_data
data['pdx'] *= 0.5
More information about the yt-svn
mailing list