[yt-svn] commit/yt: 4 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Jul 28 16:26:20 PDT 2014
4 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/6284d76f3462/
Changeset: 6284d76f3462
Branch: yt-3.0
User: pshriwise
Date: 2014-07-25 19:26:35
Summary: Added a section for annotating triangle facets to sliceplots.
Affected #: 1 file
diff -r 032a832bd4642164fc02bb175aa2b93780d846af -r 6284d76f34628eb8459b4af32b6aeb9c0fde9dd2 doc/source/visualizing/_cb_docstrings.inc
--- a/doc/source/visualizing/_cb_docstrings.inc
+++ b/doc/source/visualizing/_cb_docstrings.inc
@@ -1,3 +1,37 @@
+Annotate Triangle Facets Callback
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. function:: annotate_triangle_facets(triangle_vertices, plot_args=None)
+
+ (This is a proxy for
+ :class:`~yt.visualization.plot_modifications.TriangleFacetsCallback`.)
+
+ This add a line collection of a SlicePlot's plane-intersection
+ with the triangles to the plot. This callback is ideal for a
+ dataset representing a geometric model of triangular facets.
+
+.. python-script::
+
+ import yt
+ import h5py
+
+ # Load data file
+ pf = yt.load("MoabTest/fng_usrbin22.h5m")
+
+ # Create the desired slice plot
+ s = yt.SlicePlot(pf, 'z', ('moab','TALLY_TAG'))
+
+ #get triangle vertices from file (in this case hdf5)
+ f = h5py.File("mcnp_n_impr_fluka.h5m", "r")
+ coords = f["/tstt/nodes/coordinates"][:]
+ conn = f["/tstt/elements/Tri3/connectivity"][:]
+ points = coords[conn-1]
+
+ # Annotate slice-triangle intersection contours to the plot
+ s.annotate_triangle_facets(points, plot_args={"colors": 'black'})
+ s.save()
+
+
Arrow callback
~~~~~~~~~~~~~~
https://bitbucket.org/yt_analysis/yt/commits/ad0a84e15e14/
Changeset: ad0a84e15e14
Branch: yt-3.0
User: pshriwise
Date: 2014-07-26 17:41:04
Summary: Corrections to annotate_triangle_facets documentation section.
Affected #: 1 file
diff -r 6284d76f34628eb8459b4af32b6aeb9c0fde9dd2 -r ad0a84e15e14fbb049e2dc7e44f44b1986dcaa8b doc/source/visualizing/_cb_docstrings.inc
--- a/doc/source/visualizing/_cb_docstrings.inc
+++ b/doc/source/visualizing/_cb_docstrings.inc
@@ -22,7 +22,10 @@
s = yt.SlicePlot(pf, 'z', ('moab','TALLY_TAG'))
#get triangle vertices from file (in this case hdf5)
- f = h5py.File("mcnp_n_impr_fluka.h5m", "r")
+
+ #setup file path for yt test directory
+ filename = os.path.join(ytcfg.get("yt", "test_data_dir"), "MoabTest/mcnp_n_impr_fluka.h5m")
+ f = h5py.File(filename, "r")
coords = f["/tstt/nodes/coordinates"][:]
conn = f["/tstt/elements/Tri3/connectivity"][:]
points = coords[conn-1]
https://bitbucket.org/yt_analysis/yt/commits/39520ea5d0e6/
Changeset: 39520ea5d0e6
Branch: yt-3.0
User: ngoldbaum
Date: 2014-07-29 01:23:58
Summary: Merging with tip.
Affected #: 1 file
diff -r fc533325d312b53c8c2a816fe3ecb8a42de8d8e8 -r 39520ea5d0e6dc5ebd02627349b2a3d4cf31f3c1 doc/source/visualizing/_cb_docstrings.inc
--- a/doc/source/visualizing/_cb_docstrings.inc
+++ b/doc/source/visualizing/_cb_docstrings.inc
@@ -1,3 +1,40 @@
+Annotate Triangle Facets Callback
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. function:: annotate_triangle_facets(triangle_vertices, plot_args=None)
+
+ (This is a proxy for
+ :class:`~yt.visualization.plot_modifications.TriangleFacetsCallback`.)
+
+ This add a line collection of a SlicePlot's plane-intersection
+ with the triangles to the plot. This callback is ideal for a
+ dataset representing a geometric model of triangular facets.
+
+.. python-script::
+
+ import yt
+ import h5py
+
+ # Load data file
+ pf = yt.load("MoabTest/fng_usrbin22.h5m")
+
+ # Create the desired slice plot
+ s = yt.SlicePlot(pf, 'z', ('moab','TALLY_TAG'))
+
+ #get triangle vertices from file (in this case hdf5)
+
+ #setup file path for yt test directory
+ filename = os.path.join(ytcfg.get("yt", "test_data_dir"), "MoabTest/mcnp_n_impr_fluka.h5m")
+ f = h5py.File(filename, "r")
+ coords = f["/tstt/nodes/coordinates"][:]
+ conn = f["/tstt/elements/Tri3/connectivity"][:]
+ points = coords[conn-1]
+
+ # Annotate slice-triangle intersection contours to the plot
+ s.annotate_triangle_facets(points, plot_args={"colors": 'black'})
+ s.save()
+
+
Arrow callback
~~~~~~~~~~~~~~
https://bitbucket.org/yt_analysis/yt/commits/95c532180d11/
Changeset: 95c532180d11
Branch: yt-3.0
User: ngoldbaum
Date: 2014-07-29 01:25:46
Summary: Fixing syntax errors in the triangle facets callback docs.
Affected #: 1 file
diff -r 39520ea5d0e6dc5ebd02627349b2a3d4cf31f3c1 -r 95c532180d1182130daea6a6f95de32bfbcee0ce doc/source/visualizing/_cb_docstrings.inc
--- a/doc/source/visualizing/_cb_docstrings.inc
+++ b/doc/source/visualizing/_cb_docstrings.inc
@@ -1,40 +1,3 @@
-Annotate Triangle Facets Callback
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-.. function:: annotate_triangle_facets(triangle_vertices, plot_args=None)
-
- (This is a proxy for
- :class:`~yt.visualization.plot_modifications.TriangleFacetsCallback`.)
-
- This add a line collection of a SlicePlot's plane-intersection
- with the triangles to the plot. This callback is ideal for a
- dataset representing a geometric model of triangular facets.
-
-.. python-script::
-
- import yt
- import h5py
-
- # Load data file
- pf = yt.load("MoabTest/fng_usrbin22.h5m")
-
- # Create the desired slice plot
- s = yt.SlicePlot(pf, 'z', ('moab','TALLY_TAG'))
-
- #get triangle vertices from file (in this case hdf5)
-
- #setup file path for yt test directory
- filename = os.path.join(ytcfg.get("yt", "test_data_dir"), "MoabTest/mcnp_n_impr_fluka.h5m")
- f = h5py.File(filename, "r")
- coords = f["/tstt/nodes/coordinates"][:]
- conn = f["/tstt/elements/Tri3/connectivity"][:]
- points = coords[conn-1]
-
- # Annotate slice-triangle intersection contours to the plot
- s.annotate_triangle_facets(points, plot_args={"colors": 'black'})
- s.save()
-
-
Arrow callback
~~~~~~~~~~~~~~
@@ -481,3 +444,41 @@
p = yt.SlicePlot(ds, 'z', 'density', center='c', width=(20, 'kpc'))
p.annotate_timestamp(-9, -9)
p.save()
+
+Annotate Triangle Facets Callback
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. function:: annotate_triangle_facets(triangle_vertices, plot_args=None)
+
+ (This is a proxy for
+ :class:`~yt.visualization.plot_modifications.TriangleFacetsCallback`.)
+
+ This add a line collection of a SlicePlot's plane-intersection
+ with the triangles to the plot. This callback is ideal for a
+ dataset representing a geometric model of triangular facets.
+
+.. python-script::
+
+ import h5py
+ import os
+ import yt
+
+ # Load data file
+ pf = yt.load("MoabTest/fng_usrbin22.h5m")
+
+ # Create the desired slice plot
+ s = yt.SlicePlot(pf, 'z', ('moab','TALLY_TAG'))
+
+ #get triangle vertices from file (in this case hdf5)
+
+ #setup file path for yt test directory
+ filename = os.path.join(yt.config.ytcfg.get("yt", "test_data_dir"),
+ "MoabTest/mcnp_n_impr_fluka.h5m")
+ f = h5py.File(filename, "r")
+ coords = f["/tstt/nodes/coordinates"][:]
+ conn = f["/tstt/elements/Tri3/connectivity"][:]
+ points = coords[conn-1]
+
+ # Annotate slice-triangle intersection contours to the plot
+ s.annotate_triangle_facets(points, plot_args={"colors": 'black'})
+ s.save()
\ No newline at end of file
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