[yt-svn] commit/yt: 3 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Thu Oct 15 10:30:55 PDT 2015
3 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/061999a56005/
Changeset: 061999a56005
Branch: yt
User: atmyers
Date: 2015-10-14 21:56:36+00:00
Summary: Enforce dimensionlessness of unit vectors inside _setup_normalized_vectors, not in initialization, since when you call set_position() and similar methods you need to make sure to catch this problem.
Affected #: 1 file
diff -r debebbd57949ab80164ef34d9d88f59990c26813 -r 061999a56005719735d0a613611835fe1ead6577 yt/utilities/orientation.py
--- a/yt/utilities/orientation.py
+++ b/yt/utilities/orientation.py
@@ -41,12 +41,6 @@
"""
- # Make sure vectors are unitless
- if north_vector is not None:
- north_vector = YTArray(north_vector, "", dtype='float64')
- if normal_vector is not None:
- normal_vector = YTArray(normal_vector, "", dtype='float64')
-
self.steady_north = steady_north
if not np.dot(normal_vector, normal_vector) > 0:
mylog.error("Normal vector is null")
@@ -63,6 +57,13 @@
def _setup_normalized_vectors(self, normal_vector, north_vector):
mylog.debug('Setting normalized vectors' + str(normal_vector)
+ str(north_vector))
+
+ # Make sure vectors are unitless
+ if north_vector is not None:
+ north_vector = YTArray(north_vector, "", dtype='float64')
+ if normal_vector is not None:
+ normal_vector = YTArray(normal_vector, "", dtype='float64')
+
# Now we set up our various vectors
normal_vector /= np.sqrt(np.dot(normal_vector, normal_vector))
if north_vector is None:
https://bitbucket.org/yt_analysis/yt/commits/6f02d91e3e85/
Changeset: 6f02d91e3e85
Branch: yt
User: atmyers
Date: 2015-10-14 22:44:27+00:00
Summary: linking to the relevant sections in the narrative docs from the cookbook recipes, instead of just the main page
Affected #: 2 files
diff -r 061999a56005719735d0a613611835fe1ead6577 -r 6f02d91e3e856288d896301742f3b18004b1f8a4 doc/source/cookbook/complex_plots.rst
--- a/doc/source/cookbook/complex_plots.rst
+++ b/doc/source/cookbook/complex_plots.rst
@@ -196,7 +196,7 @@
In this recipe, we move a camera through a domain and take multiple volume
rendering snapshots.
-See :ref:`volume_rendering` for more information.
+See :ref:`camera_movement` for more information.
.. yt_cookbook:: camera_movement.py
@@ -229,7 +229,7 @@
This recipe demonstrates how to make semi-opaque volume renderings, but also
how to step through and try different things to identify the type of volume
rendering you want.
-See :ref:`volume_rendering` for more information.
+See :ref:`opaque_rendering` for more information.
.. yt_cookbook:: opaque_rendering.py
@@ -244,13 +244,15 @@
.. yt_cookbook:: amrkdtree_downsampling.py
+.. _cookbook-volume_rendering_annotations:
+
Volume Rendering with Bounding Box and Overlaid Grids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This recipe demonstrates how to overplot a bounding box on a volume rendering
as well as overplotting grids representing the level of refinement achieved
in different regions of the code.
-See :ref:`volume_rendering` for more information.
+See :ref:`volume_rendering_annotations` for more information.
.. yt_cookbook:: rendering_with_box_and_grids.py
diff -r 061999a56005719735d0a613611835fe1ead6577 -r 6f02d91e3e856288d896301742f3b18004b1f8a4 doc/source/visualizing/volume_rendering.rst
--- a/doc/source/visualizing/volume_rendering.rst
+++ b/doc/source/visualizing/volume_rendering.rst
@@ -233,6 +233,8 @@
vertices. For instance, lines can be used to draw outlines of regions or
continents.
+.. _volume_rendering_annotations:
+
Annotations
+++++++++++
@@ -244,6 +246,9 @@
annotations will operate in data space and can draw boxes, grid information,
and also provide a vector orientation within the image.
+For example scripts using these features,
+see :ref:`cookbook-volume_rendering_annotations`.
+
Care and Usage of the Camera
----------------------------
@@ -464,6 +469,8 @@
For more information about enabling parallelism, see :ref:`parallel-computation`.
+.. _opaque_rendering:
+
Opacity
-------
https://bitbucket.org/yt_analysis/yt/commits/d22ec3d93d2c/
Changeset: d22ec3d93d2c
Branch: yt
User: ngoldbaum
Date: 2015-10-15 17:30:44+00:00
Summary: Merged in atmyers/yt (pull request #1799)
[Experimental] [Bugfix] Enforce dimensionlessness of unit vectors inside _setup_normalized_vectors, not in initialization, since when you call set_position() and similar methods you need to make sure to catch this problem.
Affected #: 3 files
diff -r 02d4269d3c848581f3529a2861b2d3cbcaa5b89e -r d22ec3d93d2ce6f954f7cd07d569f384039f02e6 doc/source/cookbook/complex_plots.rst
--- a/doc/source/cookbook/complex_plots.rst
+++ b/doc/source/cookbook/complex_plots.rst
@@ -196,7 +196,7 @@
In this recipe, we move a camera through a domain and take multiple volume
rendering snapshots.
-See :ref:`volume_rendering` for more information.
+See :ref:`camera_movement` for more information.
.. yt_cookbook:: camera_movement.py
@@ -247,7 +247,7 @@
This recipe demonstrates how to make semi-opaque volume renderings, but also
how to step through and try different things to identify the type of volume
rendering you want.
-See :ref:`volume_rendering` for more information.
+See :ref:`opaque_rendering` for more information.
.. yt_cookbook:: opaque_rendering.py
@@ -262,13 +262,15 @@
.. yt_cookbook:: amrkdtree_downsampling.py
+.. _cookbook-volume_rendering_annotations:
+
Volume Rendering with Bounding Box and Overlaid Grids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This recipe demonstrates how to overplot a bounding box on a volume rendering
as well as overplotting grids representing the level of refinement achieved
in different regions of the code.
-See :ref:`volume_rendering` for more information.
+See :ref:`volume_rendering_annotations` for more information.
.. yt_cookbook:: rendering_with_box_and_grids.py
diff -r 02d4269d3c848581f3529a2861b2d3cbcaa5b89e -r d22ec3d93d2ce6f954f7cd07d569f384039f02e6 doc/source/visualizing/volume_rendering.rst
--- a/doc/source/visualizing/volume_rendering.rst
+++ b/doc/source/visualizing/volume_rendering.rst
@@ -233,6 +233,8 @@
vertices. For instance, lines can be used to draw outlines of regions or
continents.
+.. _volume_rendering_annotations:
+
Annotations
+++++++++++
@@ -244,6 +246,9 @@
annotations will operate in data space and can draw boxes, grid information,
and also provide a vector orientation within the image.
+For example scripts using these features,
+see :ref:`cookbook-volume_rendering_annotations`.
+
Care and Usage of the Camera
----------------------------
@@ -464,6 +469,8 @@
For more information about enabling parallelism, see :ref:`parallel-computation`.
+.. _opaque_rendering:
+
Opacity
-------
diff -r 02d4269d3c848581f3529a2861b2d3cbcaa5b89e -r d22ec3d93d2ce6f954f7cd07d569f384039f02e6 yt/utilities/orientation.py
--- a/yt/utilities/orientation.py
+++ b/yt/utilities/orientation.py
@@ -41,12 +41,6 @@
"""
- # Make sure vectors are unitless
- if north_vector is not None:
- north_vector = YTArray(north_vector, "", dtype='float64')
- if normal_vector is not None:
- normal_vector = YTArray(normal_vector, "", dtype='float64')
-
self.steady_north = steady_north
if not np.dot(normal_vector, normal_vector) > 0:
mylog.error("Normal vector is null")
@@ -63,6 +57,13 @@
def _setup_normalized_vectors(self, normal_vector, north_vector):
mylog.debug('Setting normalized vectors' + str(normal_vector)
+ str(north_vector))
+
+ # Make sure vectors are unitless
+ if north_vector is not None:
+ north_vector = YTArray(north_vector, "", dtype='float64')
+ if normal_vector is not None:
+ normal_vector = YTArray(normal_vector, "", dtype='float64')
+
# Now we set up our various vectors
normal_vector /= np.sqrt(np.dot(normal_vector, normal_vector))
if north_vector 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