[Yt-svn] yt: 12 new changesets

hg at spacepope.org hg at spacepope.org
Sun Jun 6 15:16:23 PDT 2010


hg Repository: yt
details:   yt/rev/cf72cd0296b9
changeset: 1734:cf72cd0296b9
user:      Matthew Turk <matthewturk at gmail.com>
date:
Fri Jun 04 20:02:06 2010 -0700
description:
Adding docstrings in NumPy format to the FixedResolutionBuffer object.

hg Repository: yt
details:   yt/rev/c8794ff7e84c
changeset: 1735:c8794ff7e84c
user:      mturk
date:
Tue Jun 01 09:55:13 2010 -0700
description:
[svn r1736] Adding initial import of coding standards and docstring examples and idioms.

hg Repository: yt
details:   yt/rev/ec092fc90fe0
changeset: 1736:ec092fc90fe0
user:      dcollins
date:
Wed Jun 02 15:40:28 2010 -0700
description:
[svn r1737] Added image scaling to green and alpha channels

hg Repository: yt
details:   yt/rev/788da1687cb0
changeset: 1737:788da1687cb0
user:      mturk
date:
Fri Jun 04 19:53:12 2010 -0700
description:
[svn r1738] This should fix the case where data_style == enzo_packed_3d *and* the paths in
the hierarchy are absolute.

hg Repository: yt
details:   yt/rev/d2a7a9253995
changeset: 1738:d2a7a9253995
user:      mturk
date:
Fri Jun 04 22:57:48 2010 -0700
description:
[svn r1739] Adding the long-overdue import of FRB-related machinery into mods.py.

hg Repository: yt
details:   yt/rev/b35c5a27743c
changeset: 1739:b35c5a27743c
user:      Matthew Turk <matthewturk at gmail.com>
date:
Fri Jun 04 23:16:55 2010 -0700
description:
Merging from trunk

hg Repository: yt
details:   yt/rev/25e560e75758
changeset: 1740:25e560e75758
user:      Matthew Turk <matthewturk at gmail.com>
date:
Sun Jun 06 00:32:09 2010 -0700
description:
Making progress on documenting the PlotCollection.

hg Repository: yt
details:   yt/rev/2c90c3422bd6
changeset: 1741:2c90c3422bd6
user:      Matthew Turk <matthewturk at gmail.com>
date:
Sun Jun 06 17:59:33 2010 -0400
description:
Adding a bunch of docstrings and removed the add_slice_interpolated.

hg Repository: yt
details:   yt/rev/b61c678bc5ca
changeset: 1742:b61c678bc5ca
user:      Matthew Turk <matthewturk at gmail.com>
date:
Sun Jun 06 18:14:04 2010 -0400
description:
Sam says this fixes non-equal width/height image saving

hg Repository: yt
details:   yt/rev/e47760306070
changeset: 1743:e47760306070
user:      Matthew Turk <matthewturk at gmail.com>
date:
Sun Jun 06 18:14:40 2010 -0400
description:
Re-cythonized

hg Repository: yt
details:   yt/rev/0b03d9c92d1c
changeset: 1744:0b03d9c92d1c
user:      Matthew Turk <matthewturk at gmail.com>
date:
Sun Jun 06 18:15:40 2010 -0400
description:
Fixed doc compilation failures

hg Repository: yt
details:   yt/rev/810aa16f6441
changeset: 1745:810aa16f6441
user:      Matthew Turk <matthewturk at gmail.com>
date:
Sun Jun 06 18:16:06 2010 -0400
description:
Merging

diffstat:

 yt/_amr_utils/png_writer.pyx           |     4 +-
 yt/amr_utils.c                         |  1159 +++++++++++++++++-------------------
 yt/extensions/MergerTree.py            |     9 +-
 yt/extensions/image_writer.py          |     4 +
 yt/extensions/kdtree/fKD.f90           |   173 +++++-
 yt/extensions/kdtree/fKD.v             |    42 +-
 yt/extensions/kdtree/fKD_source.f90    |    10 +-
 yt/lagos/HierarchyType.py              |     2 +-
 yt/lagos/OutputTypes.py                |    19 +-
 yt/lagos/StructureFunctionGenerator.py |   750 ------------------------
 yt/lagos/TwoPointFunctions.py          |   796 +++++++++++++++++++++++++
 yt/lagos/__init__.py                   |     2 +-
 yt/lagos/parallelHOP/parallelHOP.py    |     9 +-
 yt/mods.py                             |     6 +-
 yt/raven/FixedResolution.py            |   148 ++++-
 yt/raven/PlotCollection.py             |   464 +++++++++++---
 yt/raven/PlotTypes.py                  |     6 +-
 17 files changed, 2097 insertions(+), 1506 deletions(-)

diffs (truncated from 6358 to 300 lines):

diff -r d74f191d9663 -r 810aa16f6441 yt/_amr_utils/png_writer.pyx
--- a/yt/_amr_utils/png_writer.pyx	Thu Jun 03 15:23:06 2010 -0700
+++ b/yt/_amr_utils/png_writer.pyx	Sun Jun 06 18:16:06 2010 -0400
@@ -104,8 +104,8 @@
 
     # This is something of a translation of the matplotlib _png module
     cdef png_byte *pix_buffer = <png_byte *> buffer.data
-    cdef int width = buffer.shape[0]
-    cdef int height = buffer.shape[1]
+    cdef int width = buffer.shape[1]
+    cdef int height = buffer.shape[0]
 
     cdef FILE* fileobj = fopen(filename, "wb")
     cdef png_bytep *row_pointers
diff -r d74f191d9663 -r 810aa16f6441 yt/amr_utils.c
--- a/yt/amr_utils.c	Thu Jun 03 15:23:06 2010 -0700
+++ b/yt/amr_utils.c	Sun Jun 06 18:16:06 2010 -0400
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.12.1 on Wed May 26 14:57:59 2010 */
+/* Generated by Cython 0.12.1 on Sun Jun  6 18:13:46 2010 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -482,7 +482,7 @@
   PyObject *grids;
 };
 
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":549
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":552
  *         return 1
  * 
  * cdef class ProtoPrism:             # <<<<<<<<<<<<<<
@@ -515,7 +515,7 @@
   int refined_pos;
 };
 
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":517
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":520
  *             tf.eval_transfer(dt, self.dvs, rgba, grad)
  * 
  * cdef class GridFace:             # <<<<<<<<<<<<<<
@@ -580,7 +580,7 @@
   __pyx_t_5numpy_float64_t *y_vec;
 };
 
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":294
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":293
  *             tv[offset + k] = fv[k]
  * 
  * cdef class PartitionedGrid:             # <<<<<<<<<<<<<<
@@ -606,7 +606,7 @@
 };
 
 
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":517
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":520
  *             tf.eval_transfer(dt, self.dvs, rgba, grad)
  * 
  * cdef class GridFace:             # <<<<<<<<<<<<<<
@@ -634,7 +634,7 @@
 static struct __pyx_vtabstruct_2yt_9amr_utils_TransferFunctionProxy *__pyx_vtabptr_2yt_9amr_utils_TransferFunctionProxy;
 
 
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":549
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":552
  *         return 1
  * 
  * cdef class ProtoPrism:             # <<<<<<<<<<<<<<
@@ -665,7 +665,7 @@
 static struct __pyx_vtabstruct_2yt_9amr_utils_QuadTree *__pyx_vtabptr_2yt_9amr_utils_QuadTree;
 
 
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":223
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":222
  *             #rgba[i+3] += trgba[i] * (1.0 - rgba[i+3])*dt*trgba[i+3]
  * 
  * cdef class VectorPlane:             # <<<<<<<<<<<<<<
@@ -681,7 +681,7 @@
 static struct __pyx_vtabstruct_2yt_9amr_utils_VectorPlane *__pyx_vtabptr_2yt_9amr_utils_VectorPlane;
 
 
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":294
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":293
  *             tv[offset + k] = fv[k]
  * 
  * cdef class PartitionedGrid:             # <<<<<<<<<<<<<<
@@ -13550,106 +13550,27 @@
 static  void __pyx_f_2yt_9amr_utils_21TransferFunctionProxy_eval_transfer(struct __pyx_obj_2yt_9amr_utils_TransferFunctionProxy *__pyx_v_self, __pyx_t_5numpy_float64_t __pyx_v_dt, __pyx_t_5numpy_float64_t *__pyx_v_dvs, __pyx_t_5numpy_float64_t *__pyx_v_rgba, __pyx_t_5numpy_float64_t *__pyx_v_grad) {
   int __pyx_v_i;
   int __pyx_v_fid;
-  int __pyx_v_use;
   __pyx_t_5numpy_float64_t __pyx_v_ta;
   __pyx_t_5numpy_float64_t __pyx_v_trgba[6];
   int __pyx_t_1;
   int __pyx_t_2;
   int __pyx_t_3;
-  int __pyx_t_4;
-  int __pyx_t_5;
   __Pyx_RefNannySetupContext("eval_transfer");
   __Pyx_INCREF((PyObject *)__pyx_v_self);
 
-  /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":188
- *         # early-cutoff.  We check all the field tables, because we want to be
- *         # able to attenuate even in the presence of no emissivity.
- *         use = 0             # <<<<<<<<<<<<<<
- *         for i in range(self.n_field_tables):
- *             fid = self.field_tables[i].field_id
- */
-  __pyx_v_use = 0;
-
-  /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":189
- *         # able to attenuate even in the presence of no emissivity.
- *         use = 0
+  /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":194
+ *         #        use = 1
+ *         #        break
  *         for i in range(self.n_field_tables):             # <<<<<<<<<<<<<<
- *             fid = self.field_tables[i].field_id
- *             if (dvs[fid] >= self.field_tables[i].bounds[0]) and \
+ *             self.istorage[i] = FIT_get_value(&self.field_tables[i], dvs)
+ *         # We have to do this after the interpolation
  */
   __pyx_t_1 = __pyx_v_self->n_field_tables;
   for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
     __pyx_v_i = __pyx_t_2;
 
-    /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":190
- *         use = 0
- *         for i in range(self.n_field_tables):
- *             fid = self.field_tables[i].field_id             # <<<<<<<<<<<<<<
- *             if (dvs[fid] >= self.field_tables[i].bounds[0]) and \
- *                (dvs[fid] <= self.field_tables[i].bounds[1]):
- */
-    __pyx_v_fid = (__pyx_v_self->field_tables[__pyx_v_i]).field_id;
-
-    /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":191
- *         for i in range(self.n_field_tables):
- *             fid = self.field_tables[i].field_id
- *             if (dvs[fid] >= self.field_tables[i].bounds[0]) and \             # <<<<<<<<<<<<<<
- *                (dvs[fid] <= self.field_tables[i].bounds[1]):
- *                 use = 1
- */
-    __pyx_t_3 = ((__pyx_v_dvs[__pyx_v_fid]) >= ((__pyx_v_self->field_tables[__pyx_v_i]).bounds[0]));
-    if (__pyx_t_3) {
-
-      /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":192
- *             fid = self.field_tables[i].field_id
- *             if (dvs[fid] >= self.field_tables[i].bounds[0]) and \
- *                (dvs[fid] <= self.field_tables[i].bounds[1]):             # <<<<<<<<<<<<<<
- *                 use = 1
- *                 break
- */
-      __pyx_t_4 = ((__pyx_v_dvs[__pyx_v_fid]) <= ((__pyx_v_self->field_tables[__pyx_v_i]).bounds[1]));
-      __pyx_t_5 = __pyx_t_4;
-    } else {
-      __pyx_t_5 = __pyx_t_3;
-    }
-    if (__pyx_t_5) {
-
-      /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":193
- *             if (dvs[fid] >= self.field_tables[i].bounds[0]) and \
- *                (dvs[fid] <= self.field_tables[i].bounds[1]):
- *                 use = 1             # <<<<<<<<<<<<<<
- *                 break
- *         for i in range(self.n_field_tables):
- */
-      __pyx_v_use = 1;
-
-      /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":194
- *                (dvs[fid] <= self.field_tables[i].bounds[1]):
- *                 use = 1
- *                 break             # <<<<<<<<<<<<<<
- *         for i in range(self.n_field_tables):
- *             self.istorage[i] = FIT_get_value(&self.field_tables[i], dvs)
- */
-      goto __pyx_L4_break;
-      goto __pyx_L5;
-    }
-    __pyx_L5:;
-  }
-  __pyx_L4_break:;
-
-  /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":195
- *                 use = 1
- *                 break
- *         for i in range(self.n_field_tables):             # <<<<<<<<<<<<<<
- *             self.istorage[i] = FIT_get_value(&self.field_tables[i], dvs)
- *         # We have to do this after the interpolation
- */
-  __pyx_t_1 = __pyx_v_self->n_field_tables;
-  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
-    __pyx_v_i = __pyx_t_2;
-
-    /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":196
- *                 break
+    /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":195
+ *         #        break
  *         for i in range(self.n_field_tables):
  *             self.istorage[i] = FIT_get_value(&self.field_tables[i], dvs)             # <<<<<<<<<<<<<<
  *         # We have to do this after the interpolation
@@ -13658,7 +13579,7 @@
     (__pyx_v_self->istorage[__pyx_v_i]) = __pyx_f_2yt_9amr_utils_FIT_get_value((&(__pyx_v_self->field_tables[__pyx_v_i])), __pyx_v_dvs);
   }
 
-  /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":198
+  /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":197
  *             self.istorage[i] = FIT_get_value(&self.field_tables[i], dvs)
  *         # We have to do this after the interpolation
  *         for i in range(self.n_field_tables):             # <<<<<<<<<<<<<<
@@ -13669,7 +13590,7 @@
   for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
     __pyx_v_i = __pyx_t_2;
 
-    /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":199
+    /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":198
  *         # We have to do this after the interpolation
  *         for i in range(self.n_field_tables):
  *             fid = self.field_tables[i].weight_table_id             # <<<<<<<<<<<<<<
@@ -13678,22 +13599,22 @@
  */
     __pyx_v_fid = (__pyx_v_self->field_tables[__pyx_v_i]).weight_table_id;
 
-    /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":200
+    /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":199
  *         for i in range(self.n_field_tables):
  *             fid = self.field_tables[i].weight_table_id
  *             if fid != -1: self.istorage[i] *= self.istorage[fid]             # <<<<<<<<<<<<<<
  *         for i in range(6):
  *             trgba[i] = self.istorage[self.field_table_ids[i]]
  */
-    __pyx_t_5 = (__pyx_v_fid != -1);
-    if (__pyx_t_5) {
+    __pyx_t_3 = (__pyx_v_fid != -1);
+    if (__pyx_t_3) {
       (__pyx_v_self->istorage[__pyx_v_i]) *= (__pyx_v_self->istorage[__pyx_v_fid]);
-      goto __pyx_L10;
-    }
-    __pyx_L10:;
-  }
-
-  /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":201
+      goto __pyx_L7;
+    }
+    __pyx_L7:;
+  }
+
+  /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":200
  *             fid = self.field_tables[i].weight_table_id
  *             if fid != -1: self.istorage[i] *= self.istorage[fid]
  *         for i in range(6):             # <<<<<<<<<<<<<<
@@ -13703,7 +13624,7 @@
   for (__pyx_t_1 = 0; __pyx_t_1 < 6; __pyx_t_1+=1) {
     __pyx_v_i = __pyx_t_1;
 
-    /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":202
+    /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":201
  *             if fid != -1: self.istorage[i] *= self.istorage[fid]
  *         for i in range(6):
  *             trgba[i] = self.istorage[self.field_table_ids[i]]             # <<<<<<<<<<<<<<
@@ -13713,7 +13634,7 @@
     (__pyx_v_trgba[__pyx_v_i]) = (__pyx_v_self->istorage[(__pyx_v_self->field_table_ids[__pyx_v_i])]);
   }
 
-  /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":212
+  /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":211
  *         # integration here:
  *         #   I_{i+1} = ds * C_i + (1.0 - ds*alpha_i) * I_i
  *         for i in range(3):             # <<<<<<<<<<<<<<
@@ -13723,7 +13644,7 @@
   for (__pyx_t_1 = 0; __pyx_t_1 < 3; __pyx_t_1+=1) {
     __pyx_v_i = __pyx_t_1;
 
-    /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":216
+    /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":215
  *             # slice.  Previously it was ill-defined, but represented some
  *             # measure of emissivity.
  *             ta = fmax((1.0 - dt*trgba[i+3]), 0.0)             # <<<<<<<<<<<<<<
@@ -13732,7 +13653,7 @@
  */
     __pyx_v_ta = __pyx_f_2yt_9amr_utils_fmax((1.0 - (__pyx_v_dt * (__pyx_v_trgba[(__pyx_v_i + 3)]))), 0.0);
 
-    /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":217
+    /* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":216
  *             # measure of emissivity.
  *             ta = fmax((1.0 - dt*trgba[i+3]), 0.0)
  *             rgba[i  ] = dt*trgba[i  ] + ta * rgba[i  ]             # <<<<<<<<<<<<<<
@@ -13746,7 +13667,7 @@
   __Pyx_RefNannyFinishContext();
 }
 
-/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":233
+/* "/Users/matthewturk/yt/yt/yt/_amr_utils/VolumeIntegrator.pyx":232
  *     cdef np.float64_t *x_vec, *y_vec
  * 
  *     def __cinit__(self,             # <<<<<<<<<<<<<<
@@ -13819,41 +13740,41 @@
       values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__vp_dir);
       if (likely(values[1])) kw_args--;
       else {
-        __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 7, 7, 1); {__pyx_filename = __pyx_f[2]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L3_error;}



More information about the yt-svn mailing list