projects
/
sawsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
No need for `if __name__ == '__main__'` in velocity_dependant_scan.
[sawsim.git]
/
pysawsim
/
velocity_dependant_scan.py
diff --git
a/pysawsim/velocity_dependant_scan.py
b/pysawsim/velocity_dependant_scan.py
index 764c03ca6e3820aea6294ffb427ccdcbada3f3bd..787d5e2a40d2e89c75dc5647f73d412b3ced5104 100644
(file)
--- a/
pysawsim/velocity_dependant_scan.py
+++ b/
pysawsim/velocity_dependant_scan.py
@@
-243,11
+243,8
@@
def main():
help="Job manager name (one of %s) (%%default)."
% (', '.join(MANAGERS)),
default=MANAGERS[0])
help="Job manager name (one of %s) (%%default)."
% (', '.join(MANAGERS)),
default=MANAGERS[0])
- 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.",
+ parser.add_option("-C","--use_cache", dest="use_cache",
+ help="Use cached simulations if they exist (vs. running new simulations) (%default)",
default=False, action="store_true")
parser.add_option("-d","--cache-dir", dest="cache_dir",
metavar="STRING",
default=False, action="store_true")
parser.add_option("-d","--cache-dir", dest="cache_dir",
metavar="STRING",
@@
-260,12
+257,15
@@
def main():
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("--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("-c","--contour-plot", dest="contour_plot",
help="Select contour plot (vs. the default pseudocolor plot).",
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("-C","--use_cache", dest="use_cache",
- help="Use cached simulations if they exist (vs. running new simulations) (%default)",
- default=False, action="store_true")
options,args = parser.parse_args()
initial_params = [float(p) for p in options.initial_params.split(",")]
param_ranges = parse_param_ranges_string(options.param_range)
options,args = parser.parse_args()
initial_params = [float(p) for p in options.initial_params.split(",")]
param_ranges = parse_param_ranges_string(options.param_range)
@@
-281,7
+281,3
@@
def main():
#hm.fit(initial_params)
hm.plot(param_ranges, logx=options.logx, logy=options.logy,
contour=options.contour_plot)
#hm.fit(initial_params)
hm.plot(param_ranges, logx=options.logx, logy=options.logy,
contour=options.contour_plot)
-
-
-if __name__ == "__main__":
- main()