[yt-svn] commit/yt: 6 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Tue Dec 19 15:22:34 PST 2017
6 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/7884b37a6951/
Changeset: 7884b37a6951
User: atmyers
Date: 2017-12-18 23:56:59+00:00
Summary: Due to a change in AMReX, these file names can have either 4 or 5 digits.
Affected #: 1 file
diff -r 7731f952da66a137239a2a6a312997c404c2d58c -r 7884b37a6951f7461f19ed7ed5411dd276ed3861 yt/frontends/boxlib/data_structures.py
--- a/yt/frontends/boxlib/data_structures.py
+++ b/yt/frontends/boxlib/data_structures.py
@@ -37,6 +37,8 @@
get_box_grids_level
from yt.utilities.io_handler import \
io_registry
+from yt.utilities.exceptions import \
+ YTException
from .fields import \
BoxlibFieldInfo, \
@@ -571,7 +573,13 @@
self.ds._particle_type_counts = {}
self.ds._particle_type_counts[directory_name] = num_parts
- base_particle_fn = self.ds.output_dir + '/' + directory_name + "/Level_%d/DATA_%.4d"
+ base = self.ds.output_dir + '/' + directory_name
+ if (len(glob.glob(base + "/Level_?/DATA_????")) > 0):
+ base_particle_fn = self.ds.output_dir + '/' + directory_name + "/Level_%d/DATA_%.4d"
+ elif (len(glob.glob(base + "/Level_?/DATA_?????")) > 0):
+ base_particle_fn = self.ds.output_dir + '/' + directory_name + "/Level_%d/DATA_%.5d"
+ else:
+ raise YTException("Could not find any particle data files.")
gid = 0
for lev, data in self.particle_headers[directory_name].data_map.items():
https://bitbucket.org/yt_analysis/yt/commits/8a1db9dbf7d9/
Changeset: 8a1db9dbf7d9
User: atmyers
Date: 2017-12-19 01:33:46+00:00
Summary: just return if no particle data files are found.
Affected #: 1 file
diff -r 7884b37a6951f7461f19ed7ed5411dd276ed3861 -r 8a1db9dbf7d9767b5a1a535987fcf11434f578dd yt/frontends/boxlib/data_structures.py
--- a/yt/frontends/boxlib/data_structures.py
+++ b/yt/frontends/boxlib/data_structures.py
@@ -579,7 +579,7 @@
elif (len(glob.glob(base + "/Level_?/DATA_?????")) > 0):
base_particle_fn = self.ds.output_dir + '/' + directory_name + "/Level_%d/DATA_%.5d"
else:
- raise YTException("Could not find any particle data files.")
+ return
gid = 0
for lev, data in self.particle_headers[directory_name].data_map.items():
https://bitbucket.org/yt_analysis/yt/commits/519154a5ffb8/
Changeset: 519154a5ffb8
User: atmyers
Date: 2017-12-19 18:03:29+00:00
Summary: remove unused import
Affected #: 1 file
diff -r 8a1db9dbf7d9767b5a1a535987fcf11434f578dd -r 519154a5ffb823b5dea839a70910417d06939890 yt/frontends/boxlib/data_structures.py
--- a/yt/frontends/boxlib/data_structures.py
+++ b/yt/frontends/boxlib/data_structures.py
@@ -37,8 +37,6 @@
get_box_grids_level
from yt.utilities.io_handler import \
io_registry
-from yt.utilities.exceptions import \
- YTException
from .fields import \
BoxlibFieldInfo, \
https://bitbucket.org/yt_analysis/yt/commits/037569b9c9ea/
Changeset: 037569b9c9ea
User: atmyers
Date: 2017-12-19 20:35:39+00:00
Summary: use os.path.join for portability
Affected #: 1 file
diff -r 519154a5ffb823b5dea839a70910417d06939890 -r 037569b9c9ea46c3499761e32926a1d2135962e1 yt/frontends/boxlib/data_structures.py
--- a/yt/frontends/boxlib/data_structures.py
+++ b/yt/frontends/boxlib/data_structures.py
@@ -572,10 +572,10 @@
self.ds._particle_type_counts[directory_name] = num_parts
base = self.ds.output_dir + '/' + directory_name
- if (len(glob.glob(base + "/Level_?/DATA_????")) > 0):
- base_particle_fn = self.ds.output_dir + '/' + directory_name + "/Level_%d/DATA_%.4d"
- elif (len(glob.glob(base + "/Level_?/DATA_?????")) > 0):
- base_particle_fn = self.ds.output_dir + '/' + directory_name + "/Level_%d/DATA_%.5d"
+ if (len(glob.glob(os.path.join(base, "Level_?", "DATA_????"))) > 0):
+ base_particle_fn = os.path.join(base, "Level_%d", "DATA_%.4d")
+ elif (len(glob.glob(os.path.join(base, "Level_?", "DATA_?????"))) > 0):
+ base_particle_fn = os.path.join(base, "Level_%d", "DATA_%.5d")
else:
return
https://bitbucket.org/yt_analysis/yt/commits/7d11520e3a0c/
Changeset: 7d11520e3a0c
User: atmyers
Date: 2017-12-19 22:05:24+00:00
Summary: use os.path.join here too
Affected #: 1 file
diff -r 037569b9c9ea46c3499761e32926a1d2135962e1 -r 7d11520e3a0c1cd4c312283e5d89d3714dce6493 yt/frontends/boxlib/data_structures.py
--- a/yt/frontends/boxlib/data_structures.py
+++ b/yt/frontends/boxlib/data_structures.py
@@ -571,7 +571,7 @@
self.ds._particle_type_counts = {}
self.ds._particle_type_counts[directory_name] = num_parts
- base = self.ds.output_dir + '/' + directory_name
+ base = os.path.join(self.ds.output_dir, directory_name)
if (len(glob.glob(os.path.join(base, "Level_?", "DATA_????"))) > 0):
base_particle_fn = os.path.join(base, "Level_%d", "DATA_%.4d")
elif (len(glob.glob(os.path.join(base, "Level_?", "DATA_?????"))) > 0):
https://bitbucket.org/yt_analysis/yt/commits/4bdb4891377c/
Changeset: 4bdb4891377c
User: ngoldbaum
Date: 2017-12-19 23:21:17+00:00
Summary: Merge pull request #1653 from atmyers/pdata_file_bugfix
[Bugfix] Fix particle data file names in the Boxlib frontend
Affected #: 1 file
diff -r 7731f952da66a137239a2a6a312997c404c2d58c -r 4bdb4891377cc76dc4aa4ada826f0fc47b9ea4f9 yt/frontends/boxlib/data_structures.py
--- a/yt/frontends/boxlib/data_structures.py
+++ b/yt/frontends/boxlib/data_structures.py
@@ -571,7 +571,13 @@
self.ds._particle_type_counts = {}
self.ds._particle_type_counts[directory_name] = num_parts
- base_particle_fn = self.ds.output_dir + '/' + directory_name + "/Level_%d/DATA_%.4d"
+ base = os.path.join(self.ds.output_dir, directory_name)
+ if (len(glob.glob(os.path.join(base, "Level_?", "DATA_????"))) > 0):
+ base_particle_fn = os.path.join(base, "Level_%d", "DATA_%.4d")
+ elif (len(glob.glob(os.path.join(base, "Level_?", "DATA_?????"))) > 0):
+ base_particle_fn = os.path.join(base, "Level_%d", "DATA_%.5d")
+ else:
+ return
gid = 0
for lev, data in self.particle_headers[directory_name].data_map.items():
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