[Rivet-svn] rivet: 2 new changesets

Rivet Mercurial rivet at projects.hepforge.org
Wed Mar 29 22:30:02 BST 2017


details:   https://rivet.hepforge.org/hg/rivet/rev/c5ae9c4e55c9
branches:  release-2-5-x
changeset: 5723:c5ae9c4e55c9
user:      Andy Buckley <andy at insectnation.org>
date:      Wed Mar 29 22:17:32 2017 +0100
description:
Allow yes/no and true/false values for LogX, etc. plot options.

details:   https://rivet.hepforge.org/hg/rivet/rev/b28d13bd73a5
branches:  release-2-5-x
changeset: 5724:b28d13bd73a5
user:      Andy Buckley <andy at insectnation.org>
date:      Wed Mar 29 22:17:35 2017 +0100
description:
Add --errs as an alias for --mc-errs to rivet-mkhtml and rivet-cmphistos.

diffs (truncated from 87 to 50 lines):

--- a/ChangeLog	Wed Mar 29 13:30:48 2017 +0100
+++ b/ChangeLog	Wed Mar 29 22:17:35 2017 +0100
@@ -1,3 +1,9 @@
+2017-03-29  Andy Buckley  <andy.buckley at cern.ch>
+
+	* Allow yes/no and true/false values for LogX, etc. plot options.
+
+	* Add --errs as an alias for --mc-errs to rivet-mkhtml and rivet-cmphistos.
+
 2017-03-08  Peter Richardson <peter.richardson at durham.ac.uk>
 
 	* Added 6 analyses AMY_1990_I295160, HRS_1986_I18502, JADE_1983_I190818,
--- a/bin/make-plots	Wed Mar 29 13:30:48 2017 +0100
+++ b/bin/make-plots	Wed Mar 29 22:17:35 2017 +0100
@@ -210,9 +210,9 @@
         # self.description['TopMargin'] = float(self.description['TopMargin'])
         # self.description['BottomMargin'] = float(self.description['BottomMargin'])
 
-        self.description['LogX'] = self.description.has_key('LogX') and self.description['LogX']=='1'
-        self.description['LogY'] = self.description.has_key('LogY') and self.description['LogY']=='1'
-        self.description['LogZ'] = self.description.has_key('LogZ') and self.description['LogZ']=='1'
+        self.description['LogX'] = str(self.description.get('LogX', 0)) in ["1", "yes", "true"]
+        self.description['LogY'] = str(self.description.get('LogY', 0)) in ["1", "yes", "true"]
+        self.description['LogZ'] = str(self.description.get('LogZ', 0)) in ["1", "yes", "true"]
         if self.description.has_key('Rebin'):
             for i in self.histos:
                 self.histos[i].description['Rebin'] = self.description['Rebin']
@@ -862,7 +862,7 @@
 
         inputdata.description['RatioPlotStage'] = True
         inputdata.description['PlotSizeY'] = inputdata.description['RatioPlotSizeY']
-        inputdata.description['LogY'] = False
+        inputdata.description['LogY'] = False  # TODO: actually, log ratio plots could be useful...
 
         # TODO: It'd be nice it this wasn't so MC-specific
         if inputdata.description.has_key('RatioPlotMode') and inputdata.description['RatioPlotMode']=='deviation':
@@ -2700,7 +2700,7 @@
     parser.add_option("--no-subproc", dest="NO_SUBPROC", action="store_true", default=False,
                       help="don't use subprocesses to render the plots in parallel -- useful for debugging.")
     parser.add_option("--full-range", dest="FULL_RANGE", action="store_true", default=False,
-                      help="plot full y range in LogY plots.")
+                      help="plot full y range in log-y plots.")
     parser.add_option("-c", "--config", dest="CONFIGFILES", action="append", default=None,
                       help="plot config file to be used. Overrides internal config blocks.")
     verbgroup = OptionGroup(parser, "Verbosity control")
--- a/bin/rivet-cmphistos	Wed Mar 29 13:30:48 2017 +0100
+++ b/bin/rivet-cmphistos	Wed Mar 29 22:17:35 2017 +0100
@@ -61,7 +61,7 @@
     stygroup = OptionGroup(parser, "Plot style")
     stygroup.add_option("--linear", action="store_true", dest="LINEAR",


More information about the Rivet-svn mailing list