[yt-svn] commit/yt: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Mon Nov 26 10:31:08 PST 2012
2 new commits in yt:
https://bitbucket.org/yt_analysis/yt/changeset/f1c742ebe3a1/
changeset: f1c742ebe3a1
branch: yt
user: brittonsmith
date: 2012-11-26 19:01:19
summary: Adding some exceptions for error cases in get_time_series and fixing a
spot where another error could occur.
affected #: 2 files
diff -r 9f7c233dfb077777e34275f6f70f53b3003c8e6b -r f1c742ebe3a1410338b760a2b9d94e1109de342b yt/frontends/enzo/simulation_handling.py
--- a/yt/frontends/enzo/simulation_handling.py
+++ b/yt/frontends/enzo/simulation_handling.py
@@ -37,7 +37,7 @@
from yt.utilities.definitions import \
sec_conversion
from yt.utilities.exceptions import \
- AmbiguousOutputs, \
+ InvalidSimulationTimeSeries, \
MissingParameter, \
NoStoppingCondition
@@ -183,8 +183,7 @@
if (initial_redshift is not None or \
final_redshift is not None) and \
not self.cosmological_simulation:
- mylog.error('An initial or final redshift has been given for a noncosmological simulation.')
- return
+ raise InvalidSimulationTimeSeries('An initial or final redshift has been given for a noncosmological simulation.')
if time_data and redshift_data:
my_all_outputs = self.all_outputs
@@ -193,7 +192,11 @@
elif redshift_data:
my_all_outputs = self.all_redshift_outputs
else:
- mylog.error('Both time_data and redshift_data are False.')
+ raise InvalidSimulationTimeSeries('Both time_data and redshift_data are False.')
+
+ if not my_all_outputs:
+ TimeSeriesData.__init__(self, outputs=[], parallel=parallel)
+ mylog.info("%d outputs loaded into time series." % 0)
return
# Apply selection criteria to the set.
@@ -215,6 +218,7 @@
final_cycle = self.parameters['StopCycle']
else:
final_cycle = min(final_cycle, self.parameters['StopCycle'])
+
my_outputs = my_all_outputs[int(ceil(float(initial_cycle) /
self.parameters['CycleSkipDataDump'])):
(final_cycle / self.parameters['CycleSkipDataDump'])+1]
diff -r 9f7c233dfb077777e34275f6f70f53b3003c8e6b -r f1c742ebe3a1410338b760a2b9d94e1109de342b yt/utilities/exceptions.py
--- a/yt/utilities/exceptions.py
+++ b/yt/utilities/exceptions.py
@@ -101,14 +101,13 @@
"contains the following LaTeX parser errors:\n" ) \
% (self.unit_name, self.field_name) + self.mathtext_error
-class AmbiguousOutputs(YTException):
- def __init__(self, pf):
- YTException.__init__(self, pf)
+class InvalidSimulationTimeSeries(YTException):
+ def __init__(self, message):
+ self.message = message
def __str__(self):
- return "Simulation %s has both dtDataDump and CycleSkipDataDump set. Unable to calculate datasets." % \
- self.pf
-
+ return self.message
+
class MissingParameter(YTException):
def __init__(self, pf, parameter):
YTException.__init__(self, pf)
https://bitbucket.org/yt_analysis/yt/changeset/f7edfc242413/
changeset: f7edfc242413
branch: yt
user: brittonsmith
date: 2012-11-26 19:13:28
summary: Merged.
affected #: 1 file
diff -r f1c742ebe3a1410338b760a2b9d94e1109de342b -r f7edfc242413e104df97fe7365f52814e43fca82 doc/install_script.sh
--- a/doc/install_script.sh
+++ b/doc/install_script.sh
@@ -711,6 +711,7 @@
echo "Building Rockstar"
cd Rockstar-0.99
( make lib 2>&1 ) 1>> ${LOG_FILE} || do_exit
+ cp librockstar.so ${DEST_DIR}/lib
ROCKSTAR_DIR=${DEST_DIR}/src/Rockstar-0.99
echo $ROCKSTAR_DIR > ${YT_DIR}/rockstar.cfg
touch done
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