[Yt-svn] yt: 3 new changesets
hg at spacepope.org
hg at spacepope.org
Wed Mar 31 23:53:45 PDT 2010
hg Repository: yt
details: yt/rev/a5d4f0244d71
changeset: 1508:a5d4f0244d71
user: Matthew Turk <matthewturk at gmail.com>
date:
Wed Mar 31 20:49:02 2010 -0700
description:
Merging in changes to main yt branch
hg Repository: yt
details: yt/rev/6c258be975cf
changeset: 1509:6c258be975cf
user: Matthew Turk <matthewturk at gmail.com>
date:
Wed Mar 31 23:53:13 2010 -0700
description:
The ColorTransferFunction now has identical behavior as it did before.
hg Repository: yt
details: yt/rev/cdd9081a939a
changeset: 1510:cdd9081a939a
user: Matthew Turk <matthewturk at gmail.com>
date:
Wed Mar 31 23:53:37 2010 -0700
description:
Merging with latest yt
diffstat:
.hgignore | 3 +
doc/install_script_osx.sh | 15 +-
yt/amr_utils.c | 3049 +++++++++++++------------
yt/command_line.py | 1 +
yt/data_objects/analyzer_objects.py | 2 +-
yt/data_objects/time_series.py | 2 +-
yt/extensions/MergerTree.py | 436 ++-
yt/extensions/StarAnalysis.py | 24 +-
yt/extensions/image_panner/__init__.py | 26 +
yt/extensions/image_panner/pan_and_scan_widget.py | 255 ++
yt/extensions/image_panner/vm_panner.py | 407 +++
yt/extensions/lightcone/LightCone.py | 4 +-
yt/extensions/volume_rendering/TransferFunction.py | 61 +-
yt/extensions/volume_rendering/grid_partitioner.py | 12 +-
yt/extensions/volume_rendering/image_handling.py | 2 +-
yt/extensions/volume_rendering/software_sampler.py | 8 +-
yt/lagos/BaseDataTypes.py | 9 +-
yt/lagos/EnzoFields.py | 1 +
yt/lagos/HDF5LightReader.c | 7 +-
yt/lagos/HaloFinding.py | 34 +-
yt/lagos/HelperFunctions.py | 16 +-
yt/lagos/ParallelTools.py | 86 +-
yt/lagos/ParticleIO.py | 25 +-
yt/lagos/StructureFunctionGenerator.py | 709 ++++++
yt/lagos/UniversalFields.py | 5 -
yt/lagos/__init__.py | 2 +
yt/lagos/kd.py | 2 +-
yt/lagos/parallelHOP/parallelHOP.py | 10 +-
yt/mods.py | 2 +-
yt/raven/Callbacks.py | 36 +-
yt/raven/PlotTypes.py | 11 +-
yt/raven/_MPL.c | 43 +-
yt/recipes.py | 4 +-
yt/setup.py | 1 +
34 files changed, 3583 insertions(+), 1727 deletions(-)
diffs (truncated from 9009 to 300 lines):
diff -r ede5d76cddd4 -r cdd9081a939a .hgignore
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgignore Wed Mar 31 23:53:37 2010 -0700
@@ -0,0 +1,3 @@
+syntax: glob
+*.pyc
+.*.swp
diff -r ede5d76cddd4 -r cdd9081a939a doc/install_script_osx.sh
--- a/doc/install_script_osx.sh Tue Mar 16 23:26:18 2010 -0700
+++ b/doc/install_script_osx.sh Wed Mar 31 23:53:37 2010 -0700
@@ -50,6 +50,11 @@
echo
[ ! -e $1 ] && tar xfz $1.tar.gz
cd $1
+ if [ ! -z `echo $1 | grep h5py` ]
+ then
+ echo "${PY_DIR}/bin/python2.5 setup.py configure --hdf5=${HDF5_DIR}"
+ ( ${PY_DIR}/bin/python2.5 setup.py configure --hdf5=${HDF5_DIR} 2>&1 ) 1>> ${LOG_FILE} || do_exit
+ fi
shift
( sudo ${PY_DIR}/bin/python2.5 setup.py install $* 2>&1 ) 1>> ${LOG_FILE} || do_exit
touch done
@@ -127,8 +132,8 @@
get_enzotools wxPython2.8-osx-unicode-2.8.9.2-universal-py2.5.dmg
get_enzotools numpy-1.2.1-py2.5-macosx10.5.dmg
get_enzotools matplotlib-0.98.5.2-py2.5-mpkg.zip
-get_enzotools ipython-0.9.1.tar.gz
-get_enzotools h5py-1.1.0.tar.gz
+get_enzotools ipython-0.10.tar.gz
+get_enzotools h5py-1.2.0.tar.gz
if [ -z "$YT_DIR" ]
then
@@ -175,7 +180,7 @@
echo "Installing setuptools (needs sudo)"
echo
-( sudo ${PY_DIR}/bin/python2.5 ${YT_DIR}/ez_setup.py 2>&1 ) 1>> ${LOG_FILE} || do_exit
+( sudo ${PY_DIR}/bin/python2.5 ${YT_DIR}/distribute_setup.py 2>&1 ) 1>> ${LOG_FILE} || do_exit
[ ! -e ${DEST_DIR}/src/np_done ] && self_install \
numpy-1.2.1-py2.5-macosx10.5.dmg
@@ -188,8 +193,8 @@
touch ${DEST_DIR}/src/mp_done
fi
-do_setup_py ipython-0.9.1
-do_setup_py h5py-1.1.0
+do_setup_py ipython-0.10
+do_setup_py h5py-1.2.0
echo "Doing yt update"
MY_PWD=`pwd`
diff -r ede5d76cddd4 -r cdd9081a939a yt/amr_utils.c
--- a/yt/amr_utils.c Tue Mar 16 23:26:18 2010 -0700
+++ b/yt/amr_utils.c Wed Mar 31 23:53:37 2010 -0700
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.12.1 on Thu Mar 11 10:28:42 2010 */
+/* Generated by Cython 0.12.1 on Wed Mar 31 20:44:53 2010 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
@@ -380,24 +380,53 @@
/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":76
* cdef class VectorPlane
*
+ * cdef struct FieldInterpolationTable: # <<<<<<<<<<<<<<
+ * # Note that we make an assumption about retaining a reference to values
+ * # externally.
+ */
+
+struct __pyx_t_2yt_9amr_utils_FieldInterpolationTable {
+ __pyx_t_5numpy_float64_t *values;
+ __pyx_t_5numpy_float64_t bounds[2];
+ __pyx_t_5numpy_float64_t dbin;
+ __pyx_t_5numpy_float64_t idbin;
+ int field_id;
+ int weight_field_id;
+ int nbins;
+};
+
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":87
+ * int nbins
+ *
+ * cdef void FIT_initialize_table(FieldInterpolationTable *fit, int nbins, # <<<<<<<<<<<<<<
+ * np.float64_t *values, np.float64_t bounds1, np.float64_t bounds2,
+ * int field_id, int weight_field_id = -1):
+ */
+
+struct __pyx_opt_args_2yt_9amr_utils_FIT_initialize_table {
+ int __pyx_n;
+ int weight_field_id;
+};
+
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":112
+ * return (bv + dd*dy*fit.idbin)
+ *
* cdef class TransferFunctionProxy: # <<<<<<<<<<<<<<
- * cdef np.float64_t x_bounds[2]
- * cdef np.float64_t *vs[4]
+ * cdef int n_fields
+ * cdef int n_field_tables
*/
struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy {
PyObject_HEAD
struct __pyx_vtabstruct_2yt_9amr_utils_TransferFunctionProxy *__pyx_vtab;
- __pyx_t_5numpy_float64_t x_bounds[2];
- __pyx_t_5numpy_float64_t *vs[4];
- int nbins;
+ int n_fields;
+ int n_field_tables;
int ns;
- __pyx_t_5numpy_float64_t dbin;
- __pyx_t_5numpy_float64_t idbin;
- __pyx_t_5numpy_float64_t light_color[3];
- __pyx_t_5numpy_float64_t light_dir[3];
- int use_light;
+ struct __pyx_t_2yt_9amr_utils_FieldInterpolationTable field_tables[6];
+ __pyx_t_5numpy_float64_t istorage[6];
+ int field_table_ids[6];
PyObject *tf_obj;
+ PyObject *my_field_tables;
};
/* "/Users/matthewturk/yt/yt/yt/_amr_utils/DepthFirstOctree.pyx":36
@@ -431,7 +460,7 @@
PyObject *grids;
};
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":468
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":519
* return 1
*
* cdef class ProtoPrism: # <<<<<<<<<<<<<<
@@ -464,8 +493,8 @@
int refined_pos;
};
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":436
- * tf.eval_transfer(dt, dv, rgba, grad)
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":487
+ * tf.eval_transfer(dt, self.dvs, rgba, grad)
*
* cdef class GridFace: # <<<<<<<<<<<<<<
* cdef int direction
@@ -486,7 +515,7 @@
*
* cdef class VectorPlane # <<<<<<<<<<<<<<
*
- * cdef class TransferFunctionProxy:
+ * cdef struct FieldInterpolationTable:
*/
struct __pyx_obj_2yt_9amr_utils_VectorPlane {
@@ -510,7 +539,7 @@
__pyx_t_5numpy_float64_t *y_vec;
};
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":216
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":266
* tv[(((k*self.nv[1])+j)*self.nv[0]+i)] = fv[k]
*
* cdef class PartitionedGrid: # <<<<<<<<<<<<<<
@@ -524,17 +553,19 @@
PyObject *my_data;
PyObject *LeftEdge;
PyObject *RightEdge;
- __pyx_t_5numpy_float64_t *data;
+ __pyx_t_5numpy_float64_t *data[6];
+ __pyx_t_5numpy_float64_t dvs[6];
__pyx_t_5numpy_float64_t left_edge[3];
__pyx_t_5numpy_float64_t right_edge[3];
__pyx_t_5numpy_float64_t dds[3];
__pyx_t_5numpy_float64_t idds[3];
int dims[3];
int parent_grid_id;
-};
-
-
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":468
+ int n_fields;
+};
+
+
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":519
* return 1
*
* cdef class ProtoPrism: # <<<<<<<<<<<<<<
@@ -548,8 +579,8 @@
static struct __pyx_vtabstruct_2yt_9amr_utils_ProtoPrism *__pyx_vtabptr_2yt_9amr_utils_ProtoPrism;
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":152
- * rgba[i] += ta*trgba[i]
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":202
+ * rgba[i+3] = dt*trgba[i+3] + ta * rgba[i+3]
*
* cdef class VectorPlane: # <<<<<<<<<<<<<<
* cdef public object avp_pos, avp_dir, acenter, aimage
@@ -564,7 +595,7 @@
static struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *__pyx_vtabptr_2yt_9amr_utils_VectorPlane;
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":216
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":266
* tv[(((k*self.nv[1])+j)*self.nv[0]+i)] = fv[k]
*
* cdef class PartitionedGrid: # <<<<<<<<<<<<<<
@@ -580,8 +611,8 @@
static struct __pyx_vtabstruct_2yt_9amr_utils_PartitionedGrid *__pyx_vtabptr_2yt_9amr_utils_PartitionedGrid;
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":436
- * tf.eval_transfer(dt, dv, rgba, grad)
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":487
+ * tf.eval_transfer(dt, self.dvs, rgba, grad)
*
* cdef class GridFace: # <<<<<<<<<<<<<<
* cdef int direction
@@ -594,17 +625,16 @@
static struct __pyx_vtabstruct_2yt_9amr_utils_GridFace *__pyx_vtabptr_2yt_9amr_utils_GridFace;
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":76
- * cdef class VectorPlane
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":112
+ * return (bv + dd*dy*fit.idbin)
*
* cdef class TransferFunctionProxy: # <<<<<<<<<<<<<<
- * cdef np.float64_t x_bounds[2]
- * cdef np.float64_t *vs[4]
+ * cdef int n_fields
+ * cdef int n_field_tables
*/
struct __pyx_vtabstruct_2yt_9amr_utils_TransferFunctionProxy {
- void (*interpolate)(struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t *);
- void (*eval_transfer)(struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
+ void (*eval_transfer)(struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *, __pyx_t_5numpy_float64_t, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *, __pyx_t_5numpy_float64_t *);
};
static struct __pyx_vtabstruct_2yt_9amr_utils_TransferFunctionProxy *__pyx_vtabptr_2yt_9amr_utils_TransferFunctionProxy;
@@ -776,40 +806,6 @@
#define __Pyx_BufPtrStrided3d(type, buf, i0, s0, i1, s1, i2, s2) (type)((char*)buf + i0 * s0 + i1 * s1 + i2 * s2)
static void __Pyx_RaiseBufferIndexError(int axis); /*proto*/
-static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
-
-static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void);
-
-static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
-static int __Pyx_EndUnpack(PyObject *); /*proto*/
-
-#define __Pyx_SetItemInt(o, i, v, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
- __Pyx_SetItemInt_Fast(o, i, v, size <= sizeof(long)) : \
- __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
-
-static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
- int r;
- if (!j) return -1;
- r = PyObject_SetItem(o, j, v);
- Py_DECREF(j);
- return r;
-}
-
-static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int fits_long) {
- if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
- Py_INCREF(v);
- Py_DECREF(PyList_GET_ITEM(o, i));
- PyList_SET_ITEM(o, i, v);
- return 1;
- }
- else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_ass_item && (likely(i >= 0)))
- return PySequence_SetItem(o, i, v);
- else {
- PyObject *j = fits_long ? PyInt_FromLong(i) : PyLong_FromLongLong(i);
- return __Pyx_SetItemInt_Generic(o, j, v);
- }
-}
-
static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
if (likely(PyList_CheckExact(L))) {
if (PyList_Append(L, x) < 0) return NULL;
@@ -826,6 +822,40 @@
}
}
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(void);
+
+static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
+static int __Pyx_EndUnpack(PyObject *); /*proto*/
+
+#define __Pyx_SetItemInt(o, i, v, size, to_py_func) ((size <= sizeof(Py_ssize_t)) ? \
+ __Pyx_SetItemInt_Fast(o, i, v, size <= sizeof(long)) : \
+ __Pyx_SetItemInt_Generic(o, to_py_func(i), v))
+
+static CYTHON_INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
More information about the yt-svn
mailing list