sawsim_histogram.CACHE_DIR = options.cache_dir
manager = get_manager(options.manager)()
-
- 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,
- clean_cache=options.clean_cache)
- #hm.fit(initial_params)
- hm.plot(param_ranges, logx=options.logx, logy=options.logy,
- contour=options.contour_plot)
+ try:
+ 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,
+ clean_cache=options.clean_cache)
+ #hm.fit(initial_params)
+ hm.plot(param_ranges, logx=options.logx, logy=options.logy,
+ contour=options.contour_plot)
+ finally:
+ manager.teardown()