# HG changeset patch # User Matthew Turk # Date 1283488108 25200 # Branch yt # Node ID e8db4ba02229ee13a122f1ddf096fd62e4ab64b2 # Parent d134c2c665ec091a4af1f69d5843016781a656df Fixes for RAMSES and updating setup.py for enzo_test entry point diff -r d134c2c665ec091a4af1f69d5843016781a656df -r e8db4ba02229ee13a122f1ddf096fd62e4ab64b2 setup.py --- a/setup.py Thu Sep 02 19:41:12 2010 -0700 +++ b/setup.py Thu Sep 02 21:28:28 2010 -0700 @@ -56,7 +56,7 @@ 'pdf' : ['pypdf']}, entry_points = { 'console_scripts' : [ 'yt = yt.utilities.command_line:run_main', - 'enzo_test = yt.extensions.enzo_test:run_main', + 'enzo_test = yt.utilities.answer_testing.runner:run_main', ]}, author="Matthew J. Turk", author_email="matthewturk@gmail.com", diff -r d134c2c665ec091a4af1f69d5843016781a656df -r e8db4ba02229ee13a122f1ddf096fd62e4ab64b2 yt/frontends/ramses/data_structures.py --- a/yt/frontends/ramses/data_structures.py Thu Sep 02 19:41:12 2010 -0700 +++ b/yt/frontends/ramses/data_structures.py Thu Sep 02 21:28:28 2010 -0700 @@ -23,6 +23,10 @@ along with this program. If not, see . """ +import numpy as na +import stat +import weakref + from yt.funcs import * from yt.data_objects.grid_patch import \ AMRGridPatch @@ -32,6 +36,8 @@ StaticOutput import _ramses_reader from .fields import RAMSESFieldContainer +from yt.utilities.definitions import \ + mpc_conversion from yt.utilities.io_handler import \ io_registry @@ -351,12 +357,10 @@ self.conversion_factors = defaultdict(lambda: 1.0) self.time_units['1'] = 1 self.units['1'] = 1.0 - self.units['unitary'] = 1.0 / (self["DomainRightEdge"] - self["DomainLeftEdge"]).max() + self.units['unitary'] = 1.0 / (self.domain_right_edge - self.domain_left_edge).max() seconds = 1 #self["Time"] self.time_units['years'] = seconds / (365*3600*24.0) self.time_units['days'] = seconds / (3600*24.0) - for key in yt2orionFieldsDict: - self.conversion_factors[key] = 1.0 def _setup_nounits_units(self): z = 0 @@ -369,7 +373,7 @@ def _parse_parameter_file(self): self.unique_identifier = \ - int(os.stat(self.parameter_filename)[ST_CTIME]) + int(os.stat(self.parameter_filename)[stat.ST_CTIME]) self.ramses_tree = _ramses_reader.RAMSES_tree_proxy(self.parameter_filename) rheader = self.ramses_tree.get_file_info() self.parameters.update(rheader) diff -r d134c2c665ec091a4af1f69d5843016781a656df -r e8db4ba02229ee13a122f1ddf096fd62e4ab64b2 yt/frontends/ramses/io.py --- a/yt/frontends/ramses/io.py Thu Sep 02 19:41:12 2010 -0700 +++ b/yt/frontends/ramses/io.py Thu Sep 02 21:28:28 2010 -0700 @@ -23,6 +23,8 @@ along with this program. If not, see . """ +import numpy as na + from yt.utilities.io_handler import \ BaseIOHandler