|
[yoda-svn] yoda: 2 new changesetsYODA Mercurial yoda at projects.hepforge.orgFri Jul 22 20:30:02 BST 2016
details: https://yoda.hepforge.org/hg/yoda/rev/5a7c9582ce0a branches: release-1-6 changeset: 1286:5a7c9582ce0a user: Andy Buckley <andy at insectnation.org> date: Fri Jul 22 17:18:50 2016 +0100 description: Fix scatter mean calculation to include the first AO, and add the 'add' scatter merging treatment (unfinished) details: https://yoda.hepforge.org/hg/yoda/rev/ba12fb9a3222 branches: release-1-6 changeset: 1287:ba12fb9a3222 user: Andy Buckley <andy at insectnation.org> date: Fri Jul 22 20:18:37 2016 +0100 description: Add 'add' modes for scatter combination to yodamerge. diffs (truncated from 167 to 50 lines): --- a/ChangeLog Fri Jul 22 15:48:32 2016 +0100 +++ b/ChangeLog Fri Jul 22 20:18:37 2016 +0100 @@ -1,3 +1,9 @@ +2016-07-22 Andy Buckley <andy.buckley at cern.ch> + + * Add 'add' modes for scatter combination to yodamerge. + + * Fix yodamerge scatter averaging to use the first AO. + 2016-07-21 Andy Buckley <andy.buckley at cern.ch> * Add --type-mismatch-mode flag and fallback logic to yodamerge. --- a/bin/yodamerge Fri Jul 22 15:48:32 2016 +0100 +++ b/bin/yodamerge Fri Jul 22 20:18:37 2016 +0100 @@ -102,16 +102,18 @@ import yoda, optparse, sys, math parser = optparse.OptionParser(usage=__doc__) -parser.add_option("-o", "--output", default="-", dest="OUTPUT_FILE") -parser.add_option("--add", action="store_true", default=False, dest="STACK", help="force simple stacking") -parser.add_option("--s1d-mode", "--s1dmode", default="assume_mean", dest="S1D_MODE", - help="choose strategy for combining Scatter1D objects: one of 'first', 'combine', 'assume_mean'") -parser.add_option("--s2d-mode", "--s2dmode", default="assume_mean", dest="S2D_MODE", - help="choose strategy for combining Scatter2D objects: one of 'first', 'combine', 'assume_mean'") -parser.add_option("--s3d-mode", "--s3dmode", default="assume_mean", dest="S3D_MODE", - help="choose strategy for combining Scatter3D objects: one of 'first', 'combine', 'assume_mean'") -parser.add_option("--type-mismatch-mode", default="scatter", dest="TYPE_MISMATCH_MODE", +parser.add_option("-o", "--output", default="-", dest="OUTPUT_FILE", metavar="PATH", + help="write output to specified path") +parser.add_option("--s1d-mode", "--s1dmode", default="assume_mean", dest="S1D_MODE", metavar="MODE", + help="choose strategy for combining Scatter1D objects: one of 'first', 'combine', 'assume_mean', 'add'") +parser.add_option("--s2d-mode", "--s2dmode", default="assume_mean", dest="S2D_MODE", metavar="MODE", + help="choose strategy for combining Scatter2D objects: one of 'first', 'combine', 'assume_mean', 'add'") +parser.add_option("--s3d-mode", "--s3dmode", default="assume_mean", dest="S3D_MODE", metavar="MODE", + help="choose strategy for combining Scatter3D objects: one of 'first', 'combine', 'assume_mean', 'add'") +parser.add_option("--type-mismatch-mode", default="scatter", dest="TYPE_MISMATCH_MODE", metavar="MODE", help="choose strategy for combining objects whose types mismatch: one of 'first', 'scatter'") +parser.add_option("--add", "--stack", action="store_true", default=False, dest="STACK", + help="force simple stacking (also forces all scatter modes to 'add')") parser.add_option("--no-veto-empty", action="store_false", default=True, dest="VETO_EMPTY", help="disable the removal of empty (sumW=0) data objects _before_ applying merge heuristics. You probably want the default!") parser.add_option("--assume-normalized", action="store_true", default=False, dest="ASSUME_NORMALIZED", @@ -119,6 +121,13 @@ opts, fileargs = parser.parse_args() +## Include scatters in "add" mode +if opts.STACK: + opts.S1D_MODE = "add" + opts.S2D_MODE = "add"
More information about the yoda-svn mailing list |