help='Residual type (from %s; default: %%default).'
% ', '.join(Histogram().types()),
default='jensen-shannon')
- parser.add_option("-P","--plot-residuals", dest="plot_residuals",
- help="Generate residual difference plots for each point in the plot range.",
- default=False, action="store_true")
+ parser.add_option('-P','--plot-residuals', dest='plot_residuals',
+ help='Generate residual difference plots for each point in the plot range.',
+ default=False, action='store_true')
parser.add_option('-t', '--threshold', dest='threshold',
metavar='FLOAT', type='float', default='0.2',
help='Residual value that defines the location of the error bar (%default).')
if option.dest == 'param_string':
continue
parser.add_option(option)
- parser.add_option("-f","--param-format", dest="param_format",
- metavar="FORMAT",
- help="Convert params to sawsim options (%default).",
+ parser.add_option('-f','--param-format', dest='param_format',
+ metavar='FORMAT',
+ help='Convert params to sawsim options (%default).',
default=('-s cantilever,hooke,0.05 -N1 -s folded,null -N8 -s "unfolded,wlc,{0.39e-9,28e-9}" -k "folded,unfolded,bell,{%g,%g}" -q folded'))
- parser.add_option("-p","--initial-params", dest="initial_params",
- metavar="PARAMS",
- help="Initial params for fitting (%default).",
+ parser.add_option('-p','--initial-params', dest='initial_params',
+ metavar='PARAMS',
+ help='Initial params for fitting (%default).',
default='3.3e-4,0.25e-9')
- parser.add_option("-r","--param-range", dest="param_range",
- metavar="PARAMS",
- help="Param range for plotting (%default).",
+ parser.add_option('-r','--param-range', dest='param_range',
+ metavar='PARAMS',
+ help='Param range for plotting (%default).',
default='[1e-5,1e-3,20],[0.1e-9,1e-9,20]')
- parser.add_option("--logx", dest="logx",
- help="Use a log scale for the x range.",
- default=False, action="store_true")
- parser.add_option("--logy", dest="logy",
- help="Use a log scale for the y range.",
- default=False, action="store_true")
- parser.add_option("-R","--residual", dest="residual",
- metavar="STRING",
- help="Residual type (from %s; default: %%default)."
+ parser.add_option('--logx', dest='logx',
+ help='Use a log scale for the x range.',
+ default=False, action='store_true')
+ parser.add_option('--logy', dest='logy',
+ help='Use a log scale for the y range.',
+ default=False, action='store_true')
+ parser.add_option('-R','--residual', dest='residual',
+ metavar='STRING',
+ help='Residual type (from %s; default: %%default).'
% ', '.join(Histogram().types()),
default='jensen-shannon')
- parser.add_option("-P","--plot-residuals", dest="plot_residuals",
- help="Generate residual difference plots for each point in the plot range.",
- default=False, action="store_true")
- parser.add_option("-c","--contour-plot", dest="contour_plot",
- help="Select contour plot (vs. the default pseudocolor plot).",
- default=False, action="store_true")
+ parser.add_option('-P','--plot-residuals', dest='plot_residuals',
+ help='Generate residual difference plots for each point in the plot range.',
+ default=False, action='store_true')
+ parser.add_option('-c','--contour-plot', dest='contour_plot',
+ help='Select contour plot (vs. the default pseudocolor plot).',
+ default=False, action='store_true')
options,args = parser.parse_args(argv)
"""
optparse_options = [
- Option("-s","--sawsim", dest="sawsim",
- metavar="PATH",
- help="Set sawsim binary (%default).",
+ Option('-s','--sawsim', dest='sawsim',
+ metavar='PATH',
+ help='Set sawsim binary (%default).',
default=SAWSIM),
- Option("-p","--params", dest="param_string",
- metavar="PARAMS",
- help="Initial params for fitting (%default).",
+ Option('-p','--params', dest='param_string',
+ metavar='PARAMS',
+ help='Initial params for fitting (%default).',
default=DEFAULT_PARAM_STRING),
- Option("-N", "--number-of-runs", dest="N",
- metavar="INT", type='int',
- help="Number of sawsim runs at each point in parameter space (%default).",
+ Option('-N', '--number-of-runs', dest='N',
+ metavar='INT', type='int',
+ help='Number of sawsim runs at each point in parameter space (%default).',
default=400),
- Option("-m", "--manager", dest="manager",
- metavar="STRING",
- help="Job manager name (one of %s) (%%default)."
+ Option('-m', '--manager', dest='manager',
+ metavar='STRING',
+ help='Job manager name (one of %s) (%%default).'
% (', '.join(MANAGERS)),
default=MANAGERS[0]),
- Option("-C","--use-cache", dest="use_cache",
- help="Use cached simulations if they exist (vs. running new simulations) (%default)",
- default=False, action="store_true"),
- Option("--clean-cache", dest="clean_cache",
- help="Remove previously cached simulations if they exist (%default)",
- default=False, action="store_true"),
- Option("-d","--cache-dir", dest="cache_dir",
- metavar="STRING",
- help="Cache directory for sawsim unfolding forces (%default).",
+ Option('-C','--use-cache', dest='use_cache',
+ help='Use cached simulations if they exist (vs. running new simulations) (%default)',
+ default=False, action='store_true'),
+ Option('--clean-cache', dest='clean_cache',
+ help='Remove previously cached simulations if they exist (%default)',
+ default=False, action='store_true'),
+ Option('-d','--cache-dir', dest='cache_dir',
+ metavar='STRING',
+ help='Cache directory for sawsim unfolding forces (%default).',
default=CACHE_DIR),
]
parser = OptionParser(usage, epilog=epilog)
for option in sr.optparse_options:
parser.add_option(option)
- parser.add_option("-w", "--bin-width", dest="bin_width",
- metavar="FLOAT", type='float',
- help="Histogram bin width in newtons (%default).",
+ parser.add_option('-w', '--bin-width', dest='bin_width',
+ metavar='FLOAT', type='float',
+ help='Histogram bin width in newtons (%default).',
default=10e-12)
options,args = parser.parse_args(argv)