[yt-svn] commit/yt: xarthisius: Merged in ngoldbaum/yt (pull request #1764)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Oct 5 11:30:38 PDT 2015


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/6824ad32014e/
Changeset:   6824ad32014e
Branch:      yt
User:        xarthisius
Date:        2015-10-05 18:30:21+00:00
Summary:     Merged in ngoldbaum/yt (pull request #1764)

[bugfix] Detect more types of ART files (closes #1071)
Affected #:  1 file

diff -r a541ba83d787b19a197045380d7e8229876be1fd -r 6824ad32014e5813f6c8ac3882ba88189ed2753d yt/frontends/art/data_structures.py
--- a/yt/frontends/art/data_structures.py
+++ b/yt/frontends/art/data_structures.py
@@ -193,7 +193,7 @@
         particle header, star files, etc.
         """
         base_prefix, base_suffix = filename_pattern['amr']
-        aexpstr = 'a'+file_amr.rsplit('a',1)[1].replace(base_suffix,'')
+        numericstr = file_amr.rsplit('_',1)[1].replace(base_suffix,'')
         possibles = glob.glob(os.path.dirname(os.path.abspath(file_amr))+"/*")
         for filetype, (prefix, suffix) in filename_pattern.items():
             # if this attribute is already set skip it
@@ -201,7 +201,10 @@
                 continue
             match = None
             for possible in possibles:
-                if possible.endswith(aexpstr+suffix):
+                if possible.endswith(numericstr+suffix):
+                    if os.path.basename(possible).startswith(prefix):
+                        match = possible
+                elif possible.endswith(suffix):
                     if os.path.basename(possible).startswith(prefix):
                         match = possible
             if match is not None:

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