"""
def __init__(self, velocity_stream, param_format_string, N=400,
manager=None, residual_type='jensen-shannon', plot=True,
- use_cache=False):
+ use_cache=False, clean_cache=False):
self.experiment_histograms = self.read_force_histograms(velocity_stream)
self.param_format_string = param_format_string
self.residual_type = residual_type
self._manager = manager
self.plot = plot
self.sawsim_histogram = sawsim_histogram.SawsimHistogram(
- use_cache=self.use_cache)
+ use_cache=use_cache, clean_cach=clean_cache)
def read_force_histograms(self, stream):
"""
help="Job manager name (one of %s) (%%default)."
% (', '.join(MANAGERS)),
default=MANAGERS[0])
- parser.add_option("-C","--use_cache", dest="use_cache",
+ 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("--clean-cache", dest="clean_cache",
+ help="Remove previously cached simulations if they exist (%default)",
+ default=False, action="store_true")
parser.add_option("-d","--cache-dir", dest="cache_dir",
metavar="STRING",
help="Cache directory for sawsim unfolding forces (%default).",
hm = HistogramMatcher(
file(velocity_file, 'r'), param_format_string=options.param_format,
N=options.N, manager=manager, residual_type=options.residual,
- plot=options.plot_residuals, use_cache=options.use_cache)
+ plot=options.plot_residuals, use_cache=options.use_cache,
+ clean_cache=options.clean_cache)
#hm.fit(initial_params)
hm.plot(param_ranges, logx=options.logx, logy=options.logy,
contour=options.contour_plot)