[yt-svn] commit/yt-3.0: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Mar 19 14:59:09 PDT 2013
2 new commits in yt-3.0:
https://bitbucket.org/yt_analysis/yt-3.0/commits/b73090c09e55/
changeset: b73090c09e55
branch: yt-3.0
user: MatthewTurk
date: 2013-03-19 22:57:50
summary: My typo broke the build.
affected #: 1 file
diff -r 5067013852c78606067c982e8d8c8d22692d0881 -r b73090c09e55acb5e69241a626e2bdfa9f14a237 yt/data_objects/tests/test_fields.py
--- a/yt/data_objects/tests/test_fields.py
+++ b/yt/data_objects/tests/test_fields.py
@@ -72,7 +72,7 @@
if not field.particle_type:
assert_equal(v1, dd1["gas", self.field_name])
if not needs_spatial:
- assert_almost_equal_nulp(v1, conv*field._function(field, dd2), 4)
+ assert_array_almost_equal_nulp(v1, conv*field._function(field, dd2), 4)
if not skip_grids:
for g in pf.h.grids:
g.field_parameters.update(_sample_parameters)
https://bitbucket.org/yt_analysis/yt-3.0/commits/b7a4dbc55e0c/
changeset: b7a4dbc55e0c
branch: yt-3.0
user: MatthewTurk
date: 2013-03-19 22:58:51
summary: Merge
affected #: 8 files
diff -r b73090c09e55acb5e69241a626e2bdfa9f14a237 -r b7a4dbc55e0c8e835ff314c1fe0e46e5f592ee7e .hgignore
--- a/.hgignore
+++ b/.hgignore
@@ -5,11 +5,16 @@
hdf5.cfg
png.cfg
yt_updater.log
+yt/frontends/artio/_artio_caller.c
yt/frontends/ramses/_ramses_reader.cpp
+yt/frontends/sph/smoothing_kernel.c
+yt/geometry/oct_container.c
+yt/geometry/selection_routines.c
yt/utilities/amr_utils.c
yt/utilities/kdtree/forthonf2c.h
yt/utilities/libconfig_wrapper.c
yt/utilities/spatial/ckdtree.c
+yt/utilities/lib/alt_ray_tracers.c
yt/utilities/lib/CICDeposit.c
yt/utilities/lib/ContourFinding.c
yt/utilities/lib/DepthFirstOctree.c
diff -r b73090c09e55acb5e69241a626e2bdfa9f14a237 -r b7a4dbc55e0c8e835ff314c1fe0e46e5f592ee7e yt/data_objects/universal_fields.py
--- a/yt/data_objects/universal_fields.py
+++ b/yt/data_objects/universal_fields.py
@@ -1,4 +1,5 @@
"""
+
The basic field info container resides here. These classes, code specific and
universal, are the means by which we access fields across YT, both derived and
native.
@@ -754,8 +755,9 @@
for i, ax in enumerate('xyz'):
np.subtract(data["%s%s" % (field_prefix, ax)], center[i], r)
if data.pf.periodicity[i] == True:
- np.subtract(DW[i], r, rdw)
np.abs(r, r)
+ np.subtract(r, DW[i], rdw)
+ np.abs(rdw, rdw)
np.minimum(r, rdw, r)
np.power(r, 2.0, r)
np.add(radius, r, radius)
diff -r b73090c09e55acb5e69241a626e2bdfa9f14a237 -r b7a4dbc55e0c8e835ff314c1fe0e46e5f592ee7e yt/frontends/enzo/data_structures.py
--- a/yt/frontends/enzo/data_structures.py
+++ b/yt/frontends/enzo/data_structures.py
@@ -288,7 +288,7 @@
if self.parameter_file.parameters["VersionNumber"] > 2.0:
active_particles = True
nap = {}
- for type in self.parameters["AppendActiveParticleType"]:
+ for type in self.parameters.get("AppendActiveParticleType", []):
nap[type] = []
else:
active_particles = False
@@ -309,7 +309,7 @@
if active_particles:
ptypes = _next_token_line("PresentParticleTypes", f)
counts = [int(c) for c in _next_token_line("ParticleTypeCounts", f)]
- for ptype in self.parameters["AppendActiveParticleType"]:
+ for ptype in self.parameters.get("AppendActiveParticleType", []):
if ptype in ptypes:
nap[ptype].append(counts[ptypes.index(ptype)])
else:
diff -r b73090c09e55acb5e69241a626e2bdfa9f14a237 -r b7a4dbc55e0c8e835ff314c1fe0e46e5f592ee7e yt/frontends/ramses/data_structures.py
--- a/yt/frontends/ramses/data_structures.py
+++ b/yt/frontends/ramses/data_structures.py
@@ -265,7 +265,8 @@
def select_fwidth(self, dobj):
# Recall domain_dimensions is the number of cells, not octs
- base_dx = 1.0/self.domain.pf.domain_dimensions
+ base_dx = (self.domain.pf.domain_width /
+ self.domain.pf.domain_dimensions)
widths = np.empty((self.cell_count, 3), dtype="float64")
dds = (2**self.ires(dobj))
for i in range(3):
diff -r b73090c09e55acb5e69241a626e2bdfa9f14a237 -r b7a4dbc55e0c8e835ff314c1fe0e46e5f592ee7e yt/frontends/sph/data_structures.py
--- a/yt/frontends/sph/data_structures.py
+++ b/yt/frontends/sph/data_structures.py
@@ -92,7 +92,8 @@
def select_fwidth(self, dobj):
# Recall domain_dimensions is the number of cells, not octs
- base_dx = 1.0/self.domain.pf.domain_dimensions
+ base_dx = (self.domain.pf.domain_width /
+ self.domain.pf.domain_dimensions)
widths = np.empty((self.cell_count, 3), dtype="float64")
dds = (2**self.ires(dobj))
for i in range(3):
diff -r b73090c09e55acb5e69241a626e2bdfa9f14a237 -r b7a4dbc55e0c8e835ff314c1fe0e46e5f592ee7e yt/geometry/cartesian_fields.py
--- a/yt/geometry/cartesian_fields.py
+++ b/yt/geometry/cartesian_fields.py
@@ -41,26 +41,26 @@
add_cart_field = CartesianFieldInfo.add_field
def _dx(field, data):
- return data.pf.domain_width[0] * data.fwidth[...,0]
+ return data.fwidth[...,0]
add_cart_field('dx', function=_dx, display_field=False)
def _dy(field, data):
- return data.pf.domain_width[1] * data.fwidth[...,1]
+ return data.fwidth[...,1]
add_cart_field('dy', function=_dy, display_field=False)
def _dz(field, data):
- return data.pf.domain_width[2] * data.fwidth[...,2]
+ return data.fwidth[...,2]
add_cart_field('dz', function=_dz, display_field=False)
def _coordX(field, data):
- return data.pf.domain_left_edge[0] + data.fcoords[...,0]
+ return data.fcoords[...,0]
add_cart_field('x', function=_coordX, display_field=False)
def _coordY(field, data):
- return data.pf.domain_left_edge[1] + data.fcoords[...,1]
+ return data.fcoords[...,1]
add_cart_field('y', function=_coordY, display_field=False)
def _coordZ(field, data):
- return data.pf.domain_left_edge[2] + data.fcoords[...,2]
+ return data.fcoords[...,2]
add_cart_field('z', function=_coordZ, display_field=False)
diff -r b73090c09e55acb5e69241a626e2bdfa9f14a237 -r b7a4dbc55e0c8e835ff314c1fe0e46e5f592ee7e yt/geometry/selection_routines.pyx
--- a/yt/geometry/selection_routines.pyx
+++ b/yt/geometry/selection_routines.pyx
@@ -467,7 +467,7 @@
temp -= self.domain_width[i]
elif temp < -self.domain_width[i]/2.0:
temp += self.domain_width[i]
- temp = temp - fclip(temp, -dds[i]/2.0, dds[i]/2.0)
+ #temp = temp - fclip(temp, -dds[i]/2.0, dds[i]/2.0)
dist2 += temp*temp
if dist2 <= self.radius2: return 1
return 0
diff -r b73090c09e55acb5e69241a626e2bdfa9f14a237 -r b7a4dbc55e0c8e835ff314c1fe0e46e5f592ee7e yt/utilities/tests/test_selectors.py
--- a/yt/utilities/tests/test_selectors.py
+++ b/yt/utilities/tests/test_selectors.py
@@ -20,7 +20,10 @@
data = pf.h.sphere(center, 0.25)
data.get_data()
# WARNING: this value has not be externally verified
- yield assert_equal, data.size, 19568
+ dd = pf.h.all_data()
+ dd.set_field_parameter("center", center)
+ n_outside = (dd["RadiusCode"] >= 0.25).sum()
+ assert_equal( data.size + n_outside, dd.size)
positions = np.array([data[ax] for ax in 'xyz'])
centers = np.tile( data.center, data.shape[0] ).reshape(data.shape[0],3).transpose()
@@ -28,4 +31,4 @@
pf.domain_right_edge-pf.domain_left_edge,
pf.periodicity)
# WARNING: this value has not been externally verified
- yield assert_almost_equal, dist.max(), 0.261806188752
+ yield assert_array_less, dist, 0.25
Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/
--
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