[yt-svn] commit/yt: brittonsmith: Fixing calculation of end redshift of light ray.

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Apr 30 13:28:39 PDT 2014


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/84e29e8f60df/
Changeset:   84e29e8f60df
Branch:      yt
User:        brittonsmith
Date:        2014-04-28 15:09:37
Summary:     Fixing calculation of end redshift of light ray.
Affected #:  1 file

diff -r 1a67d558b51cf89b66417704c5bcd9533810a023 -r 84e29e8f60dfb35ab4194e627a2855f253738068 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
@@ -396,8 +396,9 @@
                   vector_length(my_segment['start'], my_segment['end']) * \
                   self.cosmology.HubbleConstantNow * \
                   self.cosmology.ExpansionFactor(my_segment['redshift'])
-                next_redshift = np.sqrt((1. + h_vel / speed_of_light_cgs) /
-                                         (1. - h_vel / speed_of_light_cgs)) - 1.
+                next_redshift = my_segment["redshift"] + \
+                  np.sqrt((1. + h_vel / speed_of_light_cgs) /
+                          (1. - h_vel / speed_of_light_cgs)) + 1.
             elif my_segment['next'] is None:
                 next_redshift = self.near_redshift
             else:

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