Use single-quote delimited strings when possssible.
authorW. Trevor King <wking@drexel.edu>
Wed, 27 Oct 2010 15:07:08 +0000 (08:07 -0700)
committerW. Trevor King <wking@drexel.edu>
Wed, 27 Oct 2010 15:07:08 +0000 (08:07 -0700)
pysawsim/parameter_error.py
pysawsim/parameter_scan.py
pysawsim/sawsim.py
pysawsim/sawsim_histogram.py

index 8813e2ff872ef9f2d94ecf39b129fe4624809a63..95939198820ed2618f576c88732e268666a1901b 100755 (executable)
@@ -140,9 +140,9 @@ def main(argv=None):
                       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).')
index a1ec5ba9bbb5c639699daeb47fbae47b8c9bd74e..3a4f6f978ed2b13cfdb9226d59692486bbe5212b 100644 (file)
@@ -380,35 +380,35 @@ def main(argv=None):
         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)
 
index a8c55fc846c1ea2b21daf1255cfd9e121fb79d82..92db8839a633d1847468c91818e30fa220beca5f 100644 (file)
@@ -86,32 +86,32 @@ class SawsimRunner (object):
     """
 
     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),
     ]
 
index 3001fd8a64185af0fcb77be24111336d81907eab..3220ba4600ab9237f199a39bb168b8bc23198869 100644 (file)
@@ -66,9 +66,9 @@ def main(argv=None):
     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)