[Rivet-svn] r2516 - in trunk: . bin data

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Jun 23 14:27:40 BST 2010


Author: buckley
Date: Wed Jun 23 14:27:46 2010
New Revision: 2516

Log:
Semi-trivialities (but nice ones):
 * Adding relative scale ratio plot flag to compare-histos
 * Extended command completion to rivet-config, compare-histos, and make-plots.
 * Removing a rivetgun-related flag from rivet-config

Modified:
   trunk/ChangeLog
   trunk/bin/compare-histos
   trunk/bin/rivet-config.in
   trunk/bin/rivet-mkhtml
   trunk/data/rivet-completion

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	Wed Jun 23 12:50:41 2010	(r2515)
+++ trunk/ChangeLog	Wed Jun 23 14:27:46 2010	(r2516)
@@ -1,5 +1,9 @@
 2010-06-23  Andy Buckley  <andy at insectnation.org>
 
+	* Adding relative scale ratio plot flag to compare-histos
+
+	* Extended command completion to rivet-config, compare-histos, and make-plots.
+
 	* Providing protected log messaging macros,
 	MSG_{TRACE,DEBUG,INFO,WARNING,ERROR} cf. Athena.
 

Modified: trunk/bin/compare-histos
==============================================================================
--- trunk/bin/compare-histos	Wed Jun 23 12:50:41 2010	(r2515)
+++ trunk/bin/compare-histos	Wed Jun 23 14:27:46 2010	(r2516)
@@ -5,7 +5,7 @@
 
 USAGE:
  %prog [options] aidafile1[:'PlotOption1=Value':'PlotOption2=Value'] [path/to/aidafile2 ...]
- 
+
 where the plot options are described in the make-plots manual in the HISTOGRAM
 section.
 
@@ -103,6 +103,10 @@
                       default=False, help="show vertical error bars on the MC lines")
     parser.add_option("--no-ratio", action="store_true", dest="NORATIO",
                       default=False, help="disable the ratio plot")
+    parser.add_option("--rel-ratio", action="store_true", dest="RATIO_DEVIATION",
+                      default=False, help="show the ratio plots scaled to the ref error")
+    parser.add_option("--abs-ratio", action="store_false", dest="RATIO_DEVIATION",
+                      default=False, help="show the ratio plots with an absolute scale")
     parser.add_option("--all", action="store_false", dest="NO_SHOW_IF_ONLY_ONE",
                       default=True, help="make plot file even if there is only one dataset to be plotted")
     parser.add_option("--no-ref-only", action="store_true", dest="NO_SHOW_IF_ONLY_ONE",
@@ -358,6 +362,10 @@
                          "LegendYPos" : "0.92",
                          "RatioPlotReference" : "%s%s" % (ref, HISTOS[ref][name].fullPath())}
 
+        if opts.RATIO_DEVIATION:
+            paramdefaults["RatioPlotMode"] = "deviation"
+
+
         headstr  = "# BEGIN PLOT\n"
         for param, default in paramdefaults.iteritems():
             if param not in headers:

Modified: trunk/bin/rivet-config.in
==============================================================================
--- trunk/bin/rivet-config.in	Wed Jun 23 12:50:41 2010	(r2515)
+++ trunk/bin/rivet-config.in	Wed Jun 23 14:27:46 2010	(r2516)
@@ -17,12 +17,11 @@
     echo "           [--version]"
     echo "Options:"
     echo "  --help | -h   : show this help message"
-    echo 
+    echo
     echo "  --prefix      : show the installation prefix (cf. autoconf)"
     echo "  --includedir  : show the path to the directory containing the Rivet headers"
     echo "  --libdir      : show the path to the directory containing the Rivet libraries"
     echo "  --datadir     : show the path to the directory containing Rivet data"
-    echo "  --rgdatadir   : show the path to the directory containing RivetGun data"
     echo
     echo "  --pythonpath  : show the path(s) to the directory containing Rivet Python modules"
     echo "  --cppflags    : returns a Rivet '-I' string for insertion into CPPFLAGS"
@@ -47,9 +46,6 @@
 tmp=$( echo "$*" | egrep -- '--\<datadir\>')
 test -n "$tmp" && OUT="$OUT @datadir@/@PACKAGE_TARNAME@"
 
-tmp=$( echo "$*" | egrep -- '--\<rgdatadir\>')
-test -n "$tmp" && OUT="$OUT @datadir@/RivetGun"
-
 tmp=$( echo "$*" | egrep -- '--\<pythonpath\>')
 test -n "$tmp" && {
     ppath="@PYTHON_PREFIX@/lib/python at PYTHON_VERSION@/site-packages"

Modified: trunk/bin/rivet-mkhtml
==============================================================================
--- trunk/bin/rivet-mkhtml	Wed Jun 23 12:50:41 2010	(r2515)
+++ trunk/bin/rivet-mkhtml	Wed Jun 23 14:27:46 2010	(r2516)
@@ -14,19 +14,19 @@
 parser.add_option("-o", "--outputdir", dest="OUTPUTDIR",
                   default="./plots", help="directory for webpage output.")
 parser.add_option("-c", "--config", dest="CONFIGFILES", action="append", default=["~/.make-plots"],
-                  help="Plot config file(s) to be used with make-plots.")
+                  help="plot config file(s) to be used with make-plots.")
 parser.add_option("-s", "--single", dest="SINGLE", action="store_true",
-                  default=False, help="Display plots on single webpage.")
+                  default=False, help="display plots on single webpage.")
 parser.add_option("-n", "--num-threads", metavar="NUMTHREADS", dest="NUMTHREADS", type=int,
-                  default=None, help="Request make-plots to use a specific number of threads.")
+                  default=None, help="request make-plots to use a specific number of threads.")
 parser.add_option("--pdf", dest="VECTORFORMAT", action="store_const", const="PDF",
-                  default="PS", help="Use PDF as the vector plot format.")
+                  default="PS", help="use PDF as the vector plot format.")
 parser.add_option("--ps", dest="VECTORFORMAT", action="store_const", const="PS",
-                  default="PS", help="Use PostScript as the vector plot format.")
+                  default="PS", help="use PostScript as the vector plot format.")
 parser.add_option("-i", "--ignore-unvalidated", dest="IGNORE_UNVALIDATED", action="store_true",
-                  default=False, help="Ignore unvalidated analyses.")
+                  default=False, help="ignore unvalidated analyses.")
 parser.add_option("-m", "--match", action="append", dest="PATHPATTERNS",
-                  help="Only write out histograms from analyses whose name matches any of these regexes")
+                  help="only write out histograms from analyses whose name matches any of these regexes")
 opts, aidafiles = parser.parse_args()
 
 

Modified: trunk/data/rivet-completion
==============================================================================
--- trunk/data/rivet-completion	Wed Jun 23 12:50:41 2010	(r2515)
+++ trunk/data/rivet-completion	Wed Jun 23 14:27:46 2010	(r2516)
@@ -1,5 +1,5 @@
 ## -*- sh -*-
-## Analysis name completion for rivet
+## Analysis name completion for rivet scripts
 
 function _rivet() {
 	local cur prev commands options command
@@ -47,3 +47,112 @@
 
 
 complete -F _rivet -o default rivet
+
+
+##########################
+
+
+function _rivet_config() {
+	local cur prev commands options command
+	COMPREPLY=()
+	#cur=`_get_cword`
+    cur="${COMP_WORDS[COMP_CWORD]}"
+    prev="${COMP_WORDS[COMP_CWORD-1]}"
+
+    opts="--help --version"
+    opts="$opts --prefix --includedir --libdir --datadir"
+    opts="$opts --pythonpath --cppflags --ldflags --ldadd"
+    opts="$opts -h"
+    if [[ ${cur} == -* ]] ; then
+        COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+        if test -n "$COMPREPLY"; then
+            return 0
+        fi
+    fi
+
+    COMPREPLY=( $(compgen -W "$opts" -- ${cur}) )
+    if test -n "$COMPREPLY"; then
+        return 0
+    fi
+
+    return 0
+}
+
+
+complete -F _rivet_config -o default rivet-config
+
+
+##############################
+
+
+function _compare_histos() {
+	local cur prev commands options command
+	COMPREPLY=()
+	#cur=`_get_cword`
+    cur="${COMP_WORDS[COMP_CWORD]}"
+    prev="${COMP_WORDS[COMP_CWORD-1]}"
+
+    opts="--help -h"
+    opts="$opts --outdir -o"
+    opts="$opts --rivet-refs -R"
+    opts="$opts --histogram-list -l"
+    opts="$opts --hier-out --linear --logarithmic --mc-errs"
+    opts="$opts --no-ratio --rel-ratio --abs-ratio"
+    opts="$opts --all --no-ref-only --show-ref-only --refid"
+    opts="$opts --plot-info-dir"
+    opts="$opts --quiet -q --verbose -v"
+    if [[ ${cur} == -* ]] ; then
+        COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+        if test -n "$COMPREPLY"; then
+            return 0
+        fi
+    fi
+
+    files=$(ls *.aida)
+    COMPREPLY=( $(compgen -W "$opts $files" -- ${cur}) )
+    if test -n "$COMPREPLY"; then
+        return 0
+    fi
+
+    return 0
+}
+
+
+complete -F _compare_histos -o default compare-histos
+
+
+##############################
+
+
+function _make_plots() {
+	local cur prev commands options command
+	COMPREPLY=()
+	#cur=`_get_cword`
+    cur="${COMP_WORDS[COMP_CWORD]}"
+    prev="${COMP_WORDS[COMP_CWORD-1]}"
+
+    opts="--help -h"
+    opts="$opts --num-threads -n"
+    opts="$opts --palatino --cm --times --minion"
+    opts="$opts --ps --pdf --eps --png --pdfpng --pspng"
+    opts="$opts --tex --no-cleanup --full-range"
+    opts="$opts --config -c"
+    opts="$opts --quiet -q --verbose -v"
+    if [[ ${cur} == -* ]] ; then
+        COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+        if test -n "$COMPREPLY"; then
+            return 0
+        fi
+    fi
+
+    files=$(ls *.dat)
+    COMPREPLY=( $(compgen -W "$opts $files" -- ${cur}) )
+    if test -n "$COMPREPLY"; then
+        return 0
+    fi
+
+    return 0
+}
+
+
+complete -F _make_plots -o default make-plots


More information about the Rivet-svn mailing list