[yt-svn] commit/yt: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Nov 23 11:10:31 PST 2015
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/ffda1c3bc884/
Changeset: ffda1c3bc884
Branch: yt
User: chummels
Date: 2015-11-21 22:24:36+00:00
Summary: Adding mask to LightRay to assure output elements have non-zero density (a problem in some SPH datasets).
Affected #: 1 file
diff -r 27f664fe46a4ec9361421167ffb7f963428ac912 -r ffda1c3bc884c54e3360aa3b8d0c5f01d4e1d143 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
@@ -544,6 +544,11 @@
self.cosmology.t_from_z(ds["current_redshift"])
extra_attrs = {"data_type": "yt_light_ray"}
field_types = dict([(field, "grid") for field in data.keys()])
+ # Only return LightRay elements with non-zero density
+ if 'density' in data:
+ mask = data['density'] > 0
+ for key in data.keys():
+ data[key] = data[key][mask]
save_as_dataset(ds, filename, data, field_types=field_types,
extra_attrs=extra_attrs)
https://bitbucket.org/yt_analysis/yt/commits/903268eb8d71/
Changeset: 903268eb8d71
Branch: yt
User: bwkeller
Date: 2015-11-23 19:10:26+00:00
Summary: Merged in chummels/yt (pull request #1880)
Adding mask to LightRay to assure output elements have non-zero density (a problem in some SPH datasets).
Affected #: 1 file
diff -r 25030d46ee18f7000c1d1199fbd78a678c9c3b99 -r 903268eb8d717ff3af3fc5acd7634f5db854a1b4 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
@@ -544,6 +544,11 @@
self.cosmology.t_from_z(ds["current_redshift"])
extra_attrs = {"data_type": "yt_light_ray"}
field_types = dict([(field, "grid") for field in data.keys()])
+ # Only return LightRay elements with non-zero density
+ if 'density' in data:
+ mask = data['density'] > 0
+ for key in data.keys():
+ data[key] = data[key][mask]
save_as_dataset(ds, filename, data, field_types=field_types,
extra_attrs=extra_attrs)
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