[yt-svn] commit/yt: ngoldbaum: Merged in brittonsmith/yt (pull request #1863)
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Nov 16 09:38:56 PST 2015
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/ee9ca9eebfb5/
Changeset: ee9ca9eebfb5
Branch: yt
User: ngoldbaum
Date: 2015-11-16 17:38:45+00:00
Summary: Merged in brittonsmith/yt (pull request #1863)
[BUGFIX] close loophole that allowed improper LightRay use
Affected #: 1 file
diff -r fc56cb7acc07431d4e8877b9c89192b0b05477fd -r ee9ca9eebfb5472caa3e6dcc3004f0dc66a17554 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
@@ -64,12 +64,12 @@
Default: None
near_redshift : optional, float
The near (lowest) redshift for a light ray containing multiple
- datasets. Do not use is making a light ray from a single
+ datasets. Do not use if making a light ray from a single
dataset.
Default: None
far_redshift : optional, float
The far (highest) redshift for a light ray containing multiple
- datasets. Do not use is making a light ray from a single
+ datasets. Do not use if making a light ray from a single
dataset.
Default: None
use_minimum_datasets : optional, bool
@@ -168,9 +168,9 @@
# If using only one dataset, set start and stop manually.
if start_position is not None:
- if len(self.light_ray_solution) > 1:
- raise RuntimeError("LightRay Error: cannot specify start_position " + \
- "if light ray uses more than one dataset.")
+ if self.near_redshift is not None or self.far_redshift is not None:
+ raise RuntimeError("LightRay Error: cannot specify both " + \
+ "start_position and a redshift range.")
if not ((end_position is None) ^ (trajectory is None)):
raise RuntimeError("LightRay Error: must specify either end_position " + \
"or trajectory, but not both.")
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