[yt-svn] commit/yt: ngoldbaum: Merged in cphyc/yt (pull request #2491)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Jan 19 08:54:19 PST 2017
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/f00742795e09/
Changeset: f00742795e09
Branch: yt
User: ngoldbaum
Date: 2017-01-19 16:53:52+00:00
Summary: Merged in cphyc/yt (pull request #2491)
[bugfix] RAMSES detect correctly cosmo simulation
Affected #: 2 files
diff -r 771123590278f97c40911a6bc318174de90cdd0e -r f00742795e0970ba78ded9ea01644a6a40821b13 yt/frontends/ramses/data_structures.py
--- a/yt/frontends/ramses/data_structures.py
+++ b/yt/frontends/ramses/data_structures.py
@@ -630,7 +630,7 @@
# This is likely not true, but it's not clear how to determine the boundary conditions
self.periodicity = (True, True, True)
# These conditions seem to always be true for non-cosmological datasets
- if rheader["time"] > 0 and rheader["H0"] == 1 and rheader["aexp"] == 1:
+ if rheader["time"] >= 0 and rheader["H0"] == 1 and rheader["aexp"] == 1:
self.cosmological_simulation = 0
self.current_redshift = 0
self.hubble_constant = 0
diff -r 771123590278f97c40911a6bc318174de90cdd0e -r f00742795e0970ba78ded9ea01644a6a40821b13 yt/frontends/ramses/fields.py
--- a/yt/frontends/ramses/fields.py
+++ b/yt/frontends/ramses/fields.py
@@ -106,7 +106,8 @@
d = {'lognH': np.log10(_X*data["density"]/mh).ravel(),
'logT' : np.log10(data["temperature"]).ravel()}
rv = 10**interp_object(d).reshape(shape)
- return rv
+ # Return array in unit 'per volume' consistently with line below
+ return data.ds.arr(rv, 'code_length**-3')
self.add_field(name = name, sampling_type="cell", function=_func,
units = "code_length**-3")
avals = {}
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