[yt-svn] commit/yt: brittonsmith: Fixing a bug in how redshift interval is calculated for the length of a ray segment.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Jun 18 17:17:23 PDT 2014
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/1b93a1840f38/
Changeset: 1b93a1840f38
Branch: yt
User: brittonsmith
Date: 2014-06-12 16:01:40
Summary: Fixing a bug in how redshift interval is calculated for the length of a ray segment.
Affected #: 1 file
diff -r fe87a0ff836c1718a1b99e91ebc8e86ef234b257 -r 1b93a1840f38225374a8a4bd7e487eb4e95c335c 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
@@ -392,13 +392,9 @@
pf = load(my_segment['filename'])
if self.near_redshift == self.far_redshift:
- h_vel = cm_per_km * pf.units['mpc'] * \
- vector_length(my_segment['start'], my_segment['end']) * \
- self.cosmology.HubbleConstantNow * \
- self.cosmology.ExpansionFactor(my_segment['redshift'])
- next_redshift = my_segment["redshift"] + \
- np.sqrt((1. + h_vel / speed_of_light_cgs) /
- (1. - h_vel / speed_of_light_cgs)) + 1.
+ next_redshift = my_segment["redshift"] - \
+ self._deltaz_forward(my_segment["redshift"],
+ pf.units["mpc"] * my_segment["traversal_box_fraction"])
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