[Yt-svn] yt: 10 new changesets
hg at spacepope.org
hg at spacepope.org
Sun Nov 21 17:58:51 PST 2010
hg Repository: yt
details: yt/rev/4b18051fe941
changeset: 3542:4b18051fe941
user: Matthew Turk <matthewturk at gmail.com>
date:
Tue Sep 28 23:18:54 2010 -0700
description:
Initial pass at breaking current configuration and including an upgrade. All
old parameters have been audited, and these are the ones that are left.
hg Repository: yt
details: yt/rev/511bf1a1ea6d
changeset: 3543:511bf1a1ea6d
user: Matthew Turk <matthewturk at gmail.com>
date:
Tue Sep 28 23:23:19 2010 -0700
description:
Rethinking; not going to auto-create, and we'll put everything in a [yt]
section.
hg Repository: yt
details: yt/rev/6ac63d00d9fc
changeset: 3544:6ac63d00d9fc
user: Matthew Turk <matthewturk at gmail.com>
date:
Tue Nov 16 10:10:35 2010 -0700
description:
Merging from yt tip
hg Repository: yt
details: yt/rev/447be104901c
changeset: 3545:447be104901c
user: Matthew Turk <matthewturk at gmail.com>
date:
Tue Nov 16 10:21:43 2010 -0700
description:
Removing more of the lagos/raven names from docstrings and config file names
hg Repository: yt
details: yt/rev/a163f533be50
changeset: 3546:a163f533be50
user: Matthew Turk <matthewturk at gmail.com>
date:
Tue Nov 16 10:23:25 2010 -0700
description:
Fixing up the plugin configuration options
hg Repository: yt
details: yt/rev/1c3c7807f42b
changeset: 3547:1c3c7807f42b
user: Matthew Turk <matthewturk at gmail.com>
date:
Tue Nov 16 10:25:34 2010 -0700
description:
Populate the mods namespace a bit more
hg Repository: yt
details: yt/rev/a253b141448c
changeset: 3548:a253b141448c
user: Matthew Turk <matthewturk at gmail.com>
date:
Tue Nov 16 10:31:31 2010 -0700
description:
Importing ART components in mods and removing share_data, as drop.io no longer
exists.
hg Repository: yt
details: yt/rev/b860e72b786f
changeset: 3549:b860e72b786f
user: Matthew Turk <matthewturk at gmail.com>
date:
Sun Nov 21 20:56:00 2010 -0500
description:
Merging from the config update branch.
hg Repository: yt
details: yt/rev/612c22e46f9b
changeset: 3550:612c22e46f9b
user: Matthew Turk <matthewturk at gmail.com>
date:
Sun Nov 21 20:57:56 2010 -0500
description:
Closing branch
hg Repository: yt
details: yt/rev/34dc6bf24057
changeset: 3551:34dc6bf24057
user: Matthew Turk <matthewturk at gmail.com>
date:
Sun Nov 21 20:58:37 2010 -0500
description:
No-op merge to remove a topological head
diffstat:
doc/install_script.sh | 42 +-
yt/analysis_modules/halo_finding/halo_objects.py | 95 +-
yt/analysis_modules/halo_finding/parallel_hop/parallel_hop_interface.py | 3 +-
yt/analysis_modules/halo_finding/parallel_hop/setup.py | 2 +-
yt/analysis_modules/halo_profiler/multi_halo_profiler.py | 59 +-
yt/analysis_modules/light_cone/light_cone.py | 6 +-
yt/analysis_modules/sunrise_export/sunrise_exporter.py | 229 +-
yt/analysis_modules/two_point_functions/two_point_functions.py | 8 +-
yt/config.py | 143 +-
yt/convenience.py | 5 +-
yt/data_objects/data_containers.py | 249 +-
yt/data_objects/field_info_container.py | 1 +
yt/data_objects/grid_patch.py | 53 +-
yt/data_objects/hierarchy.py | 4 +-
yt/data_objects/profiles.py | 42 +
yt/data_objects/static_output.py | 2 +-
yt/data_objects/universal_fields.py | 2 +-
yt/frontends/art/__init__.py | 29 +
yt/frontends/art/api.py | 42 +
yt/frontends/art/data_structures.py | 579 +
yt/frontends/art/fields.py | 131 +
yt/frontends/art/io.py | 114 +
yt/frontends/art/setup.py | 10 +
yt/frontends/enzo/data_structures.py | 23 +-
yt/frontends/enzo/fields.py | 51 +-
yt/frontends/enzo/io.py | 7 +-
yt/frontends/flash/data_structures.py | 25 +-
yt/frontends/gadget/data_structures.py | 15 +-
yt/frontends/setup.py | 1 +
yt/funcs.py | 7 +-
yt/gui/tvtk_interface.py | 2 +-
yt/mods.py | 26 +-
yt/utilities/_amr_utils/DepthFirstOctree.pyx | 11 +-
yt/utilities/_amr_utils/RayIntegrators.pyx | 34 +-
yt/utilities/_amr_utils/VolumeIntegrator.pyx | 3 +
yt/utilities/_amr_utils/endian_swap.h | 14 +
yt/utilities/_amr_utils/fortran_reader.pyx | 232 +
yt/utilities/amr_kdtree/__init__.py | 4 +
yt/utilities/amr_kdtree/amr_kdtree.py | 1159 +
yt/utilities/amr_kdtree/api.py | 28 +
yt/utilities/amr_utils.c | 5976 +++++++--
yt/utilities/command_line.py | 3 +
yt/utilities/definitions.py | 3 +-
yt/utilities/delaunay/__init__.py | 4 +
yt/utilities/parallel_tools/parallel_analysis_interface.py | 313 +-
yt/utilities/performance_counters.py | 2 +-
yt/utilities/setup.py | 1 +
yt/utilities/share_data.py | 83 -
yt/visualization/api.py | 3 +
yt/visualization/easy_plots.py | 72 +
yt/visualization/eps_writer.py | 40 +-
yt/visualization/fixed_resolution.py | 2 +-
yt/visualization/image_writer.py | 1 +
yt/visualization/plot_collection.py | 75 +-
yt/visualization/plot_types.py | 4 +-
yt/visualization/volume_rendering/camera.py | 275 +-
yt/visualization/volume_rendering/grid_partitioner.py | 28 +-
yt/visualization/volume_rendering/transfer_functions.py | 40 +-
58 files changed, 7759 insertions(+), 2658 deletions(-)
diffs (truncated from 15099 to 300 lines):
diff -r d7e28cdce956 -r 34dc6bf24057 doc/install_script.sh
--- a/doc/install_script.sh Sat Sep 25 18:21:52 2010 -0700
+++ b/doc/install_script.sh Sun Nov 21 20:58:37 2010 -0500
@@ -37,6 +37,7 @@
INST_BZLIB=1 # On some systems, libbzip2 is missing. This can
# lead to broken mercurial installations.
INST_PNG=1 # Install a local libpng? Same things apply as with zlib.
+INST_ENZO=0 # Clone a copy of Enzo?
# If you've got YT some other place, set this to point to it.
YT_DIR=""
@@ -145,6 +146,10 @@
get_willwont ${INST_HG}
echo "be installing Mercurial"
+printf "%-15s = %s so I " "INST_ENZO" "${INST_ENZO}"
+get_willwont ${INST_ENZO}
+echo "be checking out Enzo"
+
echo
if [ -z "$HDF5_DIR" ]
@@ -229,8 +234,8 @@
[ $INST_BZLIB -eq 1 ] && get_enzotools bzip2-1.0.5.tar.gz
[ $INST_PNG -eq 1 ] && get_enzotools libpng-1.2.43.tar.gz
get_enzotools Python-2.6.3.tgz
-get_enzotools numpy-1.4.1.tar.gz
-get_enzotools matplotlib-0.99.3.tar.gz
+get_enzotools numpy-1.5.0.tar.gz
+get_enzotools matplotlib-1.0.0.tar.gz
get_enzotools mercurial-1.6.3.tar.gz
get_enzotools ipython-0.10.tar.gz
get_enzotools h5py-1.2.0.tar.gz
@@ -277,7 +282,7 @@
[ ! -e libpng-1.2.43 ] && tar xfz libpng-1.2.43.tar.gz
echo "Installing PNG"
cd libpng-1.2.43
- ( ./configure --prefix=${DEST_DIR}/ 2>&1 ) 1>> ${LOG_FILE} || do_exit
+ ( ./configure CFLAGS=-I${DEST_DIR}/include --prefix=${DEST_DIR}/ 2>&1 ) 1>> ${LOG_FILE} || do_exit
( make install 2>&1 ) 1>> ${LOG_FILE} || do_exit
touch done
cd ..
@@ -367,7 +372,7 @@
echo "Installing pip"
( ${DEST_DIR}/bin/easy_install-2.6 pip 2>&1 ) 1>> ${LOG_FILE} || do_exit
-do_setup_py numpy-1.4.1 ${NUMPY_ARGS}
+do_setup_py numpy-1.5.0 ${NUMPY_ARGS}
if [ -n "${MPL_SUPP_LDFLAGS}" ]
then
@@ -387,14 +392,14 @@
export CCFLAGS="${MPL_SUPP_CCFLAGS}"
echo "Setting CCFLAGS ${CCFLAGS}"
fi
-do_setup_py matplotlib-0.99.3
-if [-n "${OLD_LDFLAGS}" ]
+do_setup_py matplotlib-1.0.0
+if [ -n "${OLD_LDFLAGS}" ]
then
export LDFLAG=${OLD_LDFLAGS}
fi
-[-n "${OLD_LDFLAGS}" ] && export LDFLAGS=${OLD_LDFLAGS}
-[-n "${OLD_CXXFLAGS}" ] && export CXXFLAGS=${OLD_CXXFLAGS}
-[-n "${OLD_CCFLAGS}" ] && export CCFLAGS=${OLD_CCFLAGS}
+[ -n "${OLD_LDFLAGS}" ] && export LDFLAGS=${OLD_LDFLAGS}
+[ -n "${OLD_CXXFLAGS}" ] && export CXXFLAGS=${OLD_CXXFLAGS}
+[ -n "${OLD_CCFLAGS}" ] && export CCFLAGS=${OLD_CCFLAGS}
do_setup_py ipython-0.10
do_setup_py h5py-1.2.0
@@ -410,6 +415,14 @@
touch done
cd $MY_PWD
+if [ $INST_ENZO -eq 1 ]
+then
+ echo "Cloning a copy of Enzo."
+ cd ${DEST_DIR}/src/
+ ${HG_EXEC} clone https://enzo.googlecode.com/hg/ ./enzo-hg-stable
+ cd $MY_PWD
+fi
+
echo
echo
echo "========================================================================"
@@ -418,6 +431,7 @@
echo "To run from this new installation, the a few variables need to be"
echo "prepended with the following information:"
echo
+echo "YT_DEST => $DEST_DIR"
echo "PATH => $DEST_DIR/bin/"
echo "PYTHONPATH => $DEST_DIR/lib/python2.6/site-packages/"
echo "LD_LIBRARY_PATH => $DEST_DIR/lib/"
@@ -443,6 +457,16 @@
echo "$DEST_DIR/bin/hg"
echo
fi
+if [ $INST_ENZO -eq 1 ]
+then
+ echo "Enzo has also been checked out, but not built."
+ echo
+ echo "$DEST_DIR/src/enzo-hg-stable"
+ echo
+ echo "The value of YT_DEST can be used as an HDF5 installation location."
+ echo "Questions about Enzo should be directed to the Enzo User List."
+ echo
+fi
echo
echo "For support, see one of the following websites:"
echo
diff -r d7e28cdce956 -r 34dc6bf24057 yt/analysis_modules/halo_finding/halo_objects.py
--- a/yt/analysis_modules/halo_finding/halo_objects.py Sat Sep 25 18:21:52 2010 -0700
+++ b/yt/analysis_modules/halo_finding/halo_objects.py Sun Nov 21 20:58:37 2010 -0500
@@ -1328,10 +1328,10 @@
HaloList.write_out(self, filename)
class GenericHaloFinder(HaloList, ParallelAnalysisInterface):
- def __init__(self, pf, dm_only=True, padding=0.0):
+ def __init__(self, pf, ds, dm_only=True, padding=0.0):
self.pf = pf
self.hierarchy = pf.h
- self.center = (pf.domain_right_edge + pf.domain_left_edge)/2.0
+ self.center = (na.array(ds.right_edge) + na.array(ds.left_edge))/2.0
def _parse_halolist(self, threshold_adjustment):
groups, max_dens, hi = [], {}, 0
@@ -1473,7 +1473,8 @@
halo.write_particle_list(f)
class parallelHF(GenericHaloFinder, parallelHOPHaloList):
- def __init__(self, pf, threshold=160, dm_only=True, resize=True, rearrange=True,\
+ def __init__(self, pf, subvolume=None,threshold=160, dm_only=True, \
+ resize=True, rearrange=True,\
fancy_padding=True, safety=1.5, premerge=True, sample=0.03):
r"""Parallel HOP halo finder.
@@ -1528,7 +1529,12 @@
>>> pf = load("RedshiftOutput0000")
>>> halos = parallelHF(pf)
"""
- GenericHaloFinder.__init__(self, pf, dm_only, padding=0.0)
+ if subvolume is not None:
+ ds_LE = na.array(subvolume.left_edge)
+ ds_RE = na.array(subvolume.right_edge)
+ self._data_source = pf.h.all_data()
+ GenericHaloFinder.__init__(self, pf, self._data_source, dm_only,
+ padding=0.0)
self.padding = 0.0
self.num_neighbors = 65
self.safety = safety
@@ -1536,13 +1542,16 @@
period = pf.domain_right_edge - pf.domain_left_edge
topbounds = na.array([[0., 0., 0.], period])
# Cut up the volume evenly initially, with no padding.
- padded, LE, RE, self._data_source = self._partition_hierarchy_3d(padding=self.padding)
+ padded, LE, RE, self._data_source = \
+ self._partition_hierarchy_3d(ds=self._data_source,
+ padding=self.padding)
# also get the total mass of particles
yt_counters("Reading Data")
- # Adaptive subregions by bisection.
+ # Adaptive subregions by bisection. We do not load balance if we are
+ # analyzing a subvolume.
ds_names = ["particle_position_x","particle_position_y","particle_position_z"]
if ytcfg.getboolean("yt","inline") == False and \
- resize and self._mpi_get_size() != 1:
+ resize and self._mpi_get_size() != 1 and subvolume is None:
random.seed(self._mpi_get_rank())
cut_list = self._partition_hierarchy_3d_bisection_list()
root_points = self._subsample_points()
@@ -1569,7 +1578,8 @@
l = pf.domain_right_edge - pf.domain_left_edge
vol = l[0] * l[1] * l[2]
full_vol = vol
- if not fancy_padding:
+ # We will use symmetric padding when a subvolume is being used.
+ if not fancy_padding or subvolume is not None:
avg_spacing = (float(vol) / data.size)**(1./3.)
# padding is a function of inter-particle spacing, this is an
# approximation, but it's OK with the safety factor
@@ -1594,7 +1604,7 @@
bin_width = base_padding
num_bins = int(math.ceil(width / bin_width))
bins = na.arange(num_bins+1, dtype='float64') * bin_width + self._data_source.left_edge[dim]
- counts, bins = na.histogram(data, bins, new=True)
+ counts, bins = na.histogram(data, bins)
# left side.
start = 0
count = counts[0]
@@ -1626,6 +1636,13 @@
total_mass = self._mpi_allsum((self._data_source["ParticleMassMsun"].astype('float64')).sum())
if not self._distributed:
self.padding = (na.zeros(3,dtype='float64'), na.zeros(3,dtype='float64'))
+ # If we're using a subvolume, we now re-divide.
+ if subvolume is not None:
+ self._data_source = pf.h.periodic_region_strict([0.]*3, ds_LE, ds_RE)
+ # Cut up the volume.
+ padded, LE, RE, self._data_source = \
+ self._partition_hierarchy_3d(ds=self._data_source,
+ padding=0.)
self.bounds = (LE, RE)
(LE_padding, RE_padding) = self.padding
parallelHOPHaloList.__init__(self, self._data_source, self.padding, \
@@ -1734,7 +1751,8 @@
class HOPHaloFinder(GenericHaloFinder, HOPHaloList):
- def __init__(self, pf, threshold=160, dm_only=True, padding=0.02):
+ def __init__(self, pf, subvolume=None, threshold=160, dm_only=True,
+ padding=0.02):
r"""HOP halo finder.
Halos are built by:
@@ -1753,6 +1771,9 @@
Parameters
----------
pf : EnzoStaticOutput object
+ subvolume : A region over which HOP will be run, which can be used
+ to run HOP on a subvolume of the full volume. Default = None,
+ which defaults to the full volume automatically.
threshold : float
The density threshold used when building halos. Default = 160.0.
dm_only : bool
@@ -1769,37 +1790,49 @@
>>> pf = load("RedshiftOutput0000")
>>> halos = HaloFinder(pf)
"""
- GenericHaloFinder.__init__(self, pf, dm_only, padding)
-
- # do it once with no padding so the total_mass is correct (no duplicated particles)
+ if subvolume is not None:
+ ds_LE = na.array(subvolume.left_edge)
+ ds_RE = na.array(subvolume.right_edge)
+ self._data_source = pf.h.all_data()
+ GenericHaloFinder.__init__(self, pf, self._data_source, dm_only, padding)
+ # do it once with no padding so the total_mass is correct
+ # (no duplicated particles), and on the entire volume, even if only
+ # a small part is actually going to be used.
self.padding = 0.0
- padded, LE, RE, self._data_source = self._partition_hierarchy_3d(padding=self.padding)
+ padded, LE, RE, self._data_source = \
+ self._partition_hierarchy_3d(ds = self._data_source, padding=self.padding)
# For scaling the threshold, note that it's a passthrough
if dm_only:
select = self._get_dm_indices()
- total_mass = self._mpi_allsum((self._data_source["ParticleMassMsun"][select]).sum())
+ total_mass = \
+ self._mpi_allsum((self._data_source["ParticleMassMsun"][select]).sum(dtype='float64'))
else:
- total_mass = self._mpi_allsum(self._data_source["ParticleMassMsun"].sum())
+ total_mass = self._mpi_allsum(self._data_source["ParticleMassMsun"].sum(dtype='float64'))
# MJT: Note that instead of this, if we are assuming that the particles
# are all on different processors, we should instead construct an
# object representing the entire domain and sum it "lazily" with
# Derived Quantities.
+ if subvolume is not None:
+ self._data_source = pf.h.periodic_region_strict([0.]*3, ds_LE, ds_RE)
self.padding = padding #* pf["unitary"] # This should be clevererer
- padded, LE, RE, self._data_source = self._partition_hierarchy_3d(padding=self.padding)
+ padded, LE, RE, self._data_source = \
+ self._partition_hierarchy_3d(ds = self._data_source,
+ padding=self.padding)
self.bounds = (LE, RE)
# reflect particles around the periodic boundary
#self._reposition_particles((LE, RE))
if dm_only:
select = self._get_dm_indices()
- sub_mass = self._data_source["ParticleMassMsun"][select].sum()
+ sub_mass = self._data_source["ParticleMassMsun"][select].sum(dtype='float64')
else:
- sub_mass = self._data_source["ParticleMassMsun"].sum()
- HOPHaloList.__init__(self, self._data_source, threshold*total_mass/sub_mass, dm_only)
+ sub_mass = self._data_source["ParticleMassMsun"].sum(dtype='float64')
+ HOPHaloList.__init__(self, self._data_source,
+ threshold*total_mass/sub_mass, dm_only)
self._parse_halolist(total_mass/sub_mass)
self._join_halolists()
class FOFHaloFinder(GenericHaloFinder, FOFHaloList):
- def __init__(self, pf, link=0.2, dm_only=True, padding=0.02):
+ def __init__(self, pf, subvolume=None, link=0.2, dm_only=True, padding=0.02):
r"""Friends-of-friends halo finder.
Halos are found by linking together all pairs of particles closer than
@@ -1815,6 +1848,9 @@
Parameters
----------
pf : EnzoStaticOutput object
+ subvolume : A region over which FOF will be run, which can be used
+ to run FOF on a subvolume of the full volume. Default = None,
+ which defaults to the full volume automatically.
link : float
The interparticle distance (compared to the overall average)
used to build the halos. Default = 0.2.
@@ -1832,19 +1868,30 @@
>>> pf = load("RedshiftOutput0000")
>>> halos = FOFHaloFinder(pf)
"""
+ if subvolume is not None:
More information about the yt-svn
mailing list