[yt-svn] commit/yt: 3 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Nov 16 09:39:02 PST 2015
3 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/d51bd5166095/
Changeset: d51bd5166095
Branch: yt
User: brittonsmith
Date: 2015-11-15 14:31:20+00:00
Summary: Closing loophole that allowed user to specify a redshift range and a start/end position for light ray.
Affected #: 1 file
diff -r d263b58d4aa4d7b9d792488bd0aec2c5e95e2ba8 -r d51bd51660953e5b03aca7f6c35421942533f0d3 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 != self.far_redshift:
+ 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.")
https://bitbucket.org/yt_analysis/yt/commits/7982fdc76652/
Changeset: 7982fdc76652
Branch: yt
User: brittonsmith
Date: 2015-11-15 14:40:34+00:00
Summary: Be even safer and make sure both near and far redshift are None.
Affected #: 1 file
diff -r d51bd51660953e5b03aca7f6c35421942533f0d3 -r 7982fdc7665246f4986b510f639bef9dcdeab64c 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
@@ -168,7 +168,7 @@
# If using only one dataset, set start and stop manually.
if start_position is not None:
- if self.near_redshift != self.far_redshift:
+ 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)):
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