[yt-svn] commit/yt: 3 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Jan 26 09:27:27 PST 2017


3 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/1ec900ae20fc/
Changeset:   1ec900ae20fc
Branch:      yt
User:        jzuhone
Date:        2017-01-26 03:47:30+00:00
Summary:     Actually do what we say we’re going to do and remove the temp_weightfield at the end. Remove code that is unreachable or is not used.
Affected #:  1 file

diff -r 5c3af8da1dd806d6f5d76466e04feade4b1d6e5f -r 1ec900ae20fcca8f98701298ab2aad066dc67a33 yt/visualization/volume_rendering/off_axis_projection.py
--- a/yt/visualization/volume_rendering/off_axis_projection.py
+++ b/yt/visualization/volume_rendering/off_axis_projection.py
@@ -136,7 +136,6 @@
             def temp_weightfield(a, b):
                 tr = b[f].astype("float64") * b[w]
                 return b.apply_units(tr, a.units)
-                return tr
             return temp_weightfield
         data_source.ds.field_info.add_field(weightfield, sampling_type="cell",
             function=_make_wf(item, weight))
@@ -200,6 +199,8 @@
     image = vol.finalize_image(camera, vol.sampler.aimage)
     image = ImageArray(image, funits, registry=data_source.ds.unit_registry, info=image.info)
 
+    data_source.ds.field_info.pop(("index", "temp_weightfield"))
+
     if method == "integrate":
         if weight is None:
             dl = width[2].in_units(data_source.ds.unit_system["length"])


https://bitbucket.org/yt_analysis/yt/commits/6bd75522945f/
Changeset:   6bd75522945f
Branch:      yt
User:        jzuhone
Date:        2017-01-26 03:52:28+00:00
Summary:     This line is not used anywhere
Affected #:  1 file

diff -r 1ec900ae20fcca8f98701298ab2aad066dc67a33 -r 6bd75522945fc9387ddfbcb467602ea71549ca27 yt/visualization/volume_rendering/off_axis_projection.py
--- a/yt/visualization/volume_rendering/off_axis_projection.py
+++ b/yt/visualization/volume_rendering/off_axis_projection.py
@@ -143,7 +143,6 @@
         # its dependencies..
         deps, _ = data_source.ds.field_info.check_derived_fields([weightfield])
         data_source.ds.field_dependencies.update(deps)
-        fields = [weightfield, weight]
         vol.set_field(weightfield)
         vol.set_weight_field(weight)
     ptf = ProjectionTransferFunction()


https://bitbucket.org/yt_analysis/yt/commits/e57fe97720f5/
Changeset:   e57fe97720f5
Branch:      yt
User:        jzuhone
Date:        2017-01-26 03:55:37+00:00
Summary:     Only do this if we have a weight
Affected #:  1 file

diff -r 6bd75522945fc9387ddfbcb467602ea71549ca27 -r e57fe97720f558820fdb57ad4fe458df2f3c4cf9 yt/visualization/volume_rendering/off_axis_projection.py
--- a/yt/visualization/volume_rendering/off_axis_projection.py
+++ b/yt/visualization/volume_rendering/off_axis_projection.py
@@ -198,7 +198,8 @@
     image = vol.finalize_image(camera, vol.sampler.aimage)
     image = ImageArray(image, funits, registry=data_source.ds.unit_registry, info=image.info)
 
-    data_source.ds.field_info.pop(("index", "temp_weightfield"))
+    if weight is not None:
+        data_source.ds.field_info.pop(("index", "temp_weightfield"))
 
     if method == "integrate":
         if weight is None:

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