[Yt-svn] yt: Fixes for tiger, specifically the dtypes of the grids and a ...

hg at spacepope.org hg at spacepope.org
Thu Apr 22 15:43:31 PDT 2010


hg Repository: yt
details:   yt/rev/b814d145a841
changeset: 1589:b814d145a841
user:      Matthew Turk <matthewturk at gmail.com>
date:
Thu Apr 22 15:43:19 2010 -0700
description:
Fixes for tiger, specifically the dtypes of the grids and a few more parameters
added.

diffstat:

 yt/lagos/BaseGridType.py     |  6 +++---
 yt/lagos/DataReadingFuncs.py |  4 ++--
 yt/lagos/OutputTypes.py      |  2 ++
 3 files changed, 7 insertions(+), 5 deletions(-)

diffs (54 lines):

diff -r f5829f145bcd -r b814d145a841 yt/lagos/BaseGridType.py
--- a/yt/lagos/BaseGridType.py	Thu Apr 22 15:29:46 2010 -0700
+++ b/yt/lagos/BaseGridType.py	Thu Apr 22 15:43:19 2010 -0700
@@ -679,9 +679,9 @@
         self.RightEdge = right_edge
         self.Level = 0
         self.NumberOfParticles = 0
-        self.left_dims = left_dims
-        self.right_dims = right_dims
-        self.ActiveDimensions = na.array(right_dims) - left_dims
+        self.left_dims = na.array(left_dims, dtype='int32')
+        self.right_dims = na.array(right_dims, dtype='int32')
+        self.ActiveDimensions = self.right_dims - self.left_dims
 
         self.Parent = None
         self.Children = []
diff -r f5829f145bcd -r b814d145a841 yt/lagos/DataReadingFuncs.py
--- a/yt/lagos/DataReadingFuncs.py	Thu Apr 22 15:29:46 2010 -0700
+++ b/yt/lagos/DataReadingFuncs.py	Thu Apr 22 15:43:19 2010 -0700
@@ -487,7 +487,7 @@
         LD = na.array(grid.left_dims, dtype='int64')
         SS = na.array(grid.ActiveDimensions, dtype='int64')
         RS = na.array(grid.pf.root_size, dtype='int64')
-        data = au.read_tiger_section(fn, LD, SS, RS)
+        data = au.read_tiger_section(fn, LD, SS, RS).astype("float64")
         return data
 
     def _read_data_slice(self, grid, field, axis, coord):
@@ -497,5 +497,5 @@
         RS = na.array(grid.pf.root_size, dtype='int64').copy()
         LD[axis] += coord
         SS[axis] = 1
-        data = au.read_tiger_section(fn, LD, SS, RS)
+        data = au.read_tiger_section(fn, LD, SS, RS).astype("float64")
         return data
diff -r f5829f145bcd -r b814d145a841 yt/lagos/OutputTypes.py
--- a/yt/lagos/OutputTypes.py	Thu Apr 22 15:29:46 2010 -0700
+++ b/yt/lagos/OutputTypes.py	Thu Apr 22 15:43:19 2010 -0700
@@ -754,6 +754,7 @@
         self.parameters['TopGridDimensions'] = root_size
         self.parameters['TopGridRank'] = 3
         self.units["Density"] = 1.0
+        self.parameters['RefineBy'] = 2
 
     def _set_units(self):
         self.parameters["DomainLeftEdge"] = na.zeros(3, dtype='float64')
@@ -762,6 +763,7 @@
         self.time_units = {}
         self.time_units['1'] = 1
         self.units['1'] = 1.0
+        self.units['cm'] = 1.0 # This is just plain false
         self.units['unitary'] = 1.0 / (self["DomainRightEdge"] - self["DomainLeftEdge"]).max()
 
     def _parse_parameter_file(self):



More information about the yt-svn mailing list