[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Feb 1 10:57:31 PST 2018
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/58d21d8793cc/
Changeset: 58d21d8793cc
User: ngoldbaum
Date: 2018-01-24 21:48:26+00:00
Summary: use CGS units to calculate specific energy units if available
Affected #: 1 file
diff -r e6a7a03a324126a91b9911a7e416dba39608cbe1 -r 58d21d8793cc4c14c8dcb120780adf7f960679de yt/frontends/gadget/data_structures.py
--- a/yt/frontends/gadget/data_structures.py
+++ b/yt/frontends/gadget/data_structures.py
@@ -339,6 +339,10 @@
if "specific_energy" in unit_base:
specific_energy_unit = unit_base["specific_energy"]
+ elif "UnitEnergy_in_cgs" in unit_base and "UnitMass_in_g" in unit_base:
+ specific_energy_unit = \
+ unit_base["UnitEnergy_in_cgs"] / unit_base["UnitMass_in_g"]
+ specific_energy_unit = (specific_energy_unit, "(cm/s)**2")
else:
# Sane default
specific_energy_unit = (1, "(km/s) ** 2")
https://bitbucket.org/yt_analysis/yt/commits/55143ab1d847/
Changeset: 55143ab1d847
User: ngoldbaum
Date: 2018-02-01 18:57:14+00:00
Summary: Merge pull request #1676 from ngoldbaum/gadget-energy-fix
Use CGS units to calculate Gadget specific energy units if available
Affected #: 1 file
diff -r 20e4aa4d9c5f0a4cf3c04dc57dabf809de95375e -r 55143ab1d8474419f795545f878f3c72a42f129c yt/frontends/gadget/data_structures.py
--- a/yt/frontends/gadget/data_structures.py
+++ b/yt/frontends/gadget/data_structures.py
@@ -339,6 +339,10 @@
if "specific_energy" in unit_base:
specific_energy_unit = unit_base["specific_energy"]
+ elif "UnitEnergy_in_cgs" in unit_base and "UnitMass_in_g" in unit_base:
+ specific_energy_unit = \
+ unit_base["UnitEnergy_in_cgs"] / unit_base["UnitMass_in_g"]
+ specific_energy_unit = (specific_energy_unit, "(cm/s)**2")
else:
# Sane default
specific_energy_unit = (1, "(km/s) ** 2")
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