[yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Mon Jul 30 09:23:24 PDT 2012
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/fcbf2d8e60f0/
changeset: fcbf2d8e60f0
branch: yt
user: MatthewTurk
date: 2012-07-30 15:54:01
summary: Updating README and install script.
affected #: 3 files
diff -r 31d1c069f5a6e880f68415c2bd738ee9eed86787 -r fcbf2d8e60f08767dcc4e7ce6bee45c812432698 README
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
Hi there! You've just downloaded yt, an analysis tool for astrophysical
-simulation datasets, generated by simulation platforms like Enzo, Orion,
-CASTRO, MAESTRO, ART and Ramses. It's written in python and heavily leverages
+simulation datasets, generated by simulation platforms like Enzo, Orion, FLASH,
+Nyx, MAESTRO, ART and Ramses. It's written in python and heavily leverages
both NumPy and Matplotlib for fast arrays and visualization, respectively.
Full documentation and a user community can be found at:
@@ -17,8 +17,7 @@
there are options available, but it should be straightforward.
In case of any problems, please email the yt-users mailing list, and if you're
-interested in helping out, see the developer documentation in
-doc/how_to_develop_yt.txt or at:
+interested in helping out, see the developer documentation:
http://yt-project.org/doc/advanced/developing.html
diff -r 31d1c069f5a6e880f68415c2bd738ee9eed86787 -r fcbf2d8e60f08767dcc4e7ce6bee45c812432698 doc/README
--- a/doc/README
+++ b/doc/README
@@ -12,10 +12,3 @@
in the build/ directory, as well as at:
http://yt-project.org/doc/index.html
-
-You can also download a copy of the documentation and unzip it right here:
-
-wget http://yt-project.org/doc/download.zip
-unzip download.zip
-
-Then open index.html with your favorite web browser, and be off!
diff -r 31d1c069f5a6e880f68415c2bd738ee9eed86787 -r fcbf2d8e60f08767dcc4e7ce6bee45c812432698 doc/install_script.sh
--- a/doc/install_script.sh
+++ b/doc/install_script.sh
@@ -728,31 +728,20 @@
echo "environment."
echo
echo " $ source $DEST_DIR/bin/activate"
- echo " (yt)$ "
echo
echo "This modifies the environment variables YT_DEST, PATH, PYTHONPATH, and"
- echo "LD_LIBRARY_PATH to match your new yt install. But don't worry - as soon"
- echo "as you are done you can run 'deactivate' to return to your previous"
- echo "shell environment. If you use csh, just append .csh to the above."
+ echo "LD_LIBRARY_PATH to match your new yt install. If you use csh, just"
+ echo "append .csh to the above."
echo
- echo "For interactive data analysis and visualization, we recommend running"
- echo "the IPython interface, which will become more fully featured with time:"
+ echo "To get started with yt, check out the orientation:"
echo
- echo " $DEST_DIR/bin/iyt"
+ echo " http://yt-project.org/doc/orientation/"
echo
- echo "For command line analysis run:"
+ echo "or just activate your environment and run 'yt serve' to bring up the"
+ echo "yt GUI."
echo
- echo " $DEST_DIR/bin/yt"
- echo
- echo "To bootstrap a development environment for yt, run:"
- echo
- echo " $DEST_DIR/bin/yt bootstrap_dev"
- echo
- echo "Note of interest: this installation will use the directory:"
+ echo "The source for yt is located at:"
echo " $YT_DIR"
- echo "as the source for all the YT code. This means you probably shouldn't"
- echo "delete it, but on the plus side, any changes you make there are"
- echo "automatically propagated."
if [ $INST_HG -eq 1 ]
then
echo
@@ -775,6 +764,9 @@
echo "For support, see the website and join the mailing list:"
echo
echo " http://yt-project.org/"
+ echo " http://yt-project.org/data/ (Sample data)"
+ echo " http://yt-project.org/doc/ (Docs)"
+ echo
echo " http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org"
echo
echo "========================================================================"
https://bitbucket.org/yt_analysis/yt/changeset/512ec2dec7bc/
changeset: 512ec2dec7bc
branch: yt
user: MatthewTurk
date: 2012-07-30 18:23:15
summary: Merge
affected #: 3 files
diff -r fcbf2d8e60f08767dcc4e7ce6bee45c812432698 -r 512ec2dec7bc8e857686c252ca77a9dca031f2d6 yt/funcs.py
--- a/yt/funcs.py
+++ b/yt/funcs.py
@@ -309,7 +309,8 @@
"""
maxval = max(maxval, 1)
from yt.config import ytcfg
- if ytcfg.getboolean("yt","suppressStreamLogging"):
+ if ytcfg.getboolean("yt", "suppressStreamLogging") or \
+ ytcfg.getboolean("yt", "ipython_notebook"):
return DummyProgressBar()
elif ytcfg.getboolean("yt", "__withinreason"):
from yt.gui.reason.extdirect_repl import ExtProgressBar
diff -r fcbf2d8e60f08767dcc4e7ce6bee45c812432698 -r 512ec2dec7bc8e857686c252ca77a9dca031f2d6 yt/visualization/image_writer.py
--- a/yt/visualization/image_writer.py
+++ b/yt/visualization/image_writer.py
@@ -135,7 +135,8 @@
Array of shape (N,M,3) or (N,M,4), to be written. If it is not already
a uint8 array, it will be scaled and converted to uint8.
filename : string
- Filename to save to
+ Filename to save to. If None, PNG contents will be returned as a
+ string.
max_val : float, optional
The upper limit to clip values to in the output, if converting to uint8.
If `bitmap_array` is already uint8, this will be ignore.
@@ -153,7 +154,10 @@
if transpose:
for channel in range(bitmap_array.shape[2]):
bitmap_array[:,:,channel] = bitmap_array[:,:,channel].T
- au.write_png(bitmap_array.copy(), filename)
+ if filename is not None:
+ au.write_png(bitmap_array.copy(), filename)
+ else:
+ return au.write_png_to_string(bitmap_array.copy())
return bitmap_array
def write_image(image, filename, color_bounds = None, cmap_name = "algae", func = lambda x: x):
diff -r fcbf2d8e60f08767dcc4e7ce6bee45c812432698 -r 512ec2dec7bc8e857686c252ca77a9dca031f2d6 yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -23,6 +23,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
"""
+import __builtin__
import numpy as na
from yt.funcs import *
@@ -381,18 +382,48 @@
if num_threads is None:
num_threads=get_num_threads()
image = self.new_image()
+ args = self.get_sampler_args(image)
+ sampler = self.get_sampler(args)
+ self.initialize_source()
+ image = self._render(double_check, num_threads, image, sampler)
+ self.save_image(fn, clip_ratio, image)
+ return image
- args = self.get_sampler_args(image)
+ def show(self, clip_ratio = None):
+ r"""This will take a snapshot and display the resultant image in the
+ IPython notebook.
- sampler = self.get_sampler(args)
+ If yt is being run from within an IPython session, and it is able to
+ determine this, this function will snapshot and send the resultant
+ image to the IPython notebook for display.
- self.initialize_source()
+ If yt can't determine if it's inside an IPython session, it will raise
+ YTNotInsideNotebook.
- image = self._render(double_check, num_threads, image, sampler)
+ Parameters
+ ----------
+ clip_ratio : float, optional
+ If supplied, the 'max_val' argument to write_bitmap will be handed
+ clip_ratio * image.std()
- self.save_image(fn, clip_ratio, image)
+ Examples
+ --------
- return image
+ >>> cam.show()
+
+ """
+ if "__IPYTHON__" in dir(__builtin__):
+ from IPython.core.displaypub import publish_display_data
+ image = self.snapshot()
+ if clip_ratio is not None: clip_ratio *= image.std()
+ data = write_bitmap(image, None, clip_ratio)
+ publish_display_data(
+ 'yt.visualization.volume_rendering.camera.Camera',
+ {'image/png' : data}
+ )
+ else:
+ raise YTNotInsideNotebook
+
def set_default_light_dir(self):
self.light_dir = [1.,1.,1.]
@@ -780,17 +811,11 @@
if num_threads is None:
num_threads=get_num_threads()
image = self.new_image()
-
args = self.get_sampler_args(image)
-
sampler = self.get_sampler(args)
-
self.volume.initialize_source()
-
image = self._render(double_check, num_threads, image, sampler)
-
self.save_image(fn, clim, image)
-
return image
def save_image(self, fn, clim, image):
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