[yt-svn] commit/yt: 4 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Sep 12 16:17:13 PDT 2016
4 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/6091c6e4f180/
Changeset: 6091c6e4f180
Branch: yt
User: cphyc
Date: 2016-09-12 20:29:16+00:00
Summary: Fix issue that was converting twice the time
Affected #: 2 files
diff -r c07d12bf5903b40c0c6e65a8ea8f28a82f142e1d -r 6091c6e4f18036faed71620a8025d0a697440515 yt/frontends/ramses/data_structures.py
--- a/yt/frontends/ramses/data_structures.py
+++ b/yt/frontends/ramses/data_structures.py
@@ -647,7 +647,7 @@
if self.cosmological_simulation == 0:
- self.current_time = self.parameters['time'] * self.parameters['unit_t']
+ self.current_time = self.parameters['time'] # * self.parameters['unit_t']
else :
self.tau_frw, self.t_frw, self.dtau, self.n_frw, self.time_tot = \
friedman( self.omega_matter, self.omega_lambda, 1. - self.omega_matter - self.omega_lambda )
diff -r c07d12bf5903b40c0c6e65a8ea8f28a82f142e1d -r 6091c6e4f18036faed71620a8025d0a697440515 yt/frontends/ramses/tests/test_outputs.py
--- a/yt/frontends/ramses/tests/test_outputs.py
+++ b/yt/frontends/ramses/tests/test_outputs.py
@@ -57,3 +57,12 @@
def test_units_override():
for test in units_override_check(output_00080):
yield test
+
+
+ramsesNonCosmo = 'DICEGalaxyDisk_nonCosmological/output_00002'
+ at requires_file(ramsesNonCosmo)
+def test_unit_non_cosmo():
+ ds = data_dir_load(ramsesNonCosmo)
+
+ expected_value = 14087886140997.336
+ assert_equal(ds.current_time.value, expected_value)
https://bitbucket.org/yt_analysis/yt/commits/0ace12348dc7/
Changeset: 0ace12348dc7
Branch: yt
User: cphyc
Date: 2016-09-12 20:36:19+00:00
Summary: Remove useless old code
Affected #: 1 file
diff -r 6091c6e4f18036faed71620a8025d0a697440515 -r 0ace12348dc7a0e9007d49e7dc5dfc4c83020f8d yt/frontends/ramses/data_structures.py
--- a/yt/frontends/ramses/data_structures.py
+++ b/yt/frontends/ramses/data_structures.py
@@ -647,7 +647,7 @@
if self.cosmological_simulation == 0:
- self.current_time = self.parameters['time'] # * self.parameters['unit_t']
+ self.current_time = self.parameters['time']
else :
self.tau_frw, self.t_frw, self.dtau, self.n_frw, self.time_tot = \
friedman( self.omega_matter, self.omega_lambda, 1. - self.omega_matter - self.omega_lambda )
https://bitbucket.org/yt_analysis/yt/commits/445a258d8bba/
Changeset: 445a258d8bba
Branch: yt
User: cphyc
Date: 2016-09-12 20:43:32+00:00
Summary: Fix mistake in test
Affected #: 1 file
diff -r 0ace12348dc7a0e9007d49e7dc5dfc4c83020f8d -r 445a258d8bbabea5135627ca2ab29bb9a065f5c2 yt/frontends/ramses/tests/test_outputs.py
--- a/yt/frontends/ramses/tests/test_outputs.py
+++ b/yt/frontends/ramses/tests/test_outputs.py
@@ -64,5 +64,8 @@
def test_unit_non_cosmo():
ds = data_dir_load(ramsesNonCosmo)
- expected_value = 14087886140997.336
- assert_equal(ds.current_time.value, expected_value)
+ expected_raw_time = 0.0299468077820411 # in ramses unit
+ yield assert_equal, ds.current_time.value, expected_raw_time
+
+ expected_time = 14087886140997.336 # in seconds
+ assert_equal(ds.current_time.in_units('s').value, expected_value)
https://bitbucket.org/yt_analysis/yt/commits/c7b7950bb650/
Changeset: c7b7950bb650
Branch: yt
User: cphyc
Date: 2016-09-12 20:49:24+00:00
Summary: Check for both unitless and unit timing
Affected #: 1 file
diff -r 445a258d8bbabea5135627ca2ab29bb9a065f5c2 -r c7b7950bb650eadad20134c09cadb837ed9d9063 yt/frontends/ramses/tests/test_outputs.py
--- a/yt/frontends/ramses/tests/test_outputs.py
+++ b/yt/frontends/ramses/tests/test_outputs.py
@@ -25,6 +25,8 @@
FieldValuesTest, \
create_obj
from yt.frontends.ramses.api import RAMSESDataset
+import os
+import yt
_fields = ("temperature", "density", "velocity_magnitude",
("deposit", "all_density"), ("deposit", "all_count"))
@@ -62,10 +64,10 @@
ramsesNonCosmo = 'DICEGalaxyDisk_nonCosmological/output_00002'
@requires_file(ramsesNonCosmo)
def test_unit_non_cosmo():
- ds = data_dir_load(ramsesNonCosmo)
+ ds = yt.load(os.path.join(ramsesNonCosmo, 'info_00002.txt'))
expected_raw_time = 0.0299468077820411 # in ramses unit
yield assert_equal, ds.current_time.value, expected_raw_time
expected_time = 14087886140997.336 # in seconds
- assert_equal(ds.current_time.in_units('s').value, expected_value)
+ assert_equal(ds.current_time.in_units('s').value, expected_time)
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