[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Apr 16 11:07:49 PDT 2014
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/38551c5a364a/
Changeset: 38551c5a364a
Branch: yt-3.0
User: xarthisius
Date: 2014-04-16 10:39:26
Summary: Ensure that 'unitary' has a proper cgs_value. Fixes issue #829
Affected #: 2 files
diff -r 5acca4b24803da91accfcb8937aed96432fe7edd -r 38551c5a364addb0faae59f94b289007c26d1ee8 yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -290,7 +290,7 @@
self.create_field_info()
np.seterr(**oldsettings)
return self._instantiated_index
-
+
_index_proxy = None
@property
def h(self):
@@ -527,7 +527,7 @@
source = self.all_data()
max_val, maxi, mx, my, mz = \
source.quantities["MaxLocation"](field)
- mylog.info("Max Value is %0.5e at %0.16f %0.16f %0.16f",
+ mylog.info("Max Value is %0.5e at %0.16f %0.16f %0.16f",
max_val, mx, my, mz)
return max_val, np.array([mx, my, mz], dtype="float64")
@@ -628,7 +628,8 @@
DW = np.zeros(3)
else:
DW = self.arr(self.domain_right_edge - self.domain_left_edge, "code_length")
- self.unit_registry.add("unitary", float(DW.max()), DW.units.dimensions)
+ self.unit_registry.add("unitary", float(DW.max() * DW.units.cgs_value),
+ DW.units.dimensions)
_arr = None
@property
diff -r 5acca4b24803da91accfcb8937aed96432fe7edd -r 38551c5a364addb0faae59f94b289007c26d1ee8 yt/frontends/enzo/data_structures.py
--- a/yt/frontends/enzo/data_structures.py
+++ b/yt/frontends/enzo/data_structures.py
@@ -196,7 +196,7 @@
_preload_implemented = True
def __init__(self, pf, dataset_type):
-
+
self.dataset_type = dataset_type
if pf.file_style != None:
self._bn = pf.file_style
@@ -868,7 +868,8 @@
self.unit_registry.modify("code_time", self.time_unit)
self.unit_registry.modify("code_velocity", self.velocity_unit)
DW = self.arr(self.domain_right_edge - self.domain_left_edge, "code_length")
- self.unit_registry.add("unitary", float(DW.max()), DW.units.dimensions)
+ self.unit_registry.add("unitary", float(DW.max() * DW.units.cgs_value),
+ DW.units.dimensions)
def cosmology_get_units(self):
"""
@@ -984,8 +985,8 @@
size = os.stat(f.name).st_size
fullblocks, lastblock = divmod(size, blocksize)
- # The first(end of file) block will be short, since this leaves
- # the rest aligned on a blocksize boundary. This may be more
+ # The first(end of file) block will be short, since this leaves
+ # the rest aligned on a blocksize boundary. This may be more
# efficient than having the last (first in file) block be short
f.seek(-lastblock,2)
yield f.read(lastblock)
https://bitbucket.org/yt_analysis/yt/commits/8a31afd9169a/
Changeset: 8a31afd9169a
Branch: yt-3.0
User: ngoldbaum
Date: 2014-04-16 20:07:43
Summary: Merged in xarthisius/yt/yt-3.0 (pull request #825)
Ensure that 'unitary' has a proper cgs_value. Fixes issue #829
Affected #: 2 files
diff -r a1842ded9f19a5ef60f14da86d71770fe08a7388 -r 8a31afd9169a33f58551d35d75f0b5f3396d6fac yt/data_objects/static_output.py
--- a/yt/data_objects/static_output.py
+++ b/yt/data_objects/static_output.py
@@ -290,7 +290,7 @@
self.create_field_info()
np.seterr(**oldsettings)
return self._instantiated_index
-
+
_index_proxy = None
@property
def h(self):
@@ -527,7 +527,7 @@
source = self.all_data()
max_val, maxi, mx, my, mz = \
source.quantities["MaxLocation"](field)
- mylog.info("Max Value is %0.5e at %0.16f %0.16f %0.16f",
+ mylog.info("Max Value is %0.5e at %0.16f %0.16f %0.16f",
max_val, mx, my, mz)
return max_val, np.array([mx, my, mz], dtype="float64")
@@ -628,7 +628,8 @@
DW = np.zeros(3)
else:
DW = self.arr(self.domain_right_edge - self.domain_left_edge, "code_length")
- self.unit_registry.add("unitary", float(DW.max()), DW.units.dimensions)
+ self.unit_registry.add("unitary", float(DW.max() * DW.units.cgs_value),
+ DW.units.dimensions)
_arr = None
@property
diff -r a1842ded9f19a5ef60f14da86d71770fe08a7388 -r 8a31afd9169a33f58551d35d75f0b5f3396d6fac yt/frontends/enzo/data_structures.py
--- a/yt/frontends/enzo/data_structures.py
+++ b/yt/frontends/enzo/data_structures.py
@@ -196,7 +196,7 @@
_preload_implemented = True
def __init__(self, pf, dataset_type):
-
+
self.dataset_type = dataset_type
if pf.file_style != None:
self._bn = pf.file_style
@@ -868,7 +868,8 @@
self.unit_registry.modify("code_time", self.time_unit)
self.unit_registry.modify("code_velocity", self.velocity_unit)
DW = self.arr(self.domain_right_edge - self.domain_left_edge, "code_length")
- self.unit_registry.add("unitary", float(DW.max()), DW.units.dimensions)
+ self.unit_registry.add("unitary", float(DW.max() * DW.units.cgs_value),
+ DW.units.dimensions)
def cosmology_get_units(self):
"""
@@ -984,8 +985,8 @@
size = os.stat(f.name).st_size
fullblocks, lastblock = divmod(size, blocksize)
- # The first(end of file) block will be short, since this leaves
- # the rest aligned on a blocksize boundary. This may be more
+ # The first(end of file) block will be short, since this leaves
+ # the rest aligned on a blocksize boundary. This may be more
# efficient than having the last (first in file) block be short
f.seek(-lastblock,2)
yield f.read(lastblock)
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