[yt-svn] commit/yt: MatthewTurk: Merged in brittonsmith/yt (pull request #2399)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Oct 14 06:33:03 PDT 2016


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/f7ef0effe08b/
Changeset:   f7ef0effe08b
Branch:      yt
User:        MatthewTurk
Date:        2016-10-14 13:32:36+00:00
Summary:     Merged in brittonsmith/yt (pull request #2399)

[bugfix] Strip units of hubble constant before saving.
Affected #:  1 file

diff -r 11cb5e59499b796885b1ef027c0bb47c6bc38c88 -r f7ef0effe08bb79cd7a1d3ef4126975957d870b9 yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
--- a/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
+++ b/yt/analysis_modules/cosmological_observation/light_ray/light_ray.py
@@ -669,6 +669,9 @@
                 ds[attr] = getattr(self.cosmology, attr)
             ds["current_time"] = \
               self.cosmology.t_from_z(ds["current_redshift"])
+            if isinstance(ds["hubble_constant"], YTArray):
+                ds["hubble_constant"] = \
+                  ds["hubble_constant"].to("100*km/(Mpc*s)").d
         extra_attrs = {"data_type": "yt_light_ray"}
         field_types = dict([(field, "grid") for field in data.keys()])

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