[yt-svn] commit/yt-doc: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Sat Jul 28 14:22:49 PDT 2012
2 new commits in yt-doc:
https://bitbucket.org/yt_analysis/yt-doc/changeset/abafe952a108/
changeset: abafe952a108
user: ngoldbaum
date: 2012-07-28 22:07:27
summary: Updating the cookbook script runner to move directories created by the
cookbook scripts to source/cookbook/_static along with the images.
affected #: 2 files
diff -r f27593283bcb0591fd00037c737303e2465f2374 -r abafe952a1085562c2c31e2cdfabc597a059f92d Makefile
--- a/Makefile
+++ b/Makefile
@@ -16,24 +16,25 @@
help:
@echo "Please use \`make <target>' where <target> is one of"
- @echo " html to make standalone HTML files"
- @echo " dirhtml to make HTML files named index.html in directories"
- @echo " singlehtml to make a single large HTML file"
- @echo " pickle to make pickle files"
- @echo " json to make JSON files"
- @echo " htmlhelp to make HTML files and a HTML help project"
- @echo " qthelp to make HTML files and a qthelp project"
- @echo " devhelp to make HTML files and a Devhelp project"
- @echo " epub to make an epub"
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
- @echo " latexpdf to make LaTeX files and run them through pdflatex"
- @echo " text to make text files"
- @echo " man to make manual pages"
- @echo " changes to make an overview of all changed/added/deprecated items"
- @echo " linkcheck to check all external links for integrity"
- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
- @echo " clean to remove the build directory"
- @echo " fullclean to remove the build directory and autogenerated api docs"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+ @echo " clean to remove the build directory"
+ @echo " fullclean to remove the build directory and autogenerated api docs"
+ @echo " recipeclean to remove files produced by running the cookbook scripts"
clean:
-rm -rf $(BUILDDIR)/*
@@ -43,7 +44,7 @@
-rm -rf source/api/generated
recipeclean:
- -rm -f _temp/*.done source/cookbook/_static/*
+ -rm -rf _temp/*.done source/cookbook/_static/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
diff -r f27593283bcb0591fd00037c737303e2465f2374 -r abafe952a1085562c2c31e2cdfabc597a059f92d helper_scripts/run_recipes.sh
--- a/helper_scripts/run_recipes.sh
+++ b/helper_scripts/run_recipes.sh
@@ -1,7 +1,6 @@
ROOT=`pwd`
-if [ ! -e source/cookbook/_static ]
-then
+if [ ! -e source/cookbook/_static ]; then
mkdir source/cookbook/_static
fi
@@ -12,12 +11,18 @@
[ -e ${sb}.done ] && continue
echo ${sb}
python2.7 ${ROOT}/${s} --config serialize=false || exit
- for o in *.png *.txt *.h5 *.dat
+ for o in *.png *.txt *.h5 *.dat
do
- if [ -f ${o} ]; then
- mv -v ${ROOT}/_temp/${o} ${ROOT}/source/cookbook/_static/${sb%%.py}__${o}
- fi
+ if [ -f ${o} ]; then
+ mv -v ${ROOT}/_temp/${o} ${ROOT}/source/cookbook/_static/${sb%%.py}__${o}
+ fi
+ done
+ for o in LC LC_HM LC_U LR halo_analysis DD0046
+ do
+ if [ -d ${o} ]; then
+ mv -v ${ROOT}/_temp/${o} ${ROOT}/source/cookbook/_static/${sb%%.py}__`basename ${o}`
+ fi
done
touch ${sb}.done
echo ${sb}.done
-done
+done
\ No newline at end of file
https://bitbucket.org/yt_analysis/yt-doc/changeset/e852b412b638/
changeset: e852b412b638
user: ngoldbaum
date: 2012-07-28 23:22:34
summary: Updating some of the cookbook recipes to maximime prettyness.
affected #: 3 files
diff -r abafe952a1085562c2c31e2cdfabc597a059f92d -r e852b412b638afb17b22dbf2b50ce8a2960f7eef source/cookbook/aligned_cutting_plane.py
--- a/source/cookbook/aligned_cutting_plane.py
+++ b/source/cookbook/aligned_cutting_plane.py
@@ -6,7 +6,7 @@
# Create a 1 kpc radius sphere, centered on the max density. Note that this
# sphere is very small compared to the size of our final plot, and it has a
# non-axially aligned L vector.
-sp = pf.h.sphere("max", (1.0, "kpc"))
+sp = pf.h.sphere("max", (15.0, "kpc"))
# Get the angular momentum vector for the sphere.
L = sp.quantities["AngularMomentumVector"]()
@@ -14,5 +14,5 @@
print "Angular momentum vector: %s" % (L)
# Create an OffAxisSlicePlot on the object with the L vector as its normal
-p = OffAxisSlicePlot(pf, L, "Density", sp.center, (120, "kpc"))
+p = OffAxisSlicePlot(pf, L, "Density", sp.center, (25, "kpc"))
p.save()
diff -r abafe952a1085562c2c31e2cdfabc597a059f92d -r e852b412b638afb17b22dbf2b50ce8a2960f7eef source/cookbook/offaxis_projection.py
--- a/source/cookbook/offaxis_projection.py
+++ b/source/cookbook/offaxis_projection.py
@@ -6,13 +6,17 @@
# Choose a center for the render.
c = [0.5, 0.5, 0.5]
-# Choose a vector representing the viewing direction.
-L = [0.5, 0.2, 0.7]
+# Our image plane will be normal to some vector. For things like collapsing
+# objects, you could set it the way you would a cutting plane -- but for this
+# dataset, we'll just choose an off-axis value at random. This gets normalized
+# automatically.
+L = [0.5, 0.4, 0.7]
-# Our "width" is the width of the image plane as well as the depth -- so we set
-# it to be 0.4 so we don't get the cornering effect from seeing the domain
-# edge.
-W = 0.4
+# Our "width" is the width of the image plane as well as the depth.
+# The first element is the left to right width, the second is the
+# top-bottom width, and the last element is the back-to-front width
+# (all in code units)
+W = [0.04,0.04,0.4]
# The number of pixels along one side of the image.
# The final image will have Npixel^2 pixels.
@@ -21,7 +25,7 @@
# Create the off axis projection.
# Setting no_ghost to False speeds up the process, but makes a
# slighly lower quality image.
-image = off_axis_projection(pf, c, L, W, Npixels, "Density")
+image = off_axis_projection(pf, c, L, W, Npixels, "Density", no_ghost=False)
# Write out the final image and give it a name
# relating to what our dataset is called.
diff -r abafe952a1085562c2c31e2cdfabc597a059f92d -r e852b412b638afb17b22dbf2b50ce8a2960f7eef source/cookbook/offaxis_projection_colorbar.py
--- a/source/cookbook/offaxis_projection_colorbar.py
+++ b/source/cookbook/offaxis_projection_colorbar.py
@@ -12,15 +12,17 @@
# objects, you could set it the way you would a cutting plane -- but for this
# dataset, we'll just choose an off-axis value at random. This gets normalized
# automatically.
-L = [0.5, 0.2, 0.7]
+L = [0.5, 0.4, 0.7]
-# Our "width" is the width of the image plane as well as the depth -- so we set
-# it to be 0.8 so we get almost the whole domain. Note that corners may be
-# visible in the output image!
-W = 0.8
+# Our "width" is the width of the image plane as well as the depth.
+# The first element is the left to right width, the second is the
+# top-bottom width, and the last element is the back-to-front width
+# (all in code units)
+W = [0.04,0.04,0.4]
-# Now we decide how big an image we want. 512x512 should be sufficient.
-N = 512
+# The number of pixels along one side of the image.
+# The final image will have Npixel^2 pixels.
+Npixels = 512
# Now we call the off_axis_projection function, which handles the rest.
# Note that we set no_ghost equal to False, so that we *do* include ghost
@@ -29,9 +31,9 @@
# Also note that we set the field which we want to project as "Density", but
# really we could use any arbitrary field like "Temperature", "Metallicity"
# or whatever.
-image = off_axis_projection(pf, c, L, W, N, "Density", no_ghost=False)
+image = off_axis_projection(pf, c, L, W, Npixels, "Density", no_ghost=False)
# Image is now an NxN array representing the intensities of the various pixels.
# And now, we call our direct image saver. We save the log of the result.
-write_projection(image, "offaxis_projection_colorbar.png" % pf,
- colorbar_label="Column Density (cm$^{-2}$)", title="Title")
+write_projection(image, "offaxis_projection_colorbar.png",
+ colorbar_label="Column Density (cm$^{-2}$)")
Repository URL: https://bitbucket.org/yt_analysis/yt-doc/
--
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