[Yt-svn] yt: 3 new changesets

hg at spacepope.org hg at spacepope.org
Mon Feb 14 12:14:16 PST 2011


hg Repository: yt
details:   yt/rev/f8f55d808768
changeset: 3735:f8f55d808768
user:      Sam Skillman <sam.skillman at gmail.com>
date:
Fri Feb 11 17:52:26 2011 -0700
description:
Adding brick neighbor finding functions to the amr_kdtree.

hg Repository: yt
details:   yt/rev/439d85620bbc
changeset: 3736:439d85620bbc
user:      Sam Skillman <sam.skillman at gmail.com>
date:
Mon Feb 14 13:12:07 2011 -0700
description:
Removing kd_ray_cast and replacing with traverse to be more in line with the HomogenizedVolume.  This gets rid of the use_kd logic in snapshot.  Added brick_dimensions array to the AMRKDTree object that is initialized with initialize_source().  Added several helper functions to the AMRKDTree object: locate_brick, get_all_neighbor_bricks, get_all_neighbor_grids.  See the docstrings for more info.

hg Repository: yt
details:   yt/rev/ae93f5315ae1
changeset: 3737:ae93f5315ae1
user:      Sam Skillman <sam.skillman at gmail.com>
date:
Mon Feb 14 13:13:48 2011 -0700
description:
Merging.

diffstat:

 CREDITS                                               |    8 +-
 README                                                |   10 +-
 doc/README                                            |    4 +-
 doc/how_to_develop_yt.txt                             |    7 +
 doc/install_script.sh                                 |   14 +
 scripts/eyt                                           |  152 --------
 yt/astro_objects/api.py                               |   27 +
 yt/astro_objects/setup.py                             |   12 +
 yt/frontends/enzo/data_structures.py                  |   11 +
 yt/setup.py                                           |    1 +
 yt/utilities/amr_kdtree/amr_kdtree.py                 |  338 +++++++++++------
 yt/visualization/volume_rendering/camera.py           |   24 +-
 yt/visualization/volume_rendering/grid_partitioner.py |    2 +-
 13 files changed, 313 insertions(+), 297 deletions(-)

diffs (truncated from 837 to 300 lines):

diff -r a763d0bcb2df -r ae93f5315ae1 CREDITS
--- a/CREDITS	Thu Feb 10 10:09:48 2011 -0500
+++ b/CREDITS	Mon Feb 14 13:13:48 2011 -0700
@@ -17,7 +17,11 @@
 Enthought, the cmdln.py module by Trent Mick, and the progressbar module by
 Nilton Volpato.  The PasteBin interface code (as well as the PasteBin itself)
 was written by the Pocoo collective (pocoo.org).  The RamsesRead++ library was
-developed by Oliver Hahn.  Large parts of this code were guided by discussions
-with Tom Abel, Ralf Kaehler, Mike Norman and Greg Bryan.
+developed by Oliver Hahn.  yt also includes a slightly-modified version of
+libconfig (http://www.hyperrealm.com/libconfig/) and an unmodified version of
+several routines from HEALpix (http://healpix.jpl.nasa.gov/).
+
+Large parts of development of yt were guided by discussions with Tom Abel, Ralf
+Kaehler, Mike Norman and Greg Bryan.
 
 Thanks to everyone for all your contributions!
diff -r a763d0bcb2df -r ae93f5315ae1 README
--- a/README	Thu Feb 10 10:09:48 2011 -0500
+++ b/README	Mon Feb 14 13:13:48 2011 -0700
@@ -1,11 +1,13 @@
 Hi there!  You've just downloaded yt, an analysis tool for 3D Enzo adaptive
-mesh refinement datasets.  It's written in python and based on the NumPy and
-Matplotlib components.
+mesh refinement datasets.  It's written in python and heavily leverages both
+NumPy and Matplotlib for fast arrays and visualization, respectively.
 
-Full documentation is available online at http://yt.enzotools.org/ .
+Full documentation and a user community can be found at
+http://yt.enzotools.org/ .
 
 If you have used Python before, and are comfortable with installing packages,
-you should find the setup.py script fairly straightforward.
+you should find the setup.py script fairly straightforward: simply execute
+"python setup.py install".
 
 If you would rather a more automated installation, you can use the script
 doc/install_script.sh .  You will have to set the destination directory, and
diff -r a763d0bcb2df -r ae93f5315ae1 doc/README
--- a/doc/README	Thu Feb 10 10:09:48 2011 -0500
+++ b/doc/README	Mon Feb 14 13:13:48 2011 -0700
@@ -15,7 +15,7 @@
 
 You can also download a copy of the documentation and unzip it right here:
 
-wget http://yt.enzotools.org/doc/docs_html.zip
-unzip docs_html.zip
+wget http://yt.enzotools.org/doc/download.zip
+unzip download.zip
 
 Then open index.html with your favorite web browser, and be off!
diff -r a763d0bcb2df -r ae93f5315ae1 doc/how_to_develop_yt.txt
--- a/doc/how_to_develop_yt.txt	Thu Feb 10 10:09:48 2011 -0500
+++ b/doc/how_to_develop_yt.txt	Mon Feb 14 13:13:48 2011 -0700
@@ -74,6 +74,13 @@
       classes for data regions, covering grids, time series, and so on.  This
       also includes derived fields and derived quantities.
 
+   astro_objects
+      This is where all objects that represent astrophysical objects should
+      live -- for instance, galaxies, halos, disks, clusters and so on.  These
+      can be expressive, provide astrophysical analysis functionality and will
+      in general be more user-modifiable, user-tweakable, and much less of a
+      black box that data_objects.
+
    analysis_modules
       This is where all mechanisms for processing data live.  This includes
       things like clump finding, halo profiling, halo finding, and so on.  This
diff -r a763d0bcb2df -r ae93f5315ae1 doc/install_script.sh
--- a/doc/install_script.sh	Thu Feb 10 10:09:48 2011 -0500
+++ b/doc/install_script.sh	Mon Feb 14 13:13:48 2011 -0700
@@ -72,6 +72,7 @@
 {
     MYHOST=`hostname -s`  # just give the short one, not FQDN
     MYHOSTLONG=`hostname` # FQDN, for Ranger
+    MYOS=`uname -s`       # A guess at the OS
     if [ "${MYHOST##kraken}" != "${MYHOST}" ]
     then
         echo "Looks like you're on Kraken."
@@ -134,6 +135,19 @@
         echo "   $ module load gcc"
         echo
     fi
+    if [ "${MYOS##Darwin}" != "${MYOS}" ]
+    then
+        echo "Looks like you're running on Mac OSX."
+        echo
+        echo "NOTE: You may have problems if you are running OSX 10.6 (Snow"
+        echo "Leopard) or newer.  If you do, please set the following"
+        echo "environment variables, remove any broken installation tree, and"
+        echo "re-run this script verbatim."
+        echo
+        echo "$ export CC=gcc-4.2"
+        echo "$ export CXX=g++-4.2"
+        echo
+    fi
 }
 
 
diff -r a763d0bcb2df -r ae93f5315ae1 scripts/eyt
--- a/scripts/eyt	Thu Feb 10 10:09:48 2011 -0500
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-#!python
-
-from yt.mods import *
-import os
-namespace = locals().copy()
-
-doc = """\
-
-Welcome to Enzo-embedded yt!
-
-The different processors are accessible via the 'mec' variable.  To get grid
-data, try using the get_grid_field function.  When done, be sure to kill the
-processes with 'mec.kill()'!
-
-Information about the mec variable, an instance of MultiEngineClient, can be
-found in the IPython documentation:
-
-http://ipython.scipy.org/doc/manual/html/parallel/parallel_multiengine.html
-
-You can use the '%px' command to issue commands on all the engines
-simultaneously.
-
-"""
-
-import IPython.Shell
-
-if "DISPLAY" in os.environ:
-    try:
-        ip_shell = IPython.Shell.IPShellMatplotlibWX(user_ns=namespace)
-    except ImportError:
-        ip_shell = IPython.Shell.IPShellMatplotlib(user_ns=namespace)
-else:
-    ip_shell = IPython.Shell.IPShellMatplotlib(user_ns=namespace)
-
-ip = ip_shell.IP.getapi()
-
-import os   
-import glob
-import itertools
-
-ip = ip_shell.IP.getapi()
-ip.ex("from yt.mods import *")
-from IPython.kernel import client
-
-class YTClient(object):
-    mec = None
-
-    def __init__(self):
-        self.refresh()
-
-    def eval(self, varname, targets = None):
-        """
-        This function pulls anything from the remote host, but it will overwrite
-        any variable named __tmp.  This is to get around nested variables and
-        properties on the remote host.
-        """
-        self.mec.execute("__tmp = %s" % varname, targets=targets)
-        result = self.mec.pull("__tmp", targets=targets)
-        return result
-
-    def get_grid_field(self, grid_index, field_name, raw=False):
-        """
-        Return the numpy array representing a piece of field information.
-        Note that *grid_index* is the actual index into the array, which is ID-1.
-
-        If *raw* is set to True, then only raw original fields from the hierarchy
-        are returned.  This will include ghost zones, and derived fields are
-        inaccessible.
-        """
-        proc = int(self.enzo.hierarchy_information["GridProcs"][grid_index])
-        if not raw: # go through yt
-            result = self.eval("pf.h.grids[%s]['%s']" % (
-                        grid_index, field_name), [proc])[0]
-        else: # go through enzo module
-            result = self.eval("enzo.grid_data[%s + 1]['%s']" % (
-                        grid_index, field_name), [proc])[0].swapaxes(0,2)
-        return result
-
-    def refresh(self):
-        if self.mec is not None: self.mec.kill()
-        self.mec = client.MultiEngineClient()
-        self.mec.activate()
-        # there are some blocks in hierarchy instantiation, so
-        # we pre-instantiate
-        self.mec.execute("pf.h") 
-        self.enzo = enzo_module_proxy(self)
-        self.pf = EnzoStaticOutputProxy(ytc=self)
-        ip.to_user_ns(dict(
-            mec=self.mec, ytc=self, pf = self.pf))
-
-class enzo_module_proxy(object):
-    def __init__(self, ytc):
-        self.hierarchy_information = ytc.eval("enzo.hierarchy_information", [0])[0]
-        self.conversion_factors = ytc.eval("enzo.conversion_factors", [0])[0]
-        self.yt_parameter_file = ytc.eval("enzo.yt_parameter_file", [0])[0]
-
-from yt.lagos import EnzoStaticOutputInMemory, EnzoHierarchyInMemory
-from yt.lagos.HierarchyType import _data_style_funcs
-from yt.lagos.DataReadingFuncs import BaseDataQueue
-
-class EnzoHierarchyProxy(EnzoHierarchyInMemory):
-    _data_style = 'proxy'
-    def _setup_field_lists(self):
-        self.field_list = self.parameter_file.ytc.eval("pf.h.field_list", [0])[0]
-
-    def _obtain_enzo(self):
-        return self.parameter_file.ytc.enzo
-
-class EnzoStaticOutputProxy(EnzoStaticOutputInMemory):
-    _data_style = 'proxy'
-    _hierarchy_class = EnzoHierarchyProxy
-
-    def __init__(self, *args, **kwargs):
-        self.ytc = kwargs.pop("ytc")
-        EnzoStaticOutputInMemory.__init__(self, *args, **kwargs)
-
-    def _obtain_enzo(self):
-        return self.ytc.enzo
-
-def _read_proxy_slice(self, grid, field, axis, coord):
-    data = ytc.get_grid_field(grid.id - 1, field, raw=True)
-    sl = [slice(3,-3), slice(3,-3), slice(3,-3)]
-    sl[axis] = slice(coord + 3, coord + 4)
-    sl = tuple(reversed(sl))
-    return data[sl].swapaxes(0,2)
-
-class DataQueueProxy(BaseDataQueue):
-    def __init__(self, ghost_zones = 3):
-        self.my_slice = (slice(ghost_zones, -ghost_zones),
-                         slice(ghost_zones, -ghost_zones),
-                         slice(ghost_zones, -ghost_zones))
-        BaseDataQueue.__init__(self)
-
-    def _read_set(self, grid, field):
-        data = ytc.get_grid_field(grid.id - 1, field, raw=True)
-        return data[self.my_slice]
-
-    def modify(self, field):
-        return field.swapaxes(0,2)
-
-def proxy_exception(*args, **kwargs):
-    return KeyError
-
-# things like compare buffers over time
-
-_data_style_funcs['proxy'] = \
-    (None, None, None, _read_proxy_slice, proxy_exception, DataQueueProxy)
-
-ytc = YTClient()
-mec = ytc.mec
-
-ip_shell.mainloop(sys_exit=1,banner=doc)
diff -r a763d0bcb2df -r ae93f5315ae1 yt/astro_objects/api.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/yt/astro_objects/api.py	Mon Feb 14 13:13:48 2011 -0700
@@ -0,0 +1,27 @@
+"""
+API for yt.astro_objects
+
+Author: Matthew Turk <matthewturk at gmail.com>
+Affiliation: NSF / Columbia
+Homepage: http://yt.enzotools.org/
+License:
+  Copyright (C) 2011 Matthew Turk.  All Rights Reserved.
+
+  This file is part of yt.
+
+  yt is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 3 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+"""
+
+# Nothing here yet!
diff -r a763d0bcb2df -r ae93f5315ae1 yt/astro_objects/setup.py
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/yt/astro_objects/setup.py	Mon Feb 14 13:13:48 2011 -0700
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+import setuptools
+import os, sys, os.path
+
+import os.path
+
+def configuration(parent_package='',top_path=None):
+    from numpy.distutils.misc_util import Configuration
+    config = Configuration('astro_objects',parent_package,top_path)
+    config.make_config_py() # installs __config__.py



More information about the yt-svn mailing list