[yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Thu Aug 2 14:31:51 PDT 2012
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/5d442fd44c20/
changeset: 5d442fd44c20
branch: yt
user: jmoloney
date: 2012-08-02 22:07:37
summary: Fixed 'next' and 'previous' pointers in cosmology splices to point to the correct outputs.
affected #: 1 file
diff -r 6be71495cd039b5b433ff3df7095c77274b0e837 -r 5d442fd44c20f43cc484cec6ea76661502ad96a3 yt/analysis_modules/cosmological_observation/cosmology_splice.py
--- a/yt/analysis_modules/cosmological_observation/cosmology_splice.py
+++ b/yt/analysis_modules/cosmological_observation/cosmology_splice.py
@@ -184,7 +184,23 @@
mylog.info("create_cosmology_splice: Used %d data dumps to get from z = %f to %f." %
(len(cosmology_splice), far_redshift, near_redshift))
-
+
+ # change the 'next' and 'previous' pointers to point to the correct outputs for the created
+ # splice
+ for i, output in enumerate(cosmology_splice):
+ if len(cosmology_splice) == 1:
+ output['previous'] = None
+ output['next'] = None
+ elif i == 0:
+ output['previous'] = None
+ output['next'] = cosmology_splice[i + 1]
+ elif i == len(cosmology_splice) - 1:
+ output['previous'] = cosmology_splice[i - 1]
+ output['next'] = None
+ else:
+ output['previous'] = cosmology_splice[i - 1]
+ output['next'] = cosmology_splice[i + 1]
+
self.splice_outputs.sort(key=lambda obj: obj['time'])
return cosmology_splice
https://bitbucket.org/yt_analysis/yt/changeset/b1515007cc61/
changeset: b1515007cc61
branch: yt
user: brittonsmith
date: 2012-08-02 23:31:50
summary: Merged in jmoloney/yt (pull request #234)
affected #: 1 file
diff -r 946c6690c4033e304ffa2637573c505d1756c2ff -r b1515007cc61e41bda16e01cdc0579524eb14678 yt/analysis_modules/cosmological_observation/cosmology_splice.py
--- a/yt/analysis_modules/cosmological_observation/cosmology_splice.py
+++ b/yt/analysis_modules/cosmological_observation/cosmology_splice.py
@@ -184,7 +184,23 @@
mylog.info("create_cosmology_splice: Used %d data dumps to get from z = %f to %f." %
(len(cosmology_splice), far_redshift, near_redshift))
-
+
+ # change the 'next' and 'previous' pointers to point to the correct outputs for the created
+ # splice
+ for i, output in enumerate(cosmology_splice):
+ if len(cosmology_splice) == 1:
+ output['previous'] = None
+ output['next'] = None
+ elif i == 0:
+ output['previous'] = None
+ output['next'] = cosmology_splice[i + 1]
+ elif i == len(cosmology_splice) - 1:
+ output['previous'] = cosmology_splice[i - 1]
+ output['next'] = None
+ else:
+ output['previous'] = cosmology_splice[i - 1]
+ output['next'] = cosmology_splice[i + 1]
+
self.splice_outputs.sort(key=lambda obj: obj['time'])
return cosmology_splice
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