[yt-svn] commit/yt: 12 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Fri Mar 28 09:54:22 PDT 2014


12 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/aea6622c91a8/
Changeset:   aea6622c91a8
Branch:      yt-3.0
User:        BW Keller
Date:        2014-03-25 17:10:06
Summary:     Bounding box for tipsy files is now read in automatically from the parameter file
Affected #:  1 file

diff -r ca4e20b9b0dbf496a2891025096067e253604dab -r aea6622c91a87e4c44036f24c7cd3b0404b2a1a8 yt/frontends/sph/data_structures.py
--- a/yt/frontends/sph/data_structures.py
+++ b/yt/frontends/sph/data_structures.py
@@ -369,8 +369,6 @@
 
     def __init__(self, filename, dataset_type="tipsy",
                  field_dtypes=None,
-                 domain_left_edge=None,
-                 domain_right_edge=None,
                  unit_base=None,
                  cosmology_parameters=None,
                  parameter_file=None,
@@ -379,13 +377,6 @@
         self.over_refine_factor = over_refine_factor
         self.endian = self._validate_header(filename)[1]
         self.storage_filename = None
-        if domain_left_edge is None:
-            domain_left_edge = np.zeros(3, "float64") - 0.5
-        if domain_right_edge is None:
-            domain_right_edge = np.zeros(3, "float64") + 0.5
-
-        self.domain_left_edge = np.array(domain_left_edge, dtype="float64")
-        self.domain_right_edge = np.array(domain_right_edge, dtype="float64")
 
         # My understanding is that dtypes are set on a field by field basis,
         # not on a (particle type, field) basis
@@ -421,6 +412,7 @@
         self.refine_by = 2
         self.parameters["HydroMethod"] = "sph"
 
+
         self.unique_identifier = \
             int(os.stat(self.parameter_filename)[stat.ST_CTIME])
 
@@ -457,6 +449,8 @@
         self.domain_dimensions = np.ones(3, "int32") * nz
         if self.parameters.get('bPeriodic', True):
             self.periodicity = (True, True, True)
+            self.domain_left_edge = np.zeros(3, "float64") - 0.5*self.parameters.get('dPeriod', 1)
+            self.domain_right_edge = np.zeros(3, "float64") + 0.5*self.parameters.get('dPeriod', 1)
         else:
             self.periodicity = (False, False, False)
         tot = sum(self.parameters[ptype] for ptype


https://bitbucket.org/yt_analysis/yt/commits/e1bb343b7661/
Changeset:   e1bb343b7661
Branch:      yt-3.0
User:        BW Keller
Date:        2014-03-25 17:15:40
Summary:     Merged experimental
Affected #:  1 file

diff -r aea6622c91a87e4c44036f24c7cd3b0404b2a1a8 -r e1bb343b7661e1b36a85dec2dbdf93437c5c2af4 yt/frontends/boxlib/data_structures.py
--- a/yt/frontends/boxlib/data_structures.py
+++ b/yt/frontends/boxlib/data_structures.py
@@ -177,7 +177,7 @@
             if self.dimensionality < 3:
                 dx[i].append(DRE[2] - DLE[1])
         self.level_dds = np.array(dx, dtype="float64")
-        coordinate_type = int(header_file.next())
+        header_file.next()
         if self.pf.geometry == "cartesian":
             default_ybounds = (0.0, 1.0)
             default_zbounds = (0.0, 1.0)
@@ -580,7 +580,11 @@
         header_file.readline()
         self._header_mesh_start = header_file.tell()
         header_file.next()
-        coordinate_type = int(header_file.next())
+        next_line = header_file.next()
+        if len(next_line.split()) == 1:
+            coordinate_type = int(next_line)
+        else:
+            coordinate_type = 0
         if coordinate_type == 0:
             self.geometry = "cartesian"
         elif coordinate_type == 1:


https://bitbucket.org/yt_analysis/yt/commits/74ba48187af7/
Changeset:   74ba48187af7
Branch:      yt-3.0
User:        BW Keller
Date:        2014-03-25 17:23:38
Summary:     Moved read error check from being manually checked in
_parse_parameters to using _validate_header for tipsy files.
Checking something twice with slightly different methods is
ASKING for bugs.
Affected #:  1 file

diff -r e1bb343b7661e1b36a85dec2dbdf93437c5c2af4 -r 74ba48187af77fd0be32f1faac81f8f1b3bbe872 yt/frontends/sph/data_structures.py
--- a/yt/frontends/sph/data_structures.py
+++ b/yt/frontends/sph/data_structures.py
@@ -375,7 +375,18 @@
                  n_ref=64, over_refine_factor=1):
         self.n_ref = n_ref
         self.over_refine_factor = over_refine_factor
-        self.endian = self._validate_header(filename)[1]
+        success, self.endian = self._validate_header(filename)
+        if not success:
+            print "SOMETHING HAS GONE WRONG.  NBODIES != SUM PARTICLES."
+            print "%s != (%s == %s + %s + %s)" % (
+                self.parameters['nbodies'],
+                tot,
+                self.parameters['nsph'],
+                self.parameters['ndark'],
+                self.parameters['nstar'])
+            print "Often this can be fixed by changing the 'endian' parameter."
+            print "This defaults to '>' but may in fact be '<'."
+            raise RuntimeError
         self.storage_filename = None
 
         # My understanding is that dtypes are set on a field by field basis,
@@ -453,19 +464,6 @@
             self.domain_right_edge = np.zeros(3, "float64") + 0.5*self.parameters.get('dPeriod', 1)
         else:
             self.periodicity = (False, False, False)
-        tot = sum(self.parameters[ptype] for ptype
-                  in ('nsph', 'ndark', 'nstar'))
-        if tot != self.parameters['nbodies']:
-            print "SOMETHING HAS GONE WRONG.  NBODIES != SUM PARTICLES."
-            print "%s != (%s == %s + %s + %s)" % (
-                self.parameters['nbodies'],
-                tot,
-                self.parameters['nsph'],
-                self.parameters['ndark'],
-                self.parameters['nstar'])
-            print "Often this can be fixed by changing the 'endian' parameter."
-            print "This defaults to '>' but may in fact be '<'."
-            raise RuntimeError
         if self.parameters.get('bComove', False):
             self.cosmological_simulation = 1
             cosm = self._cosmology_parameters or {}


https://bitbucket.org/yt_analysis/yt/commits/1cdfb754f637/
Changeset:   1cdfb754f637
Branch:      yt-3.0
User:        BW Keller
Date:        2014-03-25 18:29:20
Summary:     Tipsy files that are non-periodic now autodetect domain boundaries
based on the most distant particle (a bounding cube with side length
2* maximum particle distance).
Affected #:  2 files

diff -r 74ba48187af77fd0be32f1faac81f8f1b3bbe872 -r 1cdfb754f6376dcb45d0d19071058f5aac7a15c9 yt/frontends/sph/data_structures.py
--- a/yt/frontends/sph/data_structures.py
+++ b/yt/frontends/sph/data_structures.py
@@ -351,6 +351,7 @@
         assert file_id == 0
         super(TipsyFile, self).__init__(pf, io, filename, file_id)
         io._create_dtypes(self)
+        io._update_domain(self)
 
 
 class TipsyDataset(ParticleDataset):
@@ -464,6 +465,8 @@
             self.domain_right_edge = np.zeros(3, "float64") + 0.5*self.parameters.get('dPeriod', 1)
         else:
             self.periodicity = (False, False, False)
+            self.domain_left_edge = 0
+            self.domain_right_edge = 0
         if self.parameters.get('bComove', False):
             self.cosmological_simulation = 1
             cosm = self._cosmology_parameters or {}

diff -r 74ba48187af77fd0be32f1faac81f8f1b3bbe872 -r 1cdfb754f6376dcb45d0d19071058f5aac7a15c9 yt/frontends/sph/io.py
--- a/yt/frontends/sph/io.py
+++ b/yt/frontends/sph/io.py
@@ -528,6 +528,33 @@
                     yield (ptype, field), tf.pop(field)
             f.close()
 
+    def _update_domain(self, data_file):
+        pf = data_file.pf
+        ind = 0
+        if pf.domain_left_edge != 0 and pf.domain_right_edge != 0:
+            return
+        with open(data_file.filename, "rb") as f:
+            f.seek(pf._header_offset)
+            for iptype, ptype in enumerate(self._ptypes):
+                # We'll just add the individual types separately
+                count = data_file.total_particles[ptype]
+                if count == 0: continue
+                start, stop = ind, ind + count
+                while ind < stop:
+                    c = min(CHUNKSIZE, stop - ind)
+                    pp = np.fromfile(f, dtype = self._pdtypes[ptype],
+                                     count = c)
+                    for ax in 'xyz':
+                        mi = pp["Coordinates"][ax].min()
+                        ma = pp["Coordinates"][ax].max()
+                        outlier = YTArray(np.max(np.abs((mi,ma))), 'code_length')
+                    if outlier > pf.domain_right_edge or -outlier < pf.domain_left_edge:
+                        pf.domain_left_edge = -outlier
+                        pf.domain_right_edge = outlier
+                    ind += c
+        pf.domain_left_edge = np.ones(3)*pf.domain_left_edge
+        pf.domain_right_edge = np.ones(3)*pf.domain_right_edge
+
     def _initialize_index(self, data_file, regions):
         pf = data_file.pf
         morton = np.empty(sum(data_file.total_particles.values()),


https://bitbucket.org/yt_analysis/yt/commits/19e3de489903/
Changeset:   19e3de489903
Branch:      yt-3.0
User:        BW Keller
Date:        2014-03-25 18:53:15
Summary:     Forgot to update domain_width... oops.
Affected #:  1 file

diff -r 1cdfb754f6376dcb45d0d19071058f5aac7a15c9 -r 19e3de48990373779ac3f5253e22e83b85f12ded yt/frontends/sph/io.py
--- a/yt/frontends/sph/io.py
+++ b/yt/frontends/sph/io.py
@@ -554,6 +554,7 @@
                     ind += c
         pf.domain_left_edge = np.ones(3)*pf.domain_left_edge
         pf.domain_right_edge = np.ones(3)*pf.domain_right_edge
+        pf.domain_width = np.ones(3)*2*pf.domain_right_edge
 
     def _initialize_index(self, data_file, regions):
         pf = data_file.pf


https://bitbucket.org/yt_analysis/yt/commits/ba220975b9b7/
Changeset:   ba220975b9b7
Branch:      yt-3.0
User:        BW Keller
Date:        2014-03-25 18:53:32
Summary:     Merged...
Affected #:  12 files

diff -r 19e3de48990373779ac3f5253e22e83b85f12ded -r ba220975b9b7aa2be8a3d577999fd4341d5afe0d yt/__init__.py
--- a/yt/__init__.py
+++ b/yt/__init__.py
@@ -74,25 +74,84 @@
 
 __version__ = "3.0-dev"
 
-def run_nose(verbose=False, run_answer_tests=False, answer_big_data=False):
-    import nose, os, sys
-    from yt.config import ytcfg
-    nose_argv = sys.argv
-    nose_argv += ['--exclude=answer_testing','--detailed-errors']
-    if verbose:
-        nose_argv.append('-v')
-    if run_answer_tests:
-        nose_argv.append('--with-answer-testing')
-    if answer_big_data:
-        nose_argv.append('--answer-big-data')
-    log_suppress = ytcfg.getboolean("yt","suppressStreamLogging")
-    ytcfg.set("yt","suppressStreamLogging", 'True')
-    initial_dir = os.getcwd()
-    yt_file = os.path.abspath(__file__)
-    yt_dir = os.path.dirname(yt_file)
-    os.chdir(yt_dir)
-    try:
-        nose.run(argv=nose_argv)
-    finally:
-        os.chdir(initial_dir)
-        ytcfg.set("yt","suppressStreamLogging", str(log_suppress))
+# First module imports
+import numpy as np # For modern purposes
+import numpy # In case anyone wishes to use it by name
+
+from yt.funcs import \
+    iterable, \
+    get_memory_usage, \
+    print_tb, \
+    rootonly, \
+    insert_ipython, \
+    get_pbar, \
+    only_on_root, \
+    is_root, \
+    get_version_stack, \
+    get_yt_supp, \
+    get_yt_version, \
+    parallel_profile, \
+    enable_plugins, \
+    memory_checker, \
+    deprecated_class
+from yt.utilities.logger import ytLogger as mylog
+
+import yt.utilities.physical_constants as physical_constants
+import yt.units as units
+from yt.units.yt_array import YTArray, YTQuantity
+
+from yt.fields.api import \
+    field_plugins, \
+    DerivedField, \
+    FieldDetector, \
+    FieldInfoContainer, \
+    ValidateParameter, \
+    ValidateDataField, \
+    ValidateProperty, \
+    ValidateSpatial, \
+    ValidateGridType, \
+    add_field, \
+    derived_field
+
+from yt.data_objects.api import \
+    BinnedProfile1D, BinnedProfile2D, BinnedProfile3D, \
+    DatasetSeries, \
+    ImageArray, particle_filter, create_profile, \
+    Profile1D, Profile2D, Profile3D
+
+from yt.frontends.api import _frontend_container
+frontends = _frontend_container()
+
+from yt.frontends.stream.api import \
+    load_uniform_grid, load_amr_grids, \
+    load_particles, load_hexahedral_mesh, load_octree
+
+# For backwards compatibility
+GadgetDataset = frontends.sph.GadgetDataset
+GadgetStaticOutput = deprecated_class(GadgetDataset)
+TipsyDataset = frontends.sph.TipsyDataset
+TipsyStaticOutput = deprecated_class(TipsyDataset)
+
+# Now individual component imports from the visualization API
+from yt.visualization.api import \
+    PlotCollection, PlotCollectionInteractive, \
+    get_multi_plot, FixedResolutionBuffer, ObliqueFixedResolutionBuffer, \
+    write_bitmap, write_image, \
+    apply_colormap, scale_image, write_projection, \
+    SlicePlot, AxisAlignedSlicePlot, OffAxisSlicePlot, \
+    ProjectionPlot, OffAxisProjectionPlot, \
+    show_colormaps, ProfilePlot, PhasePlot
+
+from yt.visualization.volume_rendering.api import \
+    off_axis_projection
+
+from yt.utilities.parallel_tools.parallel_analysis_interface import \
+    parallel_objects, enable_parallelism
+
+from yt.convenience import \
+    load, simulation
+
+# Import some helpful math utilities
+from yt.utilities.math_utils import \
+    ortho_find, quartiles, periodic_position
+

diff -r 19e3de48990373779ac3f5253e22e83b85f12ded -r ba220975b9b7aa2be8a3d577999fd4341d5afe0d yt/analysis_modules/hierarchy_subset/setup.py
--- a/yt/analysis_modules/hierarchy_subset/setup.py
+++ b/yt/analysis_modules/hierarchy_subset/setup.py
@@ -7,7 +7,7 @@
 
 def configuration(parent_package='', top_path=None):
     from numpy.distutils.misc_util import Configuration
-    config = Configuration('index_subset', parent_package, top_path)
+    config = Configuration('hierarchy_subset', parent_package, top_path)
     config.make_config_py()  # installs __config__.py
     #config.make_svn_version_py()
     return config

diff -r 19e3de48990373779ac3f5253e22e83b85f12ded -r ba220975b9b7aa2be8a3d577999fd4341d5afe0d yt/frontends/api.py
--- a/yt/frontends/api.py
+++ b/yt/frontends/api.py
@@ -12,3 +12,29 @@
 #
 # The full license is in the file COPYING.txt, distributed with this software.
 #-----------------------------------------------------------------------------
+
+import sys, types, os, glob, cPickle, time, importlib
+
+_frontends = [
+    'art',
+    'artio',
+    'athena',
+    'boxlib',
+    'chombo',
+    'enzo',
+    'fits',
+    'flash',
+    'gdf',
+    'halo_catalogs',
+    'moab',
+    #'pluto',
+    'ramses',
+    'sph',
+    'stream',
+]
+
+class _frontend_container:
+    def __init__(self):
+        for frontend in _frontends:
+            _mod = "yt.frontends.%s.api" % frontend
+            setattr(self, frontend, importlib.import_module(_mod))

diff -r 19e3de48990373779ac3f5253e22e83b85f12ded -r ba220975b9b7aa2be8a3d577999fd4341d5afe0d yt/funcs.py
--- a/yt/funcs.py
+++ b/yt/funcs.py
@@ -727,3 +727,14 @@
         return cls(*args, **kwargs)
     return _func
     
+def enable_plugins():
+    from yt.config import ytcfg
+    my_plugin_name = ytcfg.get("yt","pluginfilename")
+    # We assume that it is with respect to the $HOME/.yt directory
+    if os.path.isfile(my_plugin_name):
+        _fn = my_plugin_name
+    else:
+        _fn = os.path.expanduser("~/.yt/%s" % my_plugin_name)
+    if os.path.isfile(_fn):
+        mylog.info("Loading plugins from %s", _fn)
+        execfile(_fn)

diff -r 19e3de48990373779ac3f5253e22e83b85f12ded -r ba220975b9b7aa2be8a3d577999fd4341d5afe0d yt/mods.py
--- a/yt/mods.py
+++ b/yt/mods.py
@@ -20,11 +20,8 @@
 # ALL IMPORTS GO HERE
 #
 
-# First module imports
-import sys, types, os, glob, cPickle, time
-import numpy as na # For historical reasons
-import numpy as np # For modern purposes
-import numpy # In case anyone wishes to use it by name
+import os
+from yt import *
 
 # This next item will handle most of the actual startup procedures, but it will
 # also attempt to parse the command line and set up the global state of various
@@ -35,13 +32,7 @@
 import yt.startup_tasks as __startup_tasks
 unparsed_args = __startup_tasks.unparsed_args
 
-from yt.funcs import *
-from yt.utilities.logger import ytLogger as mylog
-from yt.utilities.performance_counters import yt_counters, time_function
 from yt.config import ytcfg, ytcfg_defaults
-import yt.utilities.physical_constants as physical_constants
-import yt.units as units
-from yt.units.yt_array import YTArray, YTQuantity
 
 from yt.utilities.logger import level as __level
 if __level >= int(ytcfg_defaults["loglevel"]):
@@ -49,134 +40,6 @@
     mylog.debug("Turning off NumPy error reporting")
     np.seterr(all = 'ignore')
 
-from yt.fields.api import \
-    field_plugins, \
-    DerivedField, \
-    FieldDetector, \
-    FieldInfoContainer, \
-    ValidateParameter, \
-    ValidateDataField, \
-    ValidateProperty, \
-    ValidateSpatial, \
-    ValidateGridType, \
-    add_field, \
-    derived_field
-
-from yt.data_objects.api import \
-    BinnedProfile1D, BinnedProfile2D, BinnedProfile3D, \
-    data_object_registry, \
-    DatasetSeries, AnalysisTask, analysis_task, \
-    ImageArray, particle_filter, create_profile, \
-    Profile1D, Profile2D, Profile3D
-
-from yt.frontends.enzo.api import \
-    EnzoDataset, EnzoDatasetInMemory, \
-    EnzoSimulation, EnzoFieldInfo, add_enzo_field
-
-# Boxlib stuff
-from yt.frontends.boxlib.api import \
-    BoxlibDataset
-
-# Orion stuff
-#from yt.frontends.boxlib.api import \
-#    OrionDataset, OrionFieldInfo, add_orion_field
-
-# Maestro stuff
-#from yt.frontends.boxlib.api import \
-#    MaestroDataset
-
-# Castro stuff
-#from yt.frontends.boxlib.api import \
-#    CastroDataset
-
-from yt.frontends.flash.api import \
-    FLASHDataset, FLASHFieldInfo
-
-from yt.frontends.artio.api import \
-    ARTIODataset, ARTIOFieldInfo
-
-from yt.frontends.ramses.api import \
-    RAMSESDataset, RAMSESFieldInfo
-
-from yt.frontends.halo_catalogs.api import \
-    HaloCatalogDataset, HaloCatalogFieldInfo, \
-    RockstarDataset, RockstarFieldInfo
-
-from yt.frontends.chombo.api import \
-    ChomboDataset, ChomboFieldInfo, add_chombo_field
-
-from yt.frontends.gdf.api import \
-    GDFDataset, GDFFieldInfo, add_gdf_field
-
-from yt.frontends.moab.api import \
-    MoabHex8Dataset, MoabFieldInfo, \
-    PyneMoabHex8Dataset, PyneFieldInfo
-
-from yt.frontends.athena.api import \
-    AthenaDataset, AthenaFieldInfo
-
-from yt.frontends.art.api import \
-    ARTDataset, ARTFieldInfo
-
-#from yt.frontends.pluto.api import \
-#     PlutoDataset, PlutoFieldInfo, add_pluto_field
-
-from yt.frontends.stream.api import \
-    StreamDataset, \
-    StreamHandler, load_uniform_grid, load_amr_grids, \
-    load_particles, load_hexahedral_mesh, load_octree
-
-from yt.frontends.sph.api import \
-    OWLSDataset, SPHFieldInfo, \
-    GadgetDataset, GadgetHDF5Dataset, \
-    TipsyDataset
-
-# For backwards compatibility
-GadgetStaticOutput = deprecated_class(GadgetDataset)
-TipsyStaticOutput = deprecated_class(TipsyDataset)
-
-#from yt.analysis_modules.list_modules import \
-#    get_available_modules, amods
-#available_analysis_modules = get_available_modules()
-
-from yt.frontends.fits.api import \
-    FITSDataset, FITSFieldInfo
-
-# Import our analysis modules
-from yt.analysis_modules.halo_finding.api import \
-    HaloFinder
-
-from yt.utilities.definitions import \
-    axis_names, x_dict, y_dict, inv_axis_names
-
-# Now individual component imports from the visualization API
-from yt.visualization.api import \
-    PlotCollection, PlotCollectionInteractive, \
-    get_multi_plot, FixedResolutionBuffer, ObliqueFixedResolutionBuffer, \
-    callback_registry, write_bitmap, write_image, \
-    apply_colormap, scale_image, write_projection, \
-    SlicePlot, AxisAlignedSlicePlot, OffAxisSlicePlot, \
-    ProjectionPlot, OffAxisProjectionPlot, \
-    show_colormaps, ProfilePlot, PhasePlot
-
-from yt.visualization.volume_rendering.api import \
-    ColorTransferFunction, PlanckTransferFunction, ProjectionTransferFunction, \
-    Camera, off_axis_projection, MosaicFisheyeCamera
-
-from yt.utilities.parallel_tools.parallel_analysis_interface import \
-    parallel_objects
-
-for name, cls in callback_registry.items():
-    exec("%s = cls" % name)
-
-from yt.convenience import \
-    load, projload, simulation
-
-# Import some helpful math utilities
-from yt.utilities.math_utils import \
-    ortho_find, quartiles, periodic_position
-
-
 # We load plugins.  Keep in mind, this can be fairly dangerous -
 # the primary purpose is to allow people to have a set of functions
 # that get used every time that they don't have to *define* every time.
@@ -184,12 +47,4 @@
 # Unfortunately, for now, I think the easiest and simplest way of doing
 # this is also the most dangerous way.
 if ytcfg.getboolean("yt","loadfieldplugins"):
-    my_plugin_name = ytcfg.get("yt","pluginfilename")
-    # We assume that it is with respect to the $HOME/.yt directory
-    if os.path.isfile(my_plugin_name):
-        _fn = my_plugin_name
-    else:
-        _fn = os.path.expanduser("~/.yt/%s" % my_plugin_name)
-    if os.path.isfile(_fn):
-        mylog.info("Loading plugins from %s", _fn)
-        execfile(_fn)
+    enable_plugins()

diff -r 19e3de48990373779ac3f5253e22e83b85f12ded -r ba220975b9b7aa2be8a3d577999fd4341d5afe0d yt/startup_tasks.py
--- a/yt/startup_tasks.py
+++ b/yt/startup_tasks.py
@@ -24,29 +24,18 @@
 exe_name = os.path.basename(sys.executable)
 # At import time, we determined whether or not we're being run in parallel.
 def turn_on_parallelism():
+    parallel_capable = False
     try:
         from mpi4py import MPI
     except ImportError as e:
         mylog.error("Warning: Attempting to turn on parallelism, " +
                     "but mpi4py import failed. Try pip install mpi4py.")
         raise e
-    parallel_capable = (MPI.COMM_WORLD.size > 1)
-    if parallel_capable:
-        mylog.info("Global parallel computation enabled: %s / %s",
-                   MPI.COMM_WORLD.rank, MPI.COMM_WORLD.size)
-        ytcfg["yt","__global_parallel_rank"] = str(MPI.COMM_WORLD.rank)
-        ytcfg["yt","__global_parallel_size"] = str(MPI.COMM_WORLD.size)
-        ytcfg["yt","__parallel"] = "True"
-        if exe_name == "embed_enzo" or \
-            ("_parallel" in dir(sys) and sys._parallel == True):
-            ytcfg["yt","inline"] = "True"
-        # I believe we do not need to turn this off manually
-        #ytcfg["yt","StoreParameterFiles"] = "False"
-        # Now let's make sure we have the right options set.
-        if MPI.COMM_WORLD.rank > 0:
-            if ytcfg.getboolean("yt","LogFile"):
-                ytcfg["yt","LogFile"] = "False"
-                yt.utilities.logger.disable_file_logging()
+        # Now we have to turn on the parallelism from the perspective of the
+        # parallel_analysis_interface
+    from yt.utilities.parallel_tools.parallel_analysis_interface import \
+        enable_parallelism
+    parallel_capable = enable_parallelism()
     return parallel_capable
 
 # This fallback is for Paraview:

diff -r 19e3de48990373779ac3f5253e22e83b85f12ded -r ba220975b9b7aa2be8a3d577999fd4341d5afe0d yt/testing.py
--- a/yt/testing.py
+++ b/yt/testing.py
@@ -624,3 +624,25 @@
         return _func
     return compare_results(func)
 
+def run_nose(verbose=False, run_answer_tests=False, answer_big_data=False):
+    import nose, os, sys, yt
+    from yt.funcs import mylog
+    orig_level = mylog.getEffectiveLevel()
+    mylog.setLevel(50)
+    nose_argv = sys.argv
+    nose_argv += ['--exclude=answer_testing','--detailed-errors']
+    if verbose:
+        nose_argv.append('-v')
+    if run_answer_tests:
+        nose_argv.append('--with-answer-testing')
+    if answer_big_data:
+        nose_argv.append('--answer-big-data')
+    initial_dir = os.getcwd()
+    yt_file = os.path.abspath(yt.__file__)
+    yt_dir = os.path.dirname(yt_file)
+    os.chdir(yt_dir)
+    try:
+        nose.run(argv=nose_argv)
+    finally:
+        os.chdir(initial_dir)
+        mylog.setLevel(orig_level)

diff -r 19e3de48990373779ac3f5253e22e83b85f12ded -r ba220975b9b7aa2be8a3d577999fd4341d5afe0d yt/utilities/lib/setup.py
--- a/yt/utilities/lib/setup.py
+++ b/yt/utilities/lib/setup.py
@@ -2,8 +2,6 @@
 import setuptools
 import os, sys, os.path, glob, \
     tempfile, subprocess, shutil
-from yt.utilities.setup import \
-    check_for_dependencies
 
 def check_for_openmp():
     # Create a temporary directory

diff -r 19e3de48990373779ac3f5253e22e83b85f12ded -r ba220975b9b7aa2be8a3d577999fd4341d5afe0d yt/utilities/parallel_tools/parallel_analysis_interface.py
--- a/yt/utilities/parallel_tools/parallel_analysis_interface.py
+++ b/yt/utilities/parallel_tools/parallel_analysis_interface.py
@@ -33,9 +33,39 @@
 
 parallel_capable = ytcfg.getboolean("yt", "__parallel")
 
+dtype_names = dict(
+        float32 = "MPI.FLOAT",
+        float64 = "MPI.DOUBLE",
+        int32   = "MPI.INT",
+        int64   = "MPI.LONG",
+        c       = "MPI.CHAR",
+)
+op_names = dict(
+        sum = "MPI.SUM",
+        min = "MPI.MIN",
+        max = "MPI.MAX"
+)
+
 # Set up translation table and import things
-if parallel_capable:
+
+exe_name = os.path.basename(sys.executable)
+def enable_parallelism():
+    global parallel_capable
     from mpi4py import MPI
+    parallel_capable = (MPI.COMM_WORLD.size > 1)
+    if not parallel_capable: return False
+    mylog.info("Global parallel computation enabled: %s / %s",
+               MPI.COMM_WORLD.rank, MPI.COMM_WORLD.size)
+    ytcfg["yt","__global_parallel_rank"] = str(MPI.COMM_WORLD.rank)
+    ytcfg["yt","__global_parallel_size"] = str(MPI.COMM_WORLD.size)
+    ytcfg["yt","__parallel"] = "True"
+    if exe_name == "embed_enzo" or \
+        ("_parallel" in dir(sys) and sys._parallel == True):
+        ytcfg["yt","inline"] = "True"
+    if MPI.COMM_WORLD.rank > 0:
+        if ytcfg.getboolean("yt","LogFile"):
+            ytcfg["yt","LogFile"] = "False"
+            yt.utilities.logger.disable_file_logging()
     yt.utilities.logger.uncolorize_logging()
     # Even though the uncolorize function already resets the format string,
     # we reset it again so that it includes the processor.
@@ -48,32 +78,19 @@
     if ytcfg.getint("yt","LogLevel") < 20:
         yt.utilities.logger.ytLogger.warning(
           "Log Level is set low -- this could affect parallel performance!")
-    dtype_names = dict(
+    dtype_names.update(dict(
             float32 = MPI.FLOAT,
             float64 = MPI.DOUBLE,
             int32   = MPI.INT,
             int64   = MPI.LONG,
             c       = MPI.CHAR,
-    )
-    op_names = dict(
+    ))
+    op_names.update(dict(
         sum = MPI.SUM,
         min = MPI.MIN,
         max = MPI.MAX
-    )
-
-else:
-    dtype_names = dict(
-            float32 = "MPI.FLOAT",
-            float64 = "MPI.DOUBLE",
-            int32   = "MPI.INT",
-            int64   = "MPI.LONG",
-            c       = "MPI.CHAR",
-    )
-    op_names = dict(
-            sum = "MPI.SUM",
-            min = "MPI.MIN",
-            max = "MPI.MAX"
-    )
+    ))
+    return True
 
 # Because the dtypes will == correctly but do not hash the same, we need this
 # function for dictionary access.

diff -r 19e3de48990373779ac3f5253e22e83b85f12ded -r ba220975b9b7aa2be8a3d577999fd4341d5afe0d yt/visualization/color_maps.py
--- a/yt/visualization/color_maps.py
+++ b/yt/visualization/color_maps.py
@@ -11,6 +11,7 @@
 # The full license is in the file COPYING.txt, distributed with this software.
 #-----------------------------------------------------------------------------
 import numpy as np
+from itertools import izip
 
 import matplotlib
 import matplotlib.colors as cc
@@ -82,9 +83,9 @@
                 194.5*_vs**2.88+99.72*np.exp(-77.24*(_vs-0.742)**2.0)
               + 45.40*_vs**0.089+10.0)/255.0
 
-cdict = {'red':zip(_vs,_kamae_red,_kamae_red),
-         'green':zip(_vs,_kamae_grn,_kamae_grn),
-         'blue':zip(_vs,_kamae_blu,_kamae_blu)}
+cdict = {'red':izip(_vs,_kamae_red,_kamae_red),
+         'green':izip(_vs,_kamae_grn,_kamae_grn),
+         'blue':izip(_vs,_kamae_blu,_kamae_blu)}
 add_cmap('kamae', cdict)
 
 # This one is a simple black & green map
@@ -147,9 +148,9 @@
 _vs = np.linspace(0,1,255)
 for k,v in _cm.color_map_luts.iteritems():
     if k not in yt_colormaps and k not in mcm.cmap_d:
-        cdict = { 'red': zip(_vs,v[0],v[0]),
-                  'green': zip(_vs,v[1],v[1]),
-                  'blue': zip(_vs,v[2],v[2]) }
+        cdict = { 'red': izip(_vs,v[0],v[0]),
+                  'green': izip(_vs,v[1],v[1]),
+                  'blue': izip(_vs,v[2],v[2]) }
         add_cmap(k, cdict)
 
 def _extract_lookup_table(cmap_name):

diff -r 19e3de48990373779ac3f5253e22e83b85f12ded -r ba220975b9b7aa2be8a3d577999fd4341d5afe0d yt/visualization/volume_rendering/tests/test_vr_cameras.py
--- a/yt/visualization/volume_rendering/tests/test_vr_cameras.py
+++ b/yt/visualization/volume_rendering/tests/test_vr_cameras.py
@@ -20,9 +20,9 @@
 from yt.testing import \
     fake_random_pf
 import numpy as np
-from yt.mods import ColorTransferFunction, ProjectionTransferFunction
 from yt.visualization.volume_rendering.api import \
-    PerspectiveCamera, StereoPairCamera, InteractiveCamera, ProjectionCamera
+    PerspectiveCamera, StereoPairCamera, InteractiveCamera, ProjectionCamera, \
+    ColorTransferFunction, ProjectionTransferFunction
 from yt.visualization.tests.test_plotwindow import assert_fname
 from unittest import TestCase
 


https://bitbucket.org/yt_analysis/yt/commits/8c253b07fcc6/
Changeset:   8c253b07fcc6
Branch:      yt-3.0
User:        BW Keller
Date:        2014-03-25 20:32:40
Summary:     Commented new tipsy stuff.
Affected #:  2 files

diff -r ba220975b9b7aa2be8a3d577999fd4341d5afe0d -r 8c253b07fcc6f00584d611813e231cc8f6de80f9 yt/frontends/sph/data_structures.py
--- a/yt/frontends/sph/data_structures.py
+++ b/yt/frontends/sph/data_structures.py
@@ -351,7 +351,7 @@
         assert file_id == 0
         super(TipsyFile, self).__init__(pf, io, filename, file_id)
         io._create_dtypes(self)
-        io._update_domain(self)
+        io._update_domain(self)#Check automatically what the domain size is
 
 
 class TipsyDataset(ParticleDataset):
@@ -461,6 +461,7 @@
         self.domain_dimensions = np.ones(3, "int32") * nz
         if self.parameters.get('bPeriodic', True):
             self.periodicity = (True, True, True)
+            # If we are periodic, that sets our domain width to either 1 or dPeriod.
             self.domain_left_edge = np.zeros(3, "float64") - 0.5*self.parameters.get('dPeriod', 1)
             self.domain_right_edge = np.zeros(3, "float64") + 0.5*self.parameters.get('dPeriod', 1)
         else:
@@ -511,6 +512,12 @@
 
     @staticmethod
     def _validate_header(filename):
+        '''
+        This method automatically detects whether the tipsy file is big/little endian
+        and is not corrupt/invalid.  It returns a tuple of (Valid, endianswap) where
+        Valid is a boolean that is true if the file is a tipsy file, and endianswap is 
+        the endianness character '>' or '<'.
+        '''
         try:
             f = open(filename,'rb')
         except:

diff -r ba220975b9b7aa2be8a3d577999fd4341d5afe0d -r 8c253b07fcc6f00584d611813e231cc8f6de80f9 yt/frontends/sph/io.py
--- a/yt/frontends/sph/io.py
+++ b/yt/frontends/sph/io.py
@@ -418,7 +418,8 @@
 
     def _read_aux_fields(self, field, mask, data_file):
         """
-        Read in auxiliary files from gasoline/pkdgrav 
+        Read in auxiliary files from gasoline/pkdgrav.
+        This method will automatically detect the format of the file.
         """
         filename = data_file.filename+'.'+field
         dtype = None
@@ -529,8 +530,15 @@
             f.close()
 
     def _update_domain(self, data_file):
+        '''
+        This method is used to determine the size needed for a box that will 
+        bound the particles.  It simply finds the largest position of the
+        whole set of particles, and sets the domain to +/- that value.
+        '''
         pf = data_file.pf
         ind = 0
+        # Check to make sure that the domain hasn't already been set
+        # by the parameter file 
         if pf.domain_left_edge != 0 and pf.domain_right_edge != 0:
             return
         with open(data_file.filename, "rb") as f:


https://bitbucket.org/yt_analysis/yt/commits/115b13d4b887/
Changeset:   115b13d4b887
Branch:      yt-3.0
User:        BW Keller
Date:        2014-03-25 20:34:13
Summary:     Merged in changes from upstream
Affected #:  2 files

diff -r 8c253b07fcc6f00584d611813e231cc8f6de80f9 -r 115b13d4b887cbdc8b7c46939147bf5abc008dbb yt/geometry/oct_container.pyx
--- a/yt/geometry/oct_container.pyx
+++ b/yt/geometry/oct_container.pyx
@@ -492,7 +492,7 @@
             coords[:,i] += self.DLE[i]
         return coords
 
-    def save_octree(self):
+    def save_octree(self, always_descend = False):
         # Get the header
         header = dict(dims = (self.nn[0], self.nn[1], self.nn[2]),
                       left_edge = (self.DLE[0], self.DLE[1], self.DLE[2]),
@@ -507,9 +507,15 @@
         data.nz = 8
         cdef np.ndarray[np.uint8_t, ndim=1] ref_mask
         ref_mask = np.zeros(self.nocts * 8, dtype="uint8") - 1
-        data.array = <void *> ref_mask.data
+        cdef void *p[2]
+        cdef np.uint8_t ad = int(always_descend)
+        p[0] = <void *> &ad
+        p[1] = ref_mask.data
+        data.array = p
         # Enforce partial_coverage here
         self.visit_all_octs(selector, oct_visitors.store_octree, &data, 1)
+        if always_descend:
+            ref_mask = ref_mask[:data.index-1]
         header['octree'] = ref_mask
         return header
 

diff -r 8c253b07fcc6f00584d611813e231cc8f6de80f9 -r 115b13d4b887cbdc8b7c46939147bf5abc008dbb yt/geometry/oct_visitors.pyx
--- a/yt/geometry/oct_visitors.pyx
+++ b/yt/geometry/oct_visitors.pyx
@@ -176,9 +176,14 @@
     arr[o.domain - 1] += 1
 
 cdef void store_octree(Oct *o, OctVisitorData *data, np.uint8_t selected):
-    cdef np.uint8_t *arr, res, ii
+    cdef np.uint8_t *arr, res, ii, *always_descend
     ii = cind(data.ind[0], data.ind[1], data.ind[2])
-    arr = <np.uint8_t *> data.array
+    cdef void **p = <void **> data.array
+    always_descend = <np.uint8_t *> p[0]
+    arr = <np.uint8_t *> p[1]
+    if always_descend[0] == 1 and data.last == o.domain_ind:
+        return
+    data.last = o.domain_ind
     if o.children == NULL or o.children[ii] == NULL:
         res = 0
     else:


https://bitbucket.org/yt_analysis/yt/commits/c57126c86716/
Changeset:   c57126c86716
Branch:      yt-3.0
User:        BW Keller
Date:        2014-03-25 21:04:57
Summary:     Updated the docs to reflect the much simplified Tipsy interface.
Affected #:  1 file

diff -r 115b13d4b887cbdc8b7c46939147bf5abc008dbb -r c57126c86716b4a6cd2c687772685567fb45fdad doc/source/examining/loading_data.rst
--- a/doc/source/examining/loading_data.rst
+++ b/doc/source/examining/loading_data.rst
@@ -367,16 +367,11 @@
 yt also supports loading Tipsy data.  Many of its characteristics are similar
 to how Gadget data is loaded; specifically, it shares its definition of
 indexing and mesh-identification with that described in
-:ref:`particle-indexing-criteria`.  However, unlike Gadget, the Tipsy frontend
-has not yet implemented header specifications, field specifications, or
-particle type specifications.  *These are all excellent projects for new
-contributors!*
-
+:ref:`particle-indexing-criteria`.  
 
 .. code-block:: python
 
-    ds = TipsyDataset("./halo1e11_run1.00400", endian="<",
-                           field_dtypes = {"Coordinates": "d"})
+    ds = load("./halo1e11_run1.00400")
 
 .. _specifying-cosmology-tipsy:
 


https://bitbucket.org/yt_analysis/yt/commits/314f05ee6bbe/
Changeset:   314f05ee6bbe
Branch:      yt-3.0
User:        BW Keller
Date:        2014-03-25 21:09:21
Summary:     Merged upstream
Affected #:  27 files

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 doc/extensions/notebook_sphinxext.py
--- a/doc/extensions/notebook_sphinxext.py
+++ b/doc/extensions/notebook_sphinxext.py
@@ -1,9 +1,10 @@
-import os, shutil, string, glob
+import os, shutil, string, glob, re
 from sphinx.util.compat import Directive
 from docutils import nodes
 from docutils.parsers.rst import directives
 from IPython.nbconvert import html, python
-from runipy.notebook_runner import NotebookRunner
+from IPython.nbformat.current import read, write
+from runipy.notebook_runner import NotebookRunner, NotebookError
 
 class NotebookDirective(Directive):
     """Insert an evaluated notebook into a document
@@ -57,12 +58,8 @@
 
         skip_exceptions = 'skip_exceptions' in self.options
 
-        try:
-            evaluated_text = evaluate_notebook(nb_abs_path, dest_path_eval,
-                                               skip_exceptions=skip_exceptions)
-        except:
-            # bail
-            return []
+        evaluated_text = evaluate_notebook(nb_abs_path, dest_path_eval,
+                                           skip_exceptions=skip_exceptions)
 
         # Create link to notebook and script files
         link_rst = "(" + \
@@ -138,11 +135,20 @@
     # Create evaluated version and save it to the dest path.
     # Always use --pylab so figures appear inline
     # perhaps this is questionable?
-    nb_runner = NotebookRunner(nb_path, pylab=False)
-    nb_runner.run_notebook(skip_exceptions=skip_exceptions)
+    notebook = read(open(nb_path), 'json')
+    nb_runner = NotebookRunner(notebook, pylab=False)
+    try:
+        nb_runner.run_notebook(skip_exceptions=skip_exceptions)
+    except NotebookError as e:
+        print ''
+        print e
+        # Return the traceback, filtering out ANSI color codes.
+        # http://stackoverflow.com/questions/13506033/filtering-out-ansi-escape-sequences
+        return 'Notebook conversion failed with the following traceback: \n%s' % \
+            re.sub(r'\\033[\[\]]([0-9]{1,2}([;@][0-9]{0,2})*)*[mKP]?', '', str(e))
     if dest_path is None:
         dest_path = 'temp_evaluated.ipynb'
-    nb_runner.save_notebook(dest_path)
+    write(nb_runner.nb, open(dest_path, 'w'), 'json')
     ret = nb_to_html(dest_path)
     if dest_path is 'temp_evaluated.ipynb':
         os.remove(dest_path)

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 doc/extensions/notebookcell_sphinxext.py
--- a/doc/extensions/notebookcell_sphinxext.py
+++ b/doc/extensions/notebookcell_sphinxext.py
@@ -35,12 +35,7 @@
 
         skip_exceptions = 'skip_exceptions' in self.options
 
-        try:
-            evaluated_text = \
-                evaluate_notebook('temp.ipynb', skip_exceptions=skip_exceptions)
-        except:
-            # bail
-            return []
+        evaluated_text = evaluate_notebook('temp.ipynb', skip_exceptions=skip_exceptions)
 
         # create notebook node
         attributes = {'format': 'html', 'source': 'nb_path'}

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 doc/source/analyzing/objects.rst
--- a/doc/source/analyzing/objects.rst
+++ b/doc/source/analyzing/objects.rst
@@ -242,15 +242,15 @@
 .. notebook-cell::
 
    from yt.mods import *
-   pf = load("enzo_tiny_cosmology/DD0046/DD0046")
-   ad = pf.h.all_data()
-   total_mass = ad.quantities["TotalQuantity"]("cell_mass")
+   ds = load("enzo_tiny_cosmology/DD0046/DD0046")
+   ad = ds.all_data()
+   total_mass = ad.quantities.total_mass()
    # now select only gas with 1e5 K < T < 1e7 K.
    new_region = ad.cut_region(['obj["temperature"] > 1e5',
                                'obj["temperature"] < 1e7'])
-   cut_mass = new_region.quantities["TotalQuantity"]("cell_mass")
+   cut_mass = new_region.quantities.total_mass()
    print "The fraction of mass in this temperature range is %f." % \
-     (cut_mass[0] / total_mass[0])
+     (cut_mass / total_mass)
 
 The ``cut_region`` function generates a new object containing only the cells 
 that meet all of the specified criteria.  The sole argument to ``cut_region`` 

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 doc/source/bootcamp/3)_Simple_Visualization.ipynb
--- a/doc/source/bootcamp/3)_Simple_Visualization.ipynb
+++ b/doc/source/bootcamp/3)_Simple_Visualization.ipynb
@@ -243,7 +243,7 @@
      "cell_type": "code",
      "collapsed": false,
      "input": [
-      "s = SlicePlot(pf, \"x\", [\"density\"], center=\"max\")\n",
+      "s = SlicePlot(ds, \"x\", [\"density\"], center=\"max\")\n",
       "s.annotate_contour(\"temperature\")\n",
       "s.zoom(2.5)"
      ],
@@ -272,4 +272,4 @@
    "metadata": {}
   }
  ]
-}
\ No newline at end of file
+}

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 doc/source/bootcamp/4)_Data_Objects_and_Time_Series.ipynb
--- a/doc/source/bootcamp/4)_Data_Objects_and_Time_Series.ipynb
+++ b/doc/source/bootcamp/4)_Data_Objects_and_Time_Series.ipynb
@@ -68,7 +68,7 @@
       "for ds in ts:\n",
       "    dd = ds.all_data()\n",
       "    rho_ex.append(dd.quantities.extrema(\"density\"))\n",
-      "    times.append(pf.current_time.in_units(\"Gyr\"))\n",
+      "    times.append(ds.current_time.in_units(\"Gyr\"))\n",
       "rho_ex = np.array(rho_ex)"
      ],
      "language": "python",
@@ -211,7 +211,7 @@
      "cell_type": "code",
      "collapsed": false,
      "input": [
-      "pf = load(\"IsolatedGalaxy/galaxy0030/galaxy0030\")\n",
+      "ds = load(\"IsolatedGalaxy/galaxy0030/galaxy0030\")\n",
       "v, c = ds.find_max(\"density\")\n",
       "sl = ds.slice(0, c[0])\n",
       "print sl[\"index\", \"x\"], sl[\"index\", \"z\"], sl[\"pdx\"]\n",
@@ -361,4 +361,4 @@
    "metadata": {}
   }
  ]
-}
\ No newline at end of file
+}

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 doc/source/cookbook/embedded_javascript_animation.ipynb
--- a/doc/source/cookbook/embedded_javascript_animation.ipynb
+++ b/doc/source/cookbook/embedded_javascript_animation.ipynb
@@ -1,7 +1,7 @@
 {
  "metadata": {
   "name": "",
-  "signature": "sha256:578ca4fbc3831e9093489f06939abce9cde845b6cf75d901a3c429abc270f550"
+  "signature": "sha256:4f7d409d15ecc538096d15212923312e2cb4a911ebf5a9cf7edc9bd63a8335e9"
  },
  "nbformat": 3,
  "nbformat_minor": 0,
@@ -47,7 +47,8 @@
       "import matplotlib.pyplot as plt\n",
       "from matplotlib.backends.backend_agg import FigureCanvasAgg\n",
       "\n",
-      "prj = ProjectionPlot(load('Enzo_64/DD0000/data0000'), 0, 'density', weight_field='density',width=(180,'mpccm'))\n",
+      "prj = ProjectionPlot(load('Enzo_64/DD0000/data0000'), 0, 'density', weight_field='density',width=(180,'Mpccm'))\n",
+      "prj.set_figure_size(5)\n",
       "prj.set_zlim('density',1e-32,1e-26)\n",
       "fig = prj.plots['density'].figure\n",
       "fig.canvas = FigureCanvasAgg(fig)\n",

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 doc/source/cookbook/embedded_webm_animation.ipynb
--- a/doc/source/cookbook/embedded_webm_animation.ipynb
+++ b/doc/source/cookbook/embedded_webm_animation.ipynb
@@ -1,7 +1,7 @@
 {
  "metadata": {
   "name": "",
-  "signature": "sha256:67844f8c2c184fc51aa62440cc05623ee85f252edde6faaa0d7b6617c3f33dfe"
+  "signature": "sha256:0090176ae6299b2310bf613404cbfbb42a54e19a03d1469d1429a01170a63aa0"
  },
  "nbformat": 3,
  "nbformat_minor": 0,
@@ -96,7 +96,7 @@
       "import matplotlib.pyplot as plt\n",
       "from matplotlib.backends.backend_agg import FigureCanvasAgg\n",
       "\n",
-      "prj = ProjectionPlot(load('Enzo_64/DD0000/data0000'), 0, 'density', weight_field='density',width=(180,'mpccm'))\n",
+      "prj = ProjectionPlot(load('Enzo_64/DD0000/data0000'), 0, 'density', weight_field='density',width=(180,'Mpccm'))\n",
       "prj.set_zlim('density',1e-32,1e-26)\n",
       "fig = prj.plots['density'].figure\n",
       "fig.canvas = FigureCanvasAgg(fig)\n",

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 doc/source/reference/api/api.rst
--- a/doc/source/reference/api/api.rst
+++ b/doc/source/reference/api/api.rst
@@ -604,13 +604,12 @@
 
    ~yt.data_objects.derived_quantities.DerivedQuantity
    ~yt.data_objects.derived_quantities.DerivedQuantityCollection
-   ~yt.data_objects.derived_quantities.WeightedAverage
-   ~yt.data_objects.derived_quantities.TotalValue
+   ~yt.data_objects.derived_quantities.WeightedAverageQuantity
+   ~yt.data_objects.derived_quantities.TotalQuantity
    ~yt.data_objects.derived_quantities.TotalMass
    ~yt.data_objects.derived_quantities.CenterOfMass
    ~yt.data_objects.derived_quantities.BulkVelocity
    ~yt.data_objects.derived_quantities.AngularMomentumVector
-   ~yt.data_objects.derived_quantities.ParticleAngularMomentumVector
    ~yt.data_objects.derived_quantities.Extrema
    ~yt.data_objects.derived_quantities.MaxLocation
    ~yt.data_objects.derived_quantities.MinLocation
@@ -719,12 +718,11 @@
 
    ~yt.config.YTConfigParser
    ~yt.utilities.parameter_file_storage.ParameterFileStore
-   ~yt.data_objects.data_containers.FakeGridForParticles
    ~yt.utilities.parallel_tools.parallel_analysis_interface.ObjectIterator
    ~yt.utilities.parallel_tools.parallel_analysis_interface.ParallelAnalysisInterface
    ~yt.utilities.parallel_tools.parallel_analysis_interface.ParallelObjectIterator
-   ~yt.analysis_modules.index_subset.index_subset.ConstructedRootGrid
-   ~yt.analysis_modules.index_subset.index_subset.ExtractedHierarchy
+   ~yt.analysis_modules.hierarchy_subset.hierarchy_subset.ConstructedRootGrid
+   ~yt.analysis_modules.hierarchy_subset.hierarchy_subset.ExtractedHierarchy
 
 
 Testing Infrastructure

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 doc/source/visualizing/_cb_docstrings.inc
--- a/doc/source/visualizing/_cb_docstrings.inc
+++ b/doc/source/visualizing/_cb_docstrings.inc
@@ -9,9 +9,9 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'), center='max')
-   slc.annotate_arrow((0.53, 0.53, 0.53), 1/pf['kpc'])
+   slc.annotate_arrow((0.5, 0.5, 0.5), (1, 'kpc'))
    slc.save()
 
 -------------
@@ -30,7 +30,7 @@
 
    pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    data_source = pf.disk([0.5, 0.5, 0.5], [0., 0., 1.],
-                           8./pf.units['kpc'], 1./pf.units['kpc'])
+                           (8., 'kpc'), (1., 'kpc'))
 
    c_min = 10**na.floor(na.log10(data_source['density']).min()  )
    c_max = 10**na.floor(na.log10(data_source['density']).max()+1)
@@ -79,7 +79,7 @@
    from yt.mods import *
    pf = load("Enzo_64/DD0043/data0043")
    s = OffAxisSlicePlot(pf, [1,1,0], ["density"], center="c")
-   s.annotate_cquiver('CuttingPlaneVelocityX', 'CuttingPlaneVelocityY', 10)
+   s.annotate_cquiver('cutting_plane_velocity_x', 'cutting_plane_velocity_y', 10)
    s.zoom(1.5)
    s.save()
 
@@ -97,7 +97,7 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'), center='max')
    slc.annotate_grids()
    slc.save()
@@ -153,7 +153,7 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    p = ProjectionPlot(pf, 'z', 'density', center='m', width=(10, 'kpc'))
    p.annotate_image_line((0.3, 0.4), (0.8, 0.9), plot_args={'linewidth':5})
    p.save()
@@ -169,7 +169,7 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    p = ProjectionPlot(pf, 'z', 'density', center='m', width=(10, 'kpc'))
    p.annotate_line([-6, -4, -2, 0, 2, 4, 6], [3.6, 1.6, 0.4, 0, 0.4, 1.6, 3.6], plot_args={'linewidth':5})
    p.save()
@@ -212,9 +212,9 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    s = SlicePlot(pf, 'z', 'density', center='m', width=(10, 'kpc'))
-   s.annotate_marker([0.53, 0.53, 0.53], plot_args={'s':10000})
+   s.annotate_marker([0.5, 0.5, 0.5], plot_args={'s':10000})
    s.save()   
 
 -------------
@@ -237,7 +237,7 @@
    from yt.mods import *
    pf = load("Enzo_64/DD0043/data0043")
    p = ProjectionPlot(pf, "x", "density", center='m', width=(10, 'Mpc'))
-   p.annotate_particles(10/pf['Mpc'])
+   p.annotate_particles((10, 'Mpc'))
    p.save()
 
 -------------
@@ -253,9 +253,9 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    p = ProjectionPlot(pf, 'z', 'density', center='m', width=(10, 'kpc'))
-   p.annotate_point([0.53, 0.526, 0.53], "What's going on here?", text_args={'size':'xx-large', 'color':'w'})
+   p.annotate_point([0.5, 0.496, 0.5], "What's going on here?", text_args={'size':'xx-large', 'color':'w'})
    p.save()
 
 -------------
@@ -273,8 +273,8 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   p = ProjectionPlot(pf, 'z', 'density', center=[0.53, 0.53, 0.53], 
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   p = ProjectionPlot(pf, 'z', 'density', center=[0.5, 0.5, 0.5], 
                       weight_field='density', width=(20, 'kpc'))
    p.annotate_quiver('velocity_x', 'velocity_y', 16)
    p.save()
@@ -292,9 +292,9 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   p = ProjectionPlot(pf, 'z', 'density', center=[0.53, 0.53, 0.53], width=(20, 'kpc'))
-   p.annotate_sphere([0.53, 0.53, 0.53], 2/pf['kpc'], {'fill':True})
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   p = ProjectionPlot(pf, 'z', 'density', center='c', width=(20, 'kpc'))
+   p.annotate_sphere([0.5, 0.5, 0.5], (2, 'kpc'), {'fill':True})
    p.save()
 
 -------------
@@ -314,8 +314,8 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   s = SlicePlot(pf, 'z', 'density', center=[0.53, 0.53, 0.53], width=(20, 'kpc'))
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   s = SlicePlot(pf, 'z', 'density', center='c', width=(20, 'kpc'))
    s.annotate_streamlines('velocity_x', 'velocity_y')
    s.save()
 
@@ -333,9 +333,9 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    s = SlicePlot(pf, 'z', 'density', center='m', width=(10, 'kpc'))
-   s.annotate_text((0.53, 0.53), 'Sample text', text_args={'size':'xx-large', 'color':'w'})
+   s.annotate_text((0.5, 0.5), 'Sample text', text_args={'size':'xx-large', 'color':'w'})
    s.save()
 
 -------------
@@ -349,8 +349,8 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   p = ProjectionPlot(pf, 'z', 'density', center=[0.53, 0.53, 0.53], width=(20, 'kpc'))
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   p = ProjectionPlot(pf, 'z', 'density', center='c', width=(20, 'kpc'))
    p.annotate_title('Density plot')
    p.save()
 
@@ -373,7 +373,7 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    p = SlicePlot(pf, 'z', 'density', center='m', width=(10, 'kpc'))
    p.annotate_velocity()
    p.save()

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 doc/source/visualizing/manual_plotting.rst
--- a/doc/source/visualizing/manual_plotting.rst
+++ b/doc/source/visualizing/manual_plotting.rst
@@ -39,13 +39,13 @@
    pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
 
    c = pf.h.find_max('density')[1]
-   proj = pf.proj(0, 'density')
+   proj = pf.proj('density', 0)
 
-   width = 10/pf['kpc'] # we want a 1.5 mpc view
+   width = (10, 'kpc') # we want a 1.5 mpc view
    res = [1000, 1000] # create an image with 1000x1000 pixels
    frb = proj.to_frb(width, res, center=c)
 
-   P.imshow(frb['density'])
+   P.imshow(np.array(frb['density']))
    P.savefig('my_perfect_figure.png')
    
 The FRB is a very small object that can be deleted and recreated quickly (in
@@ -76,10 +76,10 @@
    ray = pf.ortho_ray(ax, (c[1], c[2])) # cutting through the y0,z0 such that we hit the max density
 
    P.subplot(211)
-   P.semilogy(ray['x'], ray['density'])
+   P.semilogy(np.array(ray['x']), np.array(ray['density']))
    P.ylabel('density')
    P.subplot(212)
-   P.semilogy(ray['x'], ray['temperature'])
+   P.semilogy(np.array(ray['x']), np.array(ray['temperature']))
    P.xlabel('x')
    P.ylabel('temperature')
 

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 doc/source/visualizing/plots.rst
--- a/doc/source/visualizing/plots.rst
+++ b/doc/source/visualizing/plots.rst
@@ -108,13 +108,13 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z', 'density', center=[0.53, 0.53, 0.53], width=(20,'kpc'))
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'density', center=[0.5, 0.5, 0.5], width=(20,'kpc'))
    slc.save()
 
 The above example will display an annotated plot of a slice of the
 Density field in a 20 kpc square window centered on the coordinate
-(0.53,0.53) in the x-y plane.  The axis to slice along is keyed to the
+(0.5, 0.5, 0.5) in the x-y plane.  The axis to slice along is keyed to the
 letter 'z', corresponding to the z-axis.  Finally, the image is saved to
 a png file.
 
@@ -124,18 +124,19 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z','Pressure', center=[0.53, 0.53, 0.53])
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'pressure', center='c')
    slc.save()
    slc.zoom(30)
    slc.save('zoom')
 
-will save a slice of the pressure field in a slice along the z
+will save a plot of the pressure field in a slice along the z
 axis across the entire simulation domain followed by another plot that
 is zoomed in by a factor of 30 with respect to the original
-image. With these sorts of manipulations, one can easily pan and zoom
-onto an interesting region in the simulation and adjust the
-boundaries of the region to visualize on the fly.
+image. Both plots will be centered on the center of the simulation box. 
+With these sorts of manipulations, one can easily pan and zoom onto an 
+interesting region in the simulation and adjust the boundaries of the
+region to visualize on the fly.
 
 A slice object can also add annotations like a title, an overlying
 quiver plot, the location of grid boundaries, halo-finder annotations,
@@ -145,12 +146,12 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z', 'VorticitySquared', width=(10,'kpc'), center='max')
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'))
    slc.annotate_grids()
    slc.save()
 
-will plot the VorticitySquared in a 10 kiloparsec slice through the
+will plot the density field in a 10 kiloparsec slice through the
 z-axis centered on the highest density point in the simulation domain.
 Before saving the plot, the script annotates it with the grid
 boundaries, which are drawn as thick black lines by default.
@@ -174,9 +175,9 @@
 .. python-script::
  
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   prj = ProjectionPlot(pf, 2, 'density', center=[0.53, 0.53, 0.53],
-                        width=(25, 'kpc'), weight_field=None)
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   prj = ProjectionPlot(pf, 2, 'density', width=(25, 'kpc'), 
+                        weight_field=None)
    prj.save()
 
 will create a projection of Density field along the x axis, plot it,
@@ -205,11 +206,11 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    L = [1,1,0] # vector normal to cutting plane
    north_vector = [-1,1,0]
-   cut = OffAxisSlicePlot(pf, L, 'density', width=(25, 'kpc'),
-                          center=[0.53, 0.53, 0.53], north_vector=north_vector)
+   cut = OffAxisSlicePlot(pf, L, 'density', width=(25, 'kpc'), 
+                          north_vector=north_vector)
    cut.save()
 
 creates an off-axis slice in the plane perpendicular to ``L``,
@@ -246,11 +247,11 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    L = [1,1,0] # vector normal to cutting plane
    north_vector = [-1,1,0]
    W = [0.02, 0.02, 0.02]
-   c = [0.53, 0.53, 0.53]
+   c = [0.5, 0.5, 0.5]
    N = 512
    image = off_axis_projection(pf, c, L, W, N, "density")
    write_image(na.log10(image), "%s_offaxis_projection.png" % pf)
@@ -268,11 +269,10 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    L = [1,1,0] # vector normal to cutting plane
    north_vector = [-1,1,0]
    prj = OffAxisProjectionPlot(pf,L,'density',width=(25, 'kpc'), 
-                               center=[0.53, 0.53, 0.53], 
                                north_vector=north_vector)
    prj.save()
 
@@ -292,8 +292,8 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z', 'VorticitySquared', width=(10,'kpc'), center='max')
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'))
    slc.save()
 
 Panning and zooming
@@ -307,9 +307,10 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z', 'VorticitySquared', width=(10,'kpc'), center='max')
-   slc.pan((2/pf['kpc'],2/pf['kpc']))
+   from yt.units import kpc
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'))
+   slc.pan((2*kpc, 2*kpc))
    slc.save()
 
 :class:`~yt.visualization.plot_window.SlicePlot.pan_rel` accepts deltas in units relative
@@ -318,8 +319,8 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z', 'VorticitySquared', width=(10,'kpc'), center='max')
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'))
    slc.pan_rel((0.1, -0.1))
    slc.save()
 
@@ -328,8 +329,8 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z', 'VorticitySquared', width=(10,'kpc'), center='max')
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'))
    slc.zoom(2)
    slc.save()
 
@@ -342,8 +343,8 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z', 'VorticitySquared', width=(10,'kpc'), center='max')
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'))
    slc.set_axes_unit('Mpc')
    slc.save()
 
@@ -356,9 +357,9 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z', 'VorticitySquared', width=(10,'kpc'), center='max')
-   slc.set_center((0.53, 0.53))
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'))
+   slc.set_center((0.5, 0.5))
    slc.save()
 
 Fonts
@@ -369,8 +370,8 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z', 'VorticitySquared', width=(10,'kpc'), center='max')
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'))
    slc.set_font({'family': 'sans-serif', 'style': 'italic','weight': 'bold', 'size': 24})
    slc.save()
 
@@ -388,9 +389,9 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z', 'VorticitySquared', width=(10,'kpc'), center='max')
-   slc.set_cmap('VorticitySquared', 'RdBu_r')
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'))
+   slc.set_cmap('density', 'RdBu_r')
    slc.save()
 
 The :class:`~yt.visualization.plot_window.SlicePlot.set_log` function accepts a field name
@@ -400,9 +401,9 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z', 'VorticitySquared', width=(10,'kpc'), center='max')
-   slc.set_log('VorticitySquared', False)
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'))
+   slc.set_log('density', False)
    slc.save()
 
 Lastly, the :class:`~yt.visualization.plot_window.SlicePlot.set_zlim` function makes it
@@ -411,9 +412,9 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z', 'VorticitySquared', width=(10,'kpc'), center='max')
-   slc.set_zlim('VorticitySquared', 1e-30, 1e-25)
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'))
+   slc.set_zlim('density', 1e-30, 1e-25)
    slc.save()
 
 Set the size of the plot
@@ -427,8 +428,8 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z', 'VorticitySquared', width=(10,'kpc'), center='max')
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'))
    slc.set_window_size(10)
    slc.save()
 
@@ -438,8 +439,8 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   slc = SlicePlot(pf, 'z', 'VorticitySquared', width=(10,'kpc'), center='max')
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   slc = SlicePlot(pf, 'z', 'density', width=(10,'kpc'))
    slc.set_buff_size(1600)
    slc.save()
 
@@ -464,8 +465,8 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   my_galaxy = pf.disk([0.53, 0.53, 0.53], [0.0, 0.0, 1.0], 0.01, 0.003)
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   my_galaxy = pf.disk([0.5, 0.5, 0.5], [0.0, 0.0, 1.0], 0.01, 0.003)
    plot = ProfilePlot(my_galaxy, "density", ["temperature"])
    plot.save()
 
@@ -483,8 +484,8 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
-   my_sphere = pf.sphere([0.53, 0.53, 0.53], (100, "pc"))
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
+   my_sphere = pf.sphere([0.5, 0.5, 0.5], (100, "kpc"))
    plot = ProfilePlot(my_sphere, "temperature", ["cell_mass"],
                       weight_field=None)
    plot.save()
@@ -589,7 +590,7 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    my_sphere = pf.sphere("c", (50, "kpc"))
    plot = PhasePlot(my_sphere, "density", "temperature", ["cell_mass"],
                     weight_field=None)
@@ -602,9 +603,9 @@
 .. python-script::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    my_sphere = pf.sphere("c", (50, "kpc"))
-   plot = PhasePlot(my_sphere, "density", "temperature", ["HI_Fraction"],
+   plot = PhasePlot(my_sphere, "density", "temperature", ["H_fraction"],
                     weight_field="cell_mass")
    plot.save()
 
@@ -646,7 +647,7 @@
 .. notebook-cell::
 
    from yt.mods import *
-   pf = load("HiresIsolatedGalaxy/DD0044/DD0044")
+   pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")
    p = ProjectionPlot(pf, "x", "density", center='m', width=(10,'kpc'),
                       weight_field='density')
    p.show()

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 doc/source/visualizing/volume_rendering.rst
--- a/doc/source/visualizing/volume_rendering.rst
+++ b/doc/source/visualizing/volume_rendering.rst
@@ -142,8 +142,7 @@
 :class:`~yt.visualization.volume_rendering.camera.Camera`, which represents a
 viewpoint into a volume.  The camera optionally accepts a volume, which can be
 either an instance of
-:class:`~yt.visualization.volume_rendering.grid_partitioner.HomogenizedVolume`
-or an instance of :class:`~yt.utilities.amr_kdtree.amr_kdtree.AMRKDTree` that
+:class:`~yt.utilities.amr_kdtree.amr_kdtree.AMRKDTree` that
 has already been initialized.  If one is not supplied, the camera will generate
 one itself.  This can also be specified if you wish to save bricks between
 repeated calls, thus saving considerable amounts of time.

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/analysis_modules/api.py
--- a/yt/analysis_modules/api.py
+++ b/yt/analysis_modules/api.py
@@ -63,14 +63,13 @@
     HaloProfiler, \
     FakeProfile
 
-from .index_subset.api import \
+from .hierarchy_subset.api import \
     ConstructedRootGrid, \
     AMRExtractedGridProxy, \
     ExtractedHierarchy, \
     ExtractedParameterFile
 
 from .level_sets.api import \
-    coalesce_join_tree, \
     identify_contours, \
     Clump, \
     find_clumps, \

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/analysis_modules/halo_mass_function/halo_mass_function.py
--- a/yt/analysis_modules/halo_mass_function/halo_mass_function.py
+++ b/yt/analysis_modules/halo_mass_function/halo_mass_function.py
@@ -23,9 +23,9 @@
     parallel_blocking_call
 from yt.utilities.physical_constants import \
     cm_per_mpc, \
-    mass_sun_cgs, \
-    rho_crit_now
-
+    mass_sun_cgs
+from yt.utilities.physical_ratios import \
+    rho_crit_g_cm3_h2
 
 class HaloMassFcn(ParallelAnalysisInterface):
     """
@@ -256,7 +256,7 @@
 
         # rho0 in units of h^2 Msolar/Mpc^3
         rho0 = self.omega_matter0 * \
-                rho_crit_now * cm_per_mpc**3 / mass_sun_cgs
+                rho_crit_g_cm3_h2 * cm_per_mpc**3 / mass_sun_cgs
 
         # spacing in mass of our sigma calculation
         dm = (float(self.log_mass_max) - self.log_mass_min)/self.num_sigma_bins;
@@ -293,7 +293,7 @@
         # constants - set these before calling any functions!
         # rho0 in units of h^2 Msolar/Mpc^3
         rho0 = self.omega_matter0 * \
-                rho_crit_now * cm_per_mpc**3 / mass_sun_cgs
+            rho_crit_g_cm3_h2 * cm_per_mpc**3 / mass_sun_cgs
         self.delta_c0 = 1.69;  # critical density for turnaround (Press-Schechter)
         
         nofmz_cum = 0.0;  # keep track of cumulative number density

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/analysis_modules/halo_profiler/multi_halo_profiler.py
--- a/yt/analysis_modules/halo_profiler/multi_halo_profiler.py
+++ b/yt/analysis_modules/halo_profiler/multi_halo_profiler.py
@@ -44,8 +44,9 @@
     parallel_root_only, \
     parallel_objects
 from yt.utilities.physical_constants import \
-    mass_sun_cgs, \
-    rho_crit_now
+    mass_sun_cgs
+from yt.utilities.physical_ratios import \
+    rho_crit_g_cm3_h2
 from yt.visualization.fixed_resolution import \
     FixedResolutionBuffer
 from yt.visualization.image_writer import write_image
@@ -932,7 +933,7 @@
         if 'ActualOverdensity' in profile.keys():
             return
 
-        rhocritnow = rho_crit_now * self.pf.hubble_constant**2 # g cm^-3
+        rhocritnow = rho_crit_g_cm3_h2 * self.pf.hubble_constant**2 # g cm^-3
         rho_crit = rhocritnow * ((1.0 + self.pf.current_redshift)**3.0)
         if not self.use_critical_density: rho_crit *= self.pf.omega_matter
 

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/analysis_modules/hierarchy_subset/api.py
--- a/yt/analysis_modules/hierarchy_subset/api.py
+++ b/yt/analysis_modules/hierarchy_subset/api.py
@@ -1,5 +1,5 @@
 """
-API for index_subset
+API for hierarchy_subset
 
 
 
@@ -13,7 +13,7 @@
 # The full license is in the file COPYING.txt, distributed with this software.
 #-----------------------------------------------------------------------------
 
-from .index_subset import \
+from .hierarchy_subset import \
     ConstructedRootGrid, \
     AMRExtractedGridProxy, \
     ExtractedHierarchy, \

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/data_objects/construction_data_containers.py
--- a/yt/data_objects/construction_data_containers.py
+++ b/yt/data_objects/construction_data_containers.py
@@ -216,7 +216,7 @@
     """
     _key_fields = YTSelectionContainer2D._key_fields + ['weight_field']
     _type_name = "proj"
-    _con_args = ('axis', 'weight_field')
+    _con_args = ('axis', 'field', 'weight_field')
     _container_fields = ('px', 'py', 'pdx', 'pdy', 'weight_field')
     def __init__(self, field, axis, weight_field = None,
                  center = None, pf = None, data_source=None, 
@@ -241,6 +241,10 @@
         return self.data_source.blocks
 
     @property
+    def field(self):
+        return [k for k in self.field_data.keys() if k not in self._container_fields]
+
+    @property
     def _mrep(self):
         return MinimalProjectionData(self)
 

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/data_objects/data_containers.py
--- a/yt/data_objects/data_containers.py
+++ b/yt/data_objects/data_containers.py
@@ -802,6 +802,8 @@
             if center is None:
                 center = (self.pf.domain_right_edge
                         + self.pf.domain_left_edge)/2.0
+        elif iterable(center) and not isinstance(center, YTArray):
+            center = self.pf.arr(center, 'code_length')
         if iterable(width):
             w, u = width
             width = self.pf.arr(w, input_units = u)
@@ -1262,8 +1264,7 @@
     def _get_cut_mask(self, grid, field=None):
         if self._is_fully_enclosed(grid):
             return True # We do not want child masking here
-        if not isinstance(grid, (FakeGridForParticles,)) \
-             and grid.id in self._cut_masks:
+        if grid.id in self._cut_masks:
             return self._cut_masks[grid.id]
         # If we get this far, we have to generate the cut_mask.
         return self._get_level_mask(self.regions, grid)
@@ -1320,6 +1321,5 @@
                     this_cut_mask)
             if item == "OR":
                 np.bitwise_or(this_cut_mask, level_masks[i+1], this_cut_mask)
-        if not isinstance(grid, FakeGridForParticles):
-            self._cut_masks[grid.id] = this_cut_mask
+        self._cut_masks[grid.id] = this_cut_mask
         return this_cut_mask

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/fields/fluid_vector_fields.py
--- a/yt/fields/fluid_vector_fields.py
+++ b/yt/fields/fluid_vector_fields.py
@@ -28,8 +28,9 @@
     just_one
 
 from .vector_operations import \
-     create_magnitude_field
-    
+     create_magnitude_field, \
+     create_squared_field
+
 @register_field_plugin
 def setup_fluid_vector_fields(registry, ftype = "gas", slice_info = None):
     # slice_info would be the left, the right, and the factor.
@@ -126,6 +127,9 @@
     create_magnitude_field(registry, "vorticity", "1/s",
                            ftype=ftype, slice_info=slice_info,
                            validators=vort_validators)
+    create_squared_field(registry, "vorticity", "1/s**2",
+                         ftype=ftype, slice_info=slice_info,
+                         validators=vort_validators)
 
     def _vorticity_stretching_x(field, data):
         return data[ftype, "velocity_divergence"] * data[ftype, "vorticity_x"]

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/fields/vector_operations.py
--- a/yt/fields/vector_operations.py
+++ b/yt/fields/vector_operations.py
@@ -61,6 +61,28 @@
                        function = _magnitude, units = field_units,
                        validators = validators, particle_type = particle_type)
 
+def create_squared_field(registry, basename, field_units,
+                         ftype = "gas", slice_info = None,
+                         validators = None, particle_type=False):
+
+    xn, yn, zn = [(ftype, "%s_%s" % (basename, ax)) for ax in 'xyz']
+
+    # Is this safe?
+    if registry.pf.dimensionality < 3:
+        zn = ("index", "zeros")
+    if registry.pf.dimensionality < 2:
+        yn = ("index", "zeros")
+
+    def _squared(field, data):
+        squared  = data[xn] * data[xn]
+        squared += data[yn] * data[yn]
+        squared += data[zn] * data[zn]
+        return squared
+
+    registry.add_field((ftype, "%s_squared" % basename),
+                       function = _squared, units = field_units,
+                       validators = validators, particle_type = particle_type)
+
 def create_vector_fields(registry, basename, field_units,
                          ftype = "gas", slice_info = None):
     # slice_info would be the left, the right, and the factor.

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/frontends/fits/data_structures.py
--- a/yt/frontends/fits/data_structures.py
+++ b/yt/frontends/fits/data_structures.py
@@ -19,6 +19,7 @@
 import stat
 import numpy as np
 import weakref
+import warnings
 
 from yt.config import ytcfg
 from yt.funcs import *
@@ -250,7 +251,9 @@
         except:
             pass
         try:
-            fileh = pyfits.open(args[0])
+            with warnings.catch_warnings():
+                warnings.filterwarnings('ignore', category=UserWarning, append=True)
+                fileh = pyfits.open(args[0])
             for h in fileh:
                 if h.is_image and h.data is not None:
                     fileh.close()

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/utilities/definitions.py
--- a/yt/utilities/definitions.py
+++ b/yt/utilities/definitions.py
@@ -47,8 +47,7 @@
                   'cm'    : cm_per_mpc}
 
 # Nicely formatted versions of common length units
-formatted_length_unit_names = {'mpc'     : 'Mpc',
-                               'au'      : 'AU',
+formatted_length_unit_names = {'au'      : 'AU',
                                'rsun'    : 'R_\odot',
                                'code_length': 'code\/length'}
 

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/visualization/plot_container.py
--- a/yt/visualization/plot_container.py
+++ b/yt/visualization/plot_container.py
@@ -250,7 +250,7 @@
         ds = self.data_source
         name = ds._type_name
         kwargs = dict((n, getattr(ds, n)) for n in ds._con_args)
-        new_ds = getattr(new_pf.h, name)(**kwargs)
+        new_ds = getattr(new_pf, name)(**kwargs)
         self.pf = new_pf
         self.data_source = new_ds
         self._data_valid = self._plot_valid = False

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/visualization/plot_modifications.py
--- a/yt/visualization/plot_modifications.py
+++ b/yt/visualization/plot_modifications.py
@@ -1,5 +1,5 @@
 """
-Callbacksr to add additional functionality on to plots.
+Callbacks to add additional functionality on to plots.
 
 
 
@@ -54,30 +54,32 @@
         # Convert the data and plot limits to tiled numpy arrays so that
         # convert_to_plot is automatically vectorized.
 
-        x0 = np.tile(plot.xlim[0],ncoord)
-        x1 = np.tile(plot.xlim[1],ncoord)
+        x0 = np.array(np.tile(plot.xlim[0],ncoord))
+        x1 = np.array(np.tile(plot.xlim[1],ncoord))
         xx0 = np.tile(plot._axes.get_xlim()[0],ncoord)
         xx1 = np.tile(plot._axes.get_xlim()[1],ncoord)
-        
-        y0 = np.tile(plot.ylim[0],ncoord)
-        y1 = np.tile(plot.ylim[1],ncoord)
+
+        y0 = np.array(np.tile(plot.ylim[0],ncoord))
+        y1 = np.array(np.tile(plot.ylim[1],ncoord))
         yy0 = np.tile(plot._axes.get_ylim()[0],ncoord)
         yy1 = np.tile(plot._axes.get_ylim()[1],ncoord)
-        
+
+        ccoord = np.array(coord)
+
         # We need a special case for when we are only given one coordinate.
-        if np.array(coord).shape == (2,):
-            return ((coord[0]-x0)/(x1-x0)*(xx1-xx0) + xx0,
-                    (coord[1]-y0)/(y1-y0)*(yy1-yy0) + yy0)
+        if ccoord.shape == (2,):
+            return ((ccoord[0]-x0)/(x1-x0)*(xx1-xx0) + xx0,
+                    (ccoord[1]-y0)/(y1-y0)*(yy1-yy0) + yy0)
         else:
-            return ((coord[0][:]-x0)/(x1-x0)*(xx1-xx0) + xx0,
-                    (coord[1][:]-y0)/(y1-y0)*(yy1-yy0) + yy0)
+            return ((ccoord[0][:]-x0)/(x1-x0)*(xx1-xx0) + xx0,
+                    (ccoord[1][:]-y0)/(y1-y0)*(yy1-yy0) + yy0)
 
     def pixel_scale(self,plot):
-        x0, x1 = plot.xlim
+        x0, x1 = np.array(plot.xlim)
         xx0, xx1 = plot._axes.get_xlim()
         dx = (xx1 - xx0)/(x1 - x0)
-        
-        y0, y1 = plot.ylim
+
+        y0, y1 = np.array(plot.ylim)
         yy0, yy1 = plot._axes.get_ylim()
         dy = (yy1 - yy0)/(y1 - y0)
 
@@ -120,7 +122,7 @@
             if bv is not None:
                 bv_x = bv[x_dict[plot.data.axis]]
                 bv_y = bv[y_dict[plot.data.axis]]
-            else: bv_x = bv_y = 0
+            else: bv_x = bv_y = YTQuantity(0, 'cm/s')
 
             qcb = QuiverCallback(xv, yv, self.factor, scale=self.scale, 
                                  scale_units=self.scale_units, 
@@ -405,10 +407,10 @@
         for px_off, py_off in zip(pxs.ravel(), pys.ravel()):
             pxo = px_off * DW[px_index]
             pyo = py_off * DW[py_index]
-            left_edge_x = np.array((GLE[:,px_index]+pxo-x0)*dx + xx0)
-            left_edge_y = np.array((GLE[:,py_index]+pyo-y0)*dy + yy0)
-            right_edge_x = np.array((GRE[:,px_index]+pxo-x0)*dx + xx0)
-            right_edge_y = np.array((GRE[:,py_index]+pyo-y0)*dy + yy0)
+            left_edge_x = np.array((GLE[:,px_index]+pxo-x0)*dx) + xx0
+            left_edge_y = np.array((GLE[:,py_index]+pyo-y0)*dy) + yy0
+            right_edge_x = np.array((GRE[:,px_index]+pxo-x0)*dx) + xx0
+            right_edge_y = np.array((GRE[:,py_index]+pyo-y0)*dy) + yy0
             visible =  ( xpix * (right_edge_x - left_edge_x) / (xx1 - xx0) > self.min_pix ) & \
                        ( ypix * (right_edge_y - left_edge_y) / (yy1 - yy0) > self.min_pix ) & \
                        ( levels >= min_level) & \
@@ -459,7 +461,6 @@
         PlotCallback.__init__(self)
         self.field_x = field_x
         self.field_y = field_y
-        self.bv_x = self.bv_y = 0
         self.factor = factor
         self.dens = density
         if plot_args is None: plot_args = {}
@@ -477,14 +478,14 @@
                              plot.data['py'],
                              plot.data['pdx'],
                              plot.data['pdy'],
-                             plot.data[self.field_x] - self.bv_x,
+                             plot.data[self.field_x],
                              int(nx), int(ny),
                              (x0, x1, y0, y1),).transpose()
         pixY = _MPL.Pixelize(plot.data['px'],
                              plot.data['py'],
                              plot.data['pdx'],
                              plot.data['pdy'],
-                             plot.data[self.field_y] - self.bv_y,
+                             plot.data[self.field_y],
                              int(nx), int(ny),
                              (x0, x1, y0, y1),).transpose()
         X,Y = (np.linspace(xx0,xx1,nx,endpoint=True),
@@ -750,6 +751,8 @@
     _type_name = "arrow"
     def __init__(self, pos, code_size, plot_args = None):
         self.pos = pos
+        if isinstance(code_size, YTArray):
+            code_size = code_size.in_units('code_length')
         if not iterable(code_size):
             code_size = (code_size, code_size)
         self.code_size = code_size
@@ -761,6 +764,9 @@
             pos = (self.pos[x_dict[plot.data.axis]],
                    self.pos[y_dict[plot.data.axis]])
         else: pos = self.pos
+        if isinstance(self.code_size[1], basestring):
+            code_size = plot.data.pf.quan(*self.code_size).value
+            self.code_size = (code_size, code_size)
         from matplotlib.patches import Arrow
         # Now convert the pixels to code information
         x, y = self.convert_to_plot(plot, pos)
@@ -846,7 +852,11 @@
 
     def __call__(self, plot):
         from matplotlib.patches import Circle
-        
+
+        if iterable(self.radius):
+            self.radius = plot.data.pf.quan(self.radius[0], self.radius[1])
+            self.radius = np.float64(self.radius)
+
         radius = self.radius * self.pixel_scale(plot)[0]
 
         if plot.data.axis == 4:
@@ -1101,6 +1111,8 @@
 
     def __call__(self, plot):
         data = plot.data
+        if iterable(self.width):
+            self.width = np.float64(plot.data.pf.quan(self.width[0], self.width[1]))
         # we construct a recantangular prism
         x0, x1 = plot.xlim
         y0, y1 = plot.ylim
@@ -1125,9 +1137,9 @@
             if gg.sum() == 0: return
         plot._axes.hold(True)
         px, py = self.convert_to_plot(plot,
-                    [reg[field_x][gg][::self.stride],
-                     reg[field_y][gg][::self.stride]])
-        plot._axes.scatter(px.ndarray_view(), py.ndarray_view(), edgecolors='None', marker=self.marker,
+                    [np.array(reg[field_x][gg][::self.stride]),
+                     np.array(reg[field_y][gg][::self.stride])])
+        plot._axes.scatter(px, py, edgecolors='None', marker=self.marker,
                            s=self.p_size, c=self.color,alpha=self.alpha)
         plot._axes.set_xlim(xx0,xx1)
         plot._axes.set_ylim(yy0,yy1)

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/visualization/plot_window.py
--- a/yt/visualization/plot_window.py
+++ b/yt/visualization/plot_window.py
@@ -301,6 +301,8 @@
             bounds = self.xlim+self.ylim+self.zlim
         else:
             bounds = self.xlim+self.ylim
+        if self._frb_generator is ObliqueFixedResolutionBuffer:
+            bounds = np.array(bounds)
         self._frb = self._frb_generator(self.data_source,
                                         bounds, self.buff_size,
                                         self.antialias,

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/visualization/streamlines.py
--- a/yt/visualization/streamlines.py
+++ b/yt/visualization/streamlines.py
@@ -41,7 +41,7 @@
     zfield: field, optional
         The z component of the vector field to be streamlined.
         Default:'velocity_z'
-    volume : `yt.extensions.volume_rendering.HomogenizedVolume`, optional
+    volume : `yt.extensions.volume_rendering.AMRKDTree`, optional
         The volume to be streamlined.  Can be specified for
         finer-grained control, but otherwise will be automatically
         generated.  At this point it must use the AMRKDTree. 

diff -r c57126c86716b4a6cd2c687772685567fb45fdad -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 yt/visualization/volume_rendering/camera.py
--- a/yt/visualization/volume_rendering/camera.py
+++ b/yt/visualization/volume_rendering/camera.py
@@ -86,7 +86,7 @@
         vector.  Makes it easier to do rotations along a single
         axis.  If north_vector is specified, is switched to
         True. Default: False
-    volume : `yt.extensions.volume_rendering.HomogenizedVolume`, optional
+    volume : `yt.extensions.volume_rendering.AMRKDTree`, optional
         The volume to ray cast through.  Can be specified for finer-grained
         control, but otherwise will be automatically generated.
     fields : list of fields, optional
@@ -1609,7 +1609,7 @@
         The radial distance to cast to
     resolution : int
         The number of pixels in each direction.  Must be a single int.
-    volume : `yt.extensions.volume_rendering.HomogenizedVolume`, optional
+    volume : `yt.extensions.volume_rendering.AMRKDTree`, optional
         The volume to ray cast through.  Can be specified for finer-grained
         control, but otherwise will be automatically generated.
     fields : list of fields, optional
@@ -2301,7 +2301,7 @@
         If supplied, the field will be pre-multiplied by this, then divided by
         the integrated value of this field.  This returns an average rather
         than a sum.
-    volume : `yt.extensions.volume_rendering.HomogenizedVolume`, optional
+    volume : `yt.extensions.volume_rendering.AMRKDTree`, optional
         The volume to ray cast through.  Can be specified for finer-grained
         control, but otherwise will be automatically generated.
     no_ghost: bool, optional


https://bitbucket.org/yt_analysis/yt/commits/4d587415567c/
Changeset:   4d587415567c
Branch:      yt-3.0
User:        BW Keller
Date:        2014-03-28 17:39:19
Summary:     Changed domain left/right edge as per Matt Turk's suggestions.
Affected #:  2 files

diff -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 -r 4d587415567c90f92d13aa5742a80b61ede1fcae yt/frontends/sph/data_structures.py
--- a/yt/frontends/sph/data_structures.py
+++ b/yt/frontends/sph/data_structures.py
@@ -466,8 +466,8 @@
             self.domain_right_edge = np.zeros(3, "float64") + 0.5*self.parameters.get('dPeriod', 1)
         else:
             self.periodicity = (False, False, False)
-            self.domain_left_edge = 0
-            self.domain_right_edge = 0
+            self.domain_left_edge = None
+            self.domain_right_edge = None
         if self.parameters.get('bComove', False):
             self.cosmological_simulation = 1
             cosm = self._cosmology_parameters or {}

diff -r 314f05ee6bbecb982258776700ca2d2db6f0acf3 -r 4d587415567c90f92d13aa5742a80b61ede1fcae yt/frontends/sph/io.py
--- a/yt/frontends/sph/io.py
+++ b/yt/frontends/sph/io.py
@@ -539,7 +539,7 @@
         ind = 0
         # Check to make sure that the domain hasn't already been set
         # by the parameter file 
-        if pf.domain_left_edge != 0 and pf.domain_right_edge != 0:
+        if pf.domain_left_edge is not None and pf.domain_right_edge is not None:
             return
         with open(data_file.filename, "rb") as f:
             f.seek(pf._header_offset)


https://bitbucket.org/yt_analysis/yt/commits/333edf0db58a/
Changeset:   333edf0db58a
Branch:      yt-3.0
User:        MatthewTurk
Date:        2014-03-28 17:54:14
Summary:     Merged in bwkeller/yt/yt-3.0 (pull request #760)

Commented up the changes I've made
Affected #:  3 files

diff -r b28baf79bb7de836ed03be7c0819644549d566bc -r 333edf0db58a8316aab87eed13f9971d1eedd0db doc/source/examining/loading_data.rst
--- a/doc/source/examining/loading_data.rst
+++ b/doc/source/examining/loading_data.rst
@@ -367,16 +367,11 @@
 yt also supports loading Tipsy data.  Many of its characteristics are similar
 to how Gadget data is loaded; specifically, it shares its definition of
 indexing and mesh-identification with that described in
-:ref:`particle-indexing-criteria`.  However, unlike Gadget, the Tipsy frontend
-has not yet implemented header specifications, field specifications, or
-particle type specifications.  *These are all excellent projects for new
-contributors!*
-
+:ref:`particle-indexing-criteria`.  
 
 .. code-block:: python
 
-    ds = TipsyDataset("./halo1e11_run1.00400", endian="<",
-                           field_dtypes = {"Coordinates": "d"})
+    ds = load("./halo1e11_run1.00400")
 
 .. _specifying-cosmology-tipsy:
 

diff -r b28baf79bb7de836ed03be7c0819644549d566bc -r 333edf0db58a8316aab87eed13f9971d1eedd0db yt/frontends/sph/data_structures.py
--- a/yt/frontends/sph/data_structures.py
+++ b/yt/frontends/sph/data_structures.py
@@ -351,6 +351,7 @@
         assert file_id == 0
         super(TipsyFile, self).__init__(pf, io, filename, file_id)
         io._create_dtypes(self)
+        io._update_domain(self)#Check automatically what the domain size is
 
 
 class TipsyDataset(ParticleDataset):
@@ -369,23 +370,25 @@
 
     def __init__(self, filename, dataset_type="tipsy",
                  field_dtypes=None,
-                 domain_left_edge=None,
-                 domain_right_edge=None,
                  unit_base=None,
                  cosmology_parameters=None,
                  parameter_file=None,
                  n_ref=64, over_refine_factor=1):
         self.n_ref = n_ref
         self.over_refine_factor = over_refine_factor
-        self.endian = self._validate_header(filename)[1]
+        success, self.endian = self._validate_header(filename)
+        if not success:
+            print "SOMETHING HAS GONE WRONG.  NBODIES != SUM PARTICLES."
+            print "%s != (%s == %s + %s + %s)" % (
+                self.parameters['nbodies'],
+                tot,
+                self.parameters['nsph'],
+                self.parameters['ndark'],
+                self.parameters['nstar'])
+            print "Often this can be fixed by changing the 'endian' parameter."
+            print "This defaults to '>' but may in fact be '<'."
+            raise RuntimeError
         self.storage_filename = None
-        if domain_left_edge is None:
-            domain_left_edge = np.zeros(3, "float64") - 0.5
-        if domain_right_edge is None:
-            domain_right_edge = np.zeros(3, "float64") + 0.5
-
-        self.domain_left_edge = np.array(domain_left_edge, dtype="float64")
-        self.domain_right_edge = np.array(domain_right_edge, dtype="float64")
 
         # My understanding is that dtypes are set on a field by field basis,
         # not on a (particle type, field) basis
@@ -421,6 +424,7 @@
         self.refine_by = 2
         self.parameters["HydroMethod"] = "sph"
 
+
         self.unique_identifier = \
             int(os.stat(self.parameter_filename)[stat.ST_CTIME])
 
@@ -457,21 +461,13 @@
         self.domain_dimensions = np.ones(3, "int32") * nz
         if self.parameters.get('bPeriodic', True):
             self.periodicity = (True, True, True)
+            # If we are periodic, that sets our domain width to either 1 or dPeriod.
+            self.domain_left_edge = np.zeros(3, "float64") - 0.5*self.parameters.get('dPeriod', 1)
+            self.domain_right_edge = np.zeros(3, "float64") + 0.5*self.parameters.get('dPeriod', 1)
         else:
             self.periodicity = (False, False, False)
-        tot = sum(self.parameters[ptype] for ptype
-                  in ('nsph', 'ndark', 'nstar'))
-        if tot != self.parameters['nbodies']:
-            print "SOMETHING HAS GONE WRONG.  NBODIES != SUM PARTICLES."
-            print "%s != (%s == %s + %s + %s)" % (
-                self.parameters['nbodies'],
-                tot,
-                self.parameters['nsph'],
-                self.parameters['ndark'],
-                self.parameters['nstar'])
-            print "Often this can be fixed by changing the 'endian' parameter."
-            print "This defaults to '>' but may in fact be '<'."
-            raise RuntimeError
+            self.domain_left_edge = None
+            self.domain_right_edge = None
         if self.parameters.get('bComove', False):
             self.cosmological_simulation = 1
             cosm = self._cosmology_parameters or {}
@@ -516,6 +512,12 @@
 
     @staticmethod
     def _validate_header(filename):
+        '''
+        This method automatically detects whether the tipsy file is big/little endian
+        and is not corrupt/invalid.  It returns a tuple of (Valid, endianswap) where
+        Valid is a boolean that is true if the file is a tipsy file, and endianswap is 
+        the endianness character '>' or '<'.
+        '''
         try:
             f = open(filename,'rb')
         except:

diff -r b28baf79bb7de836ed03be7c0819644549d566bc -r 333edf0db58a8316aab87eed13f9971d1eedd0db yt/frontends/sph/io.py
--- a/yt/frontends/sph/io.py
+++ b/yt/frontends/sph/io.py
@@ -418,7 +418,8 @@
 
     def _read_aux_fields(self, field, mask, data_file):
         """
-        Read in auxiliary files from gasoline/pkdgrav 
+        Read in auxiliary files from gasoline/pkdgrav.
+        This method will automatically detect the format of the file.
         """
         filename = data_file.filename+'.'+field
         dtype = None
@@ -528,6 +529,41 @@
                     yield (ptype, field), tf.pop(field)
             f.close()
 
+    def _update_domain(self, data_file):
+        '''
+        This method is used to determine the size needed for a box that will 
+        bound the particles.  It simply finds the largest position of the
+        whole set of particles, and sets the domain to +/- that value.
+        '''
+        pf = data_file.pf
+        ind = 0
+        # Check to make sure that the domain hasn't already been set
+        # by the parameter file 
+        if pf.domain_left_edge is not None and pf.domain_right_edge is not None:
+            return
+        with open(data_file.filename, "rb") as f:
+            f.seek(pf._header_offset)
+            for iptype, ptype in enumerate(self._ptypes):
+                # We'll just add the individual types separately
+                count = data_file.total_particles[ptype]
+                if count == 0: continue
+                start, stop = ind, ind + count
+                while ind < stop:
+                    c = min(CHUNKSIZE, stop - ind)
+                    pp = np.fromfile(f, dtype = self._pdtypes[ptype],
+                                     count = c)
+                    for ax in 'xyz':
+                        mi = pp["Coordinates"][ax].min()
+                        ma = pp["Coordinates"][ax].max()
+                        outlier = YTArray(np.max(np.abs((mi,ma))), 'code_length')
+                    if outlier > pf.domain_right_edge or -outlier < pf.domain_left_edge:
+                        pf.domain_left_edge = -outlier
+                        pf.domain_right_edge = outlier
+                    ind += c
+        pf.domain_left_edge = np.ones(3)*pf.domain_left_edge
+        pf.domain_right_edge = np.ones(3)*pf.domain_right_edge
+        pf.domain_width = np.ones(3)*2*pf.domain_right_edge
+
     def _initialize_index(self, data_file, regions):
         pf = data_file.pf
         morton = np.empty(sum(data_file.total_particles.values()),

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