[Yt-svn] yt: Fixing FLASH cosmology units for ener, fixing an import miss...
hg at spacepope.org
hg at spacepope.org
Tue Dec 7 19:16:19 PST 2010
hg Repository: yt
details: yt/rev/e6bd204c661f
changeset: 3580:e6bd204c661f
user: Matthew Turk <matthewturk at gmail.com>
date:
Tue Dec 07 19:16:00 2010 -0800
description:
Fixing FLASH cosmology units for ener, fixing an import miss for fixed res
projections, fixing FillBuffer to work properly for fixed res projections.
diffstat:
yt/data_objects/data_containers.py | 2 +-
yt/frontends/flash/data_structures.py | 2 ++
yt/utilities/data_point_utilities.c | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diffs (43 lines):
diff -r 5742a9d64de2 -r e6bd204c661f yt/data_objects/data_containers.py
--- a/yt/data_objects/data_containers.py Tue Dec 07 13:49:22 2010 -0800
+++ b/yt/data_objects/data_containers.py Tue Dec 07 19:16:00 2010 -0800
@@ -40,7 +40,7 @@
grid_points_in_volume, planar_points_in_volume, VoxelTraversal, \
QuadTree
from yt.utilities.data_point_utilities import CombineGrids, \
- DataCubeRefine, DataCubeReplace, FillRegion
+ DataCubeRefine, DataCubeReplace, FillRegion, FillBuffer
from yt.utilities.definitions import axis_names, x_dict, y_dict
from yt.utilities.parallel_tools.parallel_analysis_interface import \
ParallelAnalysisInterface
diff -r 5742a9d64de2 -r e6bd204c661f yt/frontends/flash/data_structures.py
--- a/yt/frontends/flash/data_structures.py Tue Dec 07 13:49:22 2010 -0800
+++ b/yt/frontends/flash/data_structures.py Tue Dec 07 19:16:00 2010 -0800
@@ -230,6 +230,7 @@
self.conversion_factors['dens'] = (1.0 + self.current_redshift)**3.0
self.conversion_factors['pres'] = (1.0 + self.current_redshift)**1.0
self.conversion_factors['eint'] = (1.0 + self.current_redshift)**-2.0
+ self.conversion_factors['ener'] = (1.0 + self.current_redshift)**-2.0
self.conversion_factors['temp'] = (1.0 + self.current_redshift)**-2.0
self.conversion_factors['velx'] = (1.0 + self.current_redshift)
self.conversion_factors['vely'] = self.conversion_factors['velx']
@@ -244,6 +245,7 @@
self.conversion_factors['dens'] = 1.0
self.conversion_factors['pres'] = 1.0
self.conversion_factors['eint'] = 1.0
+ self.conversion_factors['ener'] = 1.0
self.conversion_factors['temp'] = 1.0
self.conversion_factors['velx'] = 1.0
self.conversion_factors['vely'] = 1.0
diff -r 5742a9d64de2 -r e6bd204c661f yt/utilities/data_point_utilities.c
--- a/yt/utilities/data_point_utilities.c Tue Dec 07 13:49:22 2010 -0800
+++ b/yt/utilities/data_point_utilities.c Tue Dec 07 19:16:00 2010 -0800
@@ -1233,7 +1233,7 @@
ck = (ck < 0) ? ck + dw[2] : ck;
if ( ck < gzs*refratio || ck >= gze*refratio) continue;
gzi = floor(ck / refratio) - gzs;
- if (*(npy_int32*)PyArray_GETPTR3(mask, gxi,gyi,gzi) > 0)
+ if (refratio == 1 || *(npy_int32*)PyArray_GETPTR3(mask, gxi,gyi,gzi) > 0)
{
switch (axis) {
case 0: x_loc = cyi-cys; y_loc = czi-czs; break;
More information about the yt-svn
mailing list