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

Bitbucket commits-noreply at bitbucket.org
Fri Jan 4 11:53:04 PST 2013


2 new commits in yt:

https://bitbucket.org/yt_analysis/yt/commits/6d71f5517955/
changeset:   6d71f5517955
branch:      yt
user:        brittonsmith
date:        2013-01-04 20:47:24
summary:     Properly setting final time and redshift for simulation time series
when outputs are found by searching the directory.
affected #:  2 files

diff -r 16343bdac0321763c1dd7b7daa3c8643e94eacad -r 6d71f5517955baa878d0688058f169bd2fb7dfcb yt/data_objects/time_series.py
--- a/yt/data_objects/time_series.py
+++ b/yt/data_objects/time_series.py
@@ -346,10 +346,10 @@
 
         # Figure out the starting and stopping times and redshift.
         self._calculate_simulation_bounds()
-        self.print_key_parameters()
-
         # Get all possible datasets.
         self._get_all_outputs(find_outputs=find_outputs)
+        
+        self.print_key_parameters()
 
     def __repr__(self):
         return self.parameter_filename
@@ -377,3 +377,5 @@
                     continue
                 v = getattr(self, a)
                 mylog.info("Parameters: %-25s = %s", a, v)
+        mylog.info("Total datasets: %d." % len(self.all_outputs))
+

diff -r 16343bdac0321763c1dd7b7daa3c8643e94eacad -r 6d71f5517955baa878d0688058f169bd2fb7dfcb yt/frontends/enzo/simulation_handling.py
--- a/yt/frontends/enzo/simulation_handling.py
+++ b/yt/frontends/enzo/simulation_handling.py
@@ -433,8 +433,6 @@
             if self.parameters['CycleSkipDataDump'] <= 0:
                 self.all_outputs.sort(key=lambda obj:obj['time'])
 
-        mylog.info("Total datasets: %d." % len(self.all_outputs))
-
     def _calculate_simulation_bounds(self):
         """
         Figure out the starting and stopping time and redshift for the simulation.
@@ -532,6 +530,12 @@
         self.all_outputs.sort(key=lambda obj: obj['time'])
         mylog.info("Located %d total outputs." % len(self.all_outputs))
 
+        # manually set final time and redshift with last output
+        if self.all_outputs:
+            self.final_time = self.all_outputs[-1]['time']
+            if self.cosmological_simulation:
+                self.final_redshift = self.all_outputs[-1]['redshift']
+
     def _check_for_outputs(self, potential_outputs):
         r"""Check a list of files to see if they are valid datasets."""
 


https://bitbucket.org/yt_analysis/yt/commits/554d144d9d24/
changeset:   554d144d9d24
branch:      yt
user:        MatthewTurk
date:        2013-01-04 20:53:01
summary:     Merged in brittonsmith/yt (pull request #390: Properly setting final time and redshift for simulation time series.)
affected #:  2 files

diff -r b0a41c2163cf6f6439295841c2038ab50d2658b4 -r 554d144d9d248c6f70d8c665a5963aa39b2d6bb3 yt/data_objects/time_series.py
--- a/yt/data_objects/time_series.py
+++ b/yt/data_objects/time_series.py
@@ -346,10 +346,10 @@
 
         # Figure out the starting and stopping times and redshift.
         self._calculate_simulation_bounds()
-        self.print_key_parameters()
-
         # Get all possible datasets.
         self._get_all_outputs(find_outputs=find_outputs)
+        
+        self.print_key_parameters()
 
     def __repr__(self):
         return self.parameter_filename
@@ -377,3 +377,5 @@
                     continue
                 v = getattr(self, a)
                 mylog.info("Parameters: %-25s = %s", a, v)
+        mylog.info("Total datasets: %d." % len(self.all_outputs))
+

diff -r b0a41c2163cf6f6439295841c2038ab50d2658b4 -r 554d144d9d248c6f70d8c665a5963aa39b2d6bb3 yt/frontends/enzo/simulation_handling.py
--- a/yt/frontends/enzo/simulation_handling.py
+++ b/yt/frontends/enzo/simulation_handling.py
@@ -433,8 +433,6 @@
             if self.parameters['CycleSkipDataDump'] <= 0:
                 self.all_outputs.sort(key=lambda obj:obj['time'])
 
-        mylog.info("Total datasets: %d." % len(self.all_outputs))
-
     def _calculate_simulation_bounds(self):
         """
         Figure out the starting and stopping time and redshift for the simulation.
@@ -532,6 +530,12 @@
         self.all_outputs.sort(key=lambda obj: obj['time'])
         mylog.info("Located %d total outputs." % len(self.all_outputs))
 
+        # manually set final time and redshift with last output
+        if self.all_outputs:
+            self.final_time = self.all_outputs[-1]['time']
+            if self.cosmological_simulation:
+                self.final_redshift = self.all_outputs[-1]['redshift']
+
     def _check_for_outputs(self, potential_outputs):
         r"""Check a list of files to see if they are valid datasets."""

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