[yt-svn] commit/yt: 3 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Fri Oct 13 18:31:23 PDT 2017
3 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/079f220597f1/
Changeset: 079f220597f1
User: ngoldbaum
Date: 2017-09-22 19:15:55+00:00
Summary: Ignore "xyz" fields in clump.save_as_dataset if needs_grid_type is true.
Fixes #1566
Affected #: 2 files
diff -r 92f604cded4654e4d63653cbec574dee30d11d68 -r 079f220597f1266368b4bca4783bd52ecb2e2616 yt/analysis_modules/level_sets/clump_handling.py
--- a/yt/analysis_modules/level_sets/clump_handling.py
+++ b/yt/analysis_modules/level_sets/clump_handling.py
@@ -302,14 +302,18 @@
field_data = {}
need_grid_positions = False
for f in self.base.data._determine_fields(fields) + contour_fields:
- field_data[f] = self.base[f]
if ds.field_info[f].particle_type:
if f[0] not in ptypes:
ptypes.append(f[0])
ftypes[f] = f[0]
else:
need_grid_positions = True
+ if f[1] in 'xyz':
+ # skip 'xyz' if a user passes that in because they
+ # will be added to ftypes below
+ continue
ftypes[f] = "grid"
+ field_data[f] = self.base[f]
if len(ptypes) > 0:
for ax in "xyz":
diff -r 92f604cded4654e4d63653cbec574dee30d11d68 -r 079f220597f1266368b4bca4783bd52ecb2e2616 yt/analysis_modules/level_sets/tests/test_clump_finding.py
--- a/yt/analysis_modules/level_sets/tests/test_clump_finding.py
+++ b/yt/analysis_modules/level_sets/tests/test_clump_finding.py
@@ -104,7 +104,8 @@
find_clumps(master_clump, c_min, c_max, step)
leaf_clumps = get_lowest_clumps(master_clump)
- fn = master_clump.save_as_dataset(fields=["density", "particle_mass"])
+ fn = master_clump.save_as_dataset(fields=["density", "x", "y", "z",
+ "particle_mass"])
ds2 = load(fn)
# compare clumps in the tree
https://bitbucket.org/yt_analysis/yt/commits/ce621e39b322/
Changeset: ce621e39b322
User: ngoldbaum
Date: 2017-09-28 19:30:11+00:00
Summary: check for dx, dy, and dz too
Affected #: 1 file
diff -r 079f220597f1266368b4bca4783bd52ecb2e2616 -r ce621e39b322442cc5e60d13b24325c7a0284ed9 yt/analysis_modules/level_sets/clump_handling.py
--- a/yt/analysis_modules/level_sets/clump_handling.py
+++ b/yt/analysis_modules/level_sets/clump_handling.py
@@ -308,7 +308,7 @@
ftypes[f] = f[0]
else:
need_grid_positions = True
- if f[1] in 'xyz':
+ if f[1] in ('x', 'y', 'z', 'dx', 'dy', 'dz'):
# skip 'xyz' if a user passes that in because they
# will be added to ftypes below
continue
https://bitbucket.org/yt_analysis/yt/commits/83e3515e10da/
Changeset: 83e3515e10da
User: ngoldbaum
Date: 2017-10-14 01:31:08+00:00
Summary: Merge pull request #1567 from ngoldbaum/clump-xyz-save
Ignore "xyz" fields in clump.save_as_dataset if needs_grid_type is true. Fixes #1566
Affected #: 2 files
diff -r 86308371c855d637f2dbe206611d872705fb4290 -r 83e3515e10daea0de17bdb8c6016664389b9aa0d yt/analysis_modules/level_sets/clump_handling.py
--- a/yt/analysis_modules/level_sets/clump_handling.py
+++ b/yt/analysis_modules/level_sets/clump_handling.py
@@ -302,14 +302,18 @@
field_data = {}
need_grid_positions = False
for f in self.base.data._determine_fields(fields) + contour_fields:
- field_data[f] = self.base[f]
if ds.field_info[f].particle_type:
if f[0] not in ptypes:
ptypes.append(f[0])
ftypes[f] = f[0]
else:
need_grid_positions = True
+ if f[1] in ('x', 'y', 'z', 'dx', 'dy', 'dz'):
+ # skip 'xyz' if a user passes that in because they
+ # will be added to ftypes below
+ continue
ftypes[f] = "grid"
+ field_data[f] = self.base[f]
if len(ptypes) > 0:
for ax in "xyz":
diff -r 86308371c855d637f2dbe206611d872705fb4290 -r 83e3515e10daea0de17bdb8c6016664389b9aa0d yt/analysis_modules/level_sets/tests/test_clump_finding.py
--- a/yt/analysis_modules/level_sets/tests/test_clump_finding.py
+++ b/yt/analysis_modules/level_sets/tests/test_clump_finding.py
@@ -104,7 +104,8 @@
find_clumps(master_clump, c_min, c_max, step)
leaf_clumps = get_lowest_clumps(master_clump)
- fn = master_clump.save_as_dataset(fields=["density", "particle_mass"])
+ fn = master_clump.save_as_dataset(fields=["density", "x", "y", "z",
+ "particle_mass"])
ds2 = load(fn)
# compare clumps in the tree
Repository URL: https://bitbucket.org/yt_analysis/yt/
--
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