[yt-svn] commit/yt: 3 new changesets

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Thu Jul 9 10:12:22 PDT 2015


3 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/c2d27e708119/
Changeset:   c2d27e708119
Branch:      yt
User:        brittonsmith
Date:        2015-07-07 13:47:55+00:00
Summary:     Allowing rockstar frontend to handle empty datasets.
Affected #:  1 file

diff -r 4d383ff42e245a683b65a87e648cc7276e927a04 -r c2d27e708119163e917c7546793b3e79f0044770 yt/frontends/rockstar/io.py
--- a/yt/frontends/rockstar/io.py
+++ b/yt/frontends/rockstar/io.py
@@ -91,6 +91,7 @@
         morton = np.empty(pcount, dtype='uint64')
         mylog.debug("Initializing index % 5i (% 7i particles)",
                     data_file.file_id, pcount)
+        if pcount == 0: return morton
         ind = 0
         with open(data_file.filename, "rb") as f:
             f.seek(data_file._position_offset, os.SEEK_SET)
@@ -108,7 +109,7 @@
             # domain edges.  This helps alleviate that.
             np.clip(pos, self.ds.domain_left_edge + dx,
                          self.ds.domain_right_edge - dx, pos)
-            #del halos
+            del halos
             if np.any(pos.min(axis=0) < self.ds.domain_left_edge) or \
                np.any(pos.max(axis=0) > self.ds.domain_right_edge):
                 raise YTDomainOverflow(pos.min(axis=0),


https://bitbucket.org/yt_analysis/yt/commits/b0e974920ccf/
Changeset:   b0e974920ccf
Branch:      yt
User:        brittonsmith
Date:        2015-07-07 13:49:33+00:00
Summary:     Making sure Rockstar file count doesn't find files not associated with that dataset.
Affected #:  1 file

diff -r c2d27e708119163e917c7546793b3e79f0044770 -r b0e974920ccf46ed8caab99dbf13e1383226b748 yt/frontends/rockstar/data_structures.py
--- a/yt/frontends/rockstar/data_structures.py
+++ b/yt/frontends/rockstar/data_structures.py
@@ -73,7 +73,7 @@
             int(os.stat(self.parameter_filename)[stat.ST_CTIME])
         prefix = ".".join(self.parameter_filename.rsplit(".", 2)[:-2])
         self.filename_template = "%s.%%(num)s%s" % (prefix, self._suffix)
-        self.file_count = len(glob.glob(prefix + "*" + self._suffix))
+        self.file_count = len(glob.glob(prefix + ".*" + self._suffix))
         
         # Now we can set up things we already know.
         self.cosmological_simulation = 1


https://bitbucket.org/yt_analysis/yt/commits/a518935d5cfe/
Changeset:   a518935d5cfe
Branch:      yt
User:        chummels
Date:        2015-07-09 17:12:12+00:00
Summary:     Merged in brittonsmith/yt (pull request #1630)

[bugfix] Two minor Rockstar bugs (closes Issue #1041 and Issue #1042)
Affected #:  2 files

diff -r 8e7a932ed5cf0b086e38e9527f125b6e47e760a6 -r a518935d5cfec05f3c75c23b68c0f8f715a0391e yt/frontends/rockstar/data_structures.py
--- a/yt/frontends/rockstar/data_structures.py
+++ b/yt/frontends/rockstar/data_structures.py
@@ -73,7 +73,7 @@
             int(os.stat(self.parameter_filename)[stat.ST_CTIME])
         prefix = ".".join(self.parameter_filename.rsplit(".", 2)[:-2])
         self.filename_template = "%s.%%(num)s%s" % (prefix, self._suffix)
-        self.file_count = len(glob.glob(prefix + "*" + self._suffix))
+        self.file_count = len(glob.glob(prefix + ".*" + self._suffix))
         
         # Now we can set up things we already know.
         self.cosmological_simulation = 1

diff -r 8e7a932ed5cf0b086e38e9527f125b6e47e760a6 -r a518935d5cfec05f3c75c23b68c0f8f715a0391e yt/frontends/rockstar/io.py
--- a/yt/frontends/rockstar/io.py
+++ b/yt/frontends/rockstar/io.py
@@ -91,6 +91,7 @@
         morton = np.empty(pcount, dtype='uint64')
         mylog.debug("Initializing index % 5i (% 7i particles)",
                     data_file.file_id, pcount)
+        if pcount == 0: return morton
         ind = 0
         with open(data_file.filename, "rb") as f:
             f.seek(data_file._position_offset, os.SEEK_SET)
@@ -108,7 +109,7 @@
             # domain edges.  This helps alleviate that.
             np.clip(pos, self.ds.domain_left_edge + dx,
                          self.ds.domain_right_edge - dx, pos)
-            #del halos
+            del halos
             if np.any(pos.min(axis=0) < self.ds.domain_left_edge) or \
                np.any(pos.max(axis=0) > self.ds.domain_right_edge):
                 raise YTDomainOverflow(pos.min(axis=0),

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