Conditions | 61 |
Total Lines | 424 |
Code Lines | 336 |
Lines | 424 |
Ratio | 100 % |
Tests | 3 |
CRAP Score | 3636.5848 |
Changes | 0 |
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
Complex classes like sciapy.regress.__main__.main() often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
1 | # -*- coding: utf-8 -*- |
||
145 | 1 | View Code Duplication | def main(): |
146 | 1 | logging.basicConfig(level=logging.WARNING, |
|
147 | format="[%(levelname)-8s] (%(asctime)s) " |
||
148 | "%(filename)s:%(lineno)d %(message)s", |
||
149 | datefmt="%Y-%m-%d %H:%M:%S %z") |
||
150 | |||
151 | 1 | args = parser.parse_args() |
|
152 | |||
153 | logging.info("command line arguments: %s", args) |
||
154 | if args.quiet: |
||
155 | logging.getLogger().setLevel(logging.ERROR) |
||
156 | elif args.verbose: |
||
157 | logging.getLogger().setLevel(logging.INFO) |
||
158 | else: |
||
159 | logging.getLogger().setLevel(args.loglevel) |
||
160 | |||
161 | from numpy.distutils.system_info import get_info |
||
162 | for oblas_path in get_info("openblas")["library_dirs"]: |
||
163 | oblas_name = "{0}/libopenblas.so".format(oblas_path) |
||
164 | logging.info("Trying %s", oblas_name) |
||
165 | try: |
||
166 | oblas_lib = ctypes.cdll.LoadLibrary(oblas_name) |
||
167 | oblas_cores = oblas_lib.openblas_get_num_threads() |
||
168 | oblas_lib.openblas_set_num_threads(args.openblas_threads) |
||
169 | logging.info("Using %s/%s Openblas thread(s).", |
||
170 | oblas_lib.openblas_get_num_threads(), oblas_cores) |
||
171 | except: |
||
172 | logging.info("Setting number of openblas threads failed.") |
||
173 | |||
174 | if args.random_seed is not None: |
||
175 | np.random.seed(args.random_seed) |
||
176 | |||
177 | if args.proxies: |
||
178 | proxies = args.proxies.split(',') |
||
179 | proxy_dict = dict(_p.split(':') for _p in proxies) |
||
180 | else: |
||
181 | proxy_dict = {} |
||
182 | lag_dict = {pn: 0 for pn in proxy_dict.keys()} |
||
183 | |||
184 | # Post-processing of arguments... |
||
185 | # List of proxy lag fits from csv |
||
186 | fit_lags = args.fit_lags.split(',') |
||
187 | # List of proxy lifetime fits from csv |
||
188 | fit_lifetimes = args.fit_lifetimes.split(',') |
||
189 | fit_annlifetimes = args.fit_annlifetimes.split(',') |
||
190 | # List of proxy lag times from csv |
||
191 | lag_dict.update(dict(_ls.split(':') for _ls in args.lag_times.split(','))) |
||
192 | # List of cycles (frequencies in 1/year) from argument list (csv) |
||
193 | try: |
||
194 | freqs = list(map(float, args.freqs.split(','))) |
||
195 | except ValueError: |
||
196 | freqs = [] |
||
197 | # List of initial parameter values |
||
198 | initial = None |
||
199 | if args.initial is not None: |
||
200 | try: |
||
201 | initial = list(map(float, args.initial.split(','))) |
||
202 | except ValueError: |
||
203 | pass |
||
204 | # List of GP kernels from argument list (csv) |
||
205 | kernls = args.kernels.split(',') |
||
206 | |||
207 | lat = args.latitude |
||
208 | alt = args.altitude |
||
209 | logging.info("location: %.0f°N %.0f km", lat, alt) |
||
210 | |||
211 | no_ys, no_dens, no_errs, no_szas = load_scia_dzm(args.file, alt, lat, |
||
212 | tfmt=args.time_format, |
||
213 | scale=args.scale, |
||
214 | #subsample_factor=args.random_subsample, |
||
215 | #subsample_method="random", |
||
216 | akd_threshold=args.akd_threshold, |
||
217 | cnt_threshold=args.cnt_threshold, |
||
218 | center=args.center_data, |
||
219 | season=args.season, |
||
220 | SPEs=args.exclude_spe) |
||
221 | |||
222 | (no_ys_train, no_dens_train, no_errs_train, |
||
223 | no_ys_test, no_dens_test, no_errs_test) = _train_test_split( |
||
224 | no_ys, no_dens, no_errs, args.train_fraction, |
||
225 | args.test_fraction, args.random_train_test) |
||
226 | |||
227 | sza_intp = interp1d(no_ys, no_szas, fill_value="extrapolate") |
||
228 | |||
229 | max_amp = 1e10 * args.scale |
||
230 | max_days = 100 |
||
231 | |||
232 | harmonic_models = [] |
||
233 | for freq in freqs: |
||
234 | if not args.fit_phase: |
||
235 | harmonic_models.append(("f{0:.0f}".format(freq), |
||
236 | HarmonicModelCosineSine(freq=freq, |
||
237 | cos=0, sin=0, |
||
238 | bounds=dict([ |
||
239 | ("cos", [-max_amp, max_amp]), |
||
240 | ("sin", [-max_amp, max_amp])]) |
||
241 | ))) |
||
242 | else: |
||
243 | harmonic_models.append(("f{0:.0f}".format(freq), |
||
244 | HarmonicModelAmpPhase(freq=freq, |
||
245 | amp=0, phase=0, |
||
246 | bounds=dict([ |
||
247 | # ("amp", [-max_amp, max_amp]), |
||
248 | ("amp", [0, max_amp]), |
||
249 | ("phase", [-np.pi, np.pi])]) |
||
250 | ))) |
||
251 | proxy_models = [] |
||
252 | for pn, pf in proxy_dict.items(): |
||
253 | pt, pp = load_solar_gm_table(pf, cols=[0, 1], names=["time", pn], tfmt=args.time_format) |
||
254 | pv = np.log(pp[pn]) if pn in args.log_proxies.split(',') else pp[pn] |
||
255 | if pn in args.norm_proxies_distSEsq: |
||
256 | rad_sun_earth = np.vectorize(_r_sun_earth)(pt, tfmt=args.time_format) |
||
257 | pv /= rad_sun_earth**2 |
||
258 | if pn in args.norm_proxies_SZA: |
||
259 | pv *= np.cos(np.radians(sza_intp(pt))) |
||
260 | proxy_models.append((pn, |
||
261 | ProxyModel(pt, pv, |
||
262 | center=pn in args.center_proxies.split(','), |
||
263 | sza_intp=sza_intp if args.use_sza else None, |
||
264 | fit_phase=args.fit_phase, |
||
265 | lifetime_prior=args.lifetime_prior, |
||
266 | lifetime_metric=args.lifetime_metric, |
||
267 | days_per_time_unit=1 if args.time_format.endswith("d") else 365.25, |
||
268 | amp=0., |
||
269 | lag=float(lag_dict[pn]), |
||
270 | tau0=0, |
||
271 | taucos1=0, tausin1=0, |
||
272 | taucos2=0, tausin2=0, |
||
273 | ltscan=args.lifetime_scan, |
||
274 | bounds=dict([ |
||
275 | ("amp", |
||
276 | [0, max_amp] if pn in args.positive_proxies.split(',') |
||
277 | else [-max_amp, max_amp]), |
||
278 | ("lag", [0, max_days]), |
||
279 | ("tau0", [0, max_days]), |
||
280 | ("taucos1", [0, max_days] if args.fit_phase else [-max_days, max_days]), |
||
281 | ("tausin1", [-np.pi, np.pi] if args.fit_phase else [-max_days, max_days]), |
||
282 | # semi-annual cycles for the life time |
||
283 | ("taucos2", [0, max_days] if args.fit_phase else [-max_days, max_days]), |
||
284 | ("tausin2", [-np.pi, np.pi] if args.fit_phase else [-max_days, max_days]), |
||
285 | ("ltscan", [0, 200])]) |
||
286 | ))) |
||
287 | logging.info("%s mean: %s", pn, proxy_models[-1][1].mean) |
||
288 | offset_model = [("offset", |
||
289 | ConstantModel(value=0., |
||
290 | bounds={"value": [-max_amp, max_amp]}))] |
||
291 | |||
292 | model = NOModel(offset_model + harmonic_models + proxy_models) |
||
293 | |||
294 | logging.debug("model dict: %s", model.get_parameter_dict()) |
||
295 | model.freeze_all_parameters() |
||
296 | # thaw parameters according to requested fits |
||
297 | for pn in proxy_dict.keys(): |
||
298 | model.thaw_parameter("{0}:amp".format(pn)) |
||
299 | if pn in fit_lags: |
||
300 | model.thaw_parameter("{0}:lag".format(pn)) |
||
301 | if pn in fit_lifetimes: |
||
302 | model.set_parameter("{0}:tau0".format(pn), 1e-3) |
||
303 | model.thaw_parameter("{0}:tau0".format(pn)) |
||
304 | if pn in fit_annlifetimes: |
||
305 | model.thaw_parameter("{0}:taucos1".format(pn)) |
||
306 | model.thaw_parameter("{0}:tausin1".format(pn)) |
||
307 | for freq in freqs: |
||
308 | if not args.fit_phase: |
||
309 | model.thaw_parameter("f{0:.0f}:cos".format(freq)) |
||
310 | model.thaw_parameter("f{0:.0f}:sin".format(freq)) |
||
311 | else: |
||
312 | model.thaw_parameter("f{0:.0f}:amp".format(freq)) |
||
313 | model.thaw_parameter("f{0:.0f}:phase".format(freq)) |
||
314 | if args.fit_offset: |
||
315 | #model.set_parameter("offset:value", -100.) |
||
316 | #model.set_parameter("offset:value", 0) |
||
317 | model.thaw_parameter("offset:value") |
||
318 | |||
319 | if initial is not None: |
||
320 | model.set_parameter_vector(initial) |
||
321 | # model.thaw_parameter("GM:ltscan") |
||
322 | logging.debug("params: %s", model.get_parameter_dict()) |
||
323 | logging.debug("param names: %s", model.get_parameter_names()) |
||
324 | logging.debug("param vector: %s", model.get_parameter_vector()) |
||
325 | logging.debug("param bounds: %s", model.get_parameter_bounds()) |
||
326 | #logging.debug("model value: %s", model.get_value(no_ys)) |
||
327 | #logging.debug("default log likelihood: %s", model.log_likelihood(model.vector)) |
||
328 | |||
329 | # setup the Gaussian Process kernel |
||
330 | kernel_base = (1e7 * args.scale)**2 |
||
331 | ksub = args.name_suffix |
||
332 | |||
333 | solver = "basic" |
||
334 | skwargs = {} |
||
335 | if args.HODLR_Solver: |
||
336 | solver = "HODLR" |
||
337 | #skwargs = {"tol": 1e-3} |
||
338 | |||
339 | if args.george: |
||
340 | gpname, kernel = setup_george_kernel(kernls, |
||
341 | kernel_base=kernel_base, fit_bias=args.fit_bias) |
||
342 | gpmodel = george.GP(kernel, mean=model, |
||
343 | white_noise=1.e-25, fit_white_noise=args.fit_white, |
||
344 | solver=george_solvers[solver], **skwargs) |
||
345 | # the george interface does not allow setting the bounds in |
||
346 | # the kernel initialization so we prepare simple default bounds |
||
347 | kernel_bounds = [(-0.3 * max_amp, 0.3 * max_amp) |
||
348 | for _ in gpmodel.kernel.get_parameter_names()] |
||
349 | bounds = gpmodel.mean.get_parameter_bounds() + kernel_bounds |
||
350 | else: |
||
351 | gpname, cel_terms = setup_celerite_terms(kernls, |
||
352 | fit_bias=args.fit_bias, fit_white=args.fit_white) |
||
353 | gpmodel = celerite.GP(cel_terms, mean=model, |
||
354 | fit_white_noise=args.fit_white, |
||
355 | fit_mean=True) |
||
356 | bounds = gpmodel.get_parameter_bounds() |
||
357 | gpmodel.compute(no_ys_train, no_errs_train) |
||
358 | logging.debug("gpmodel params: %s", gpmodel.get_parameter_dict()) |
||
359 | logging.debug("gpmodel bounds: %s", bounds) |
||
360 | logging.debug("initial log likelihood: %s", gpmodel.log_likelihood(no_dens_train)) |
||
361 | if isinstance(gpmodel, celerite.GP): |
||
362 | logging.info("(GP) jitter: %s", gpmodel.kernel.jitter) |
||
363 | model_name = "_".join(gpmodel.mean.get_parameter_names()).replace(':', '') |
||
364 | gpmodel_name = model_name + gpname |
||
365 | logging.info("GP model name: %s", gpmodel_name) |
||
366 | |||
367 | pre_opt = False |
||
368 | if args.optimize > 0: |
||
369 | def gpmodel_mean(x, *p): |
||
370 | gpmodel.set_parameter_vector(p) |
||
371 | return gpmodel.mean.get_value(x) |
||
372 | |||
373 | def gpmodel_res(x, *p): |
||
374 | gpmodel.set_parameter_vector(p) |
||
375 | return (gpmodel.mean.get_value(x) - no_dens_train) / no_errs_train |
||
376 | |||
377 | def lpost(p, y, gp): |
||
378 | gp.set_parameter_vector(p) |
||
379 | return gp.log_likelihood(y, quiet=True) + gp.log_prior() |
||
380 | |||
381 | def nlpost(p, y, gp): |
||
382 | lp = lpost(p, y, gp) |
||
383 | return -lp if np.isfinite(lp) else 1e25 |
||
384 | |||
385 | def grad_nlpost(p, y, gp): |
||
386 | gp.set_parameter_vector(p) |
||
387 | grad_ll = gp.grad_log_likelihood(y) |
||
388 | if isinstance(grad_ll, tuple): |
||
389 | # celerite |
||
390 | return -grad_ll[1] |
||
391 | # george |
||
392 | return -grad_ll |
||
393 | |||
394 | if args.optimize == 1: |
||
395 | resop_gp = op.minimize( |
||
396 | nlpost, |
||
397 | gpmodel.get_parameter_vector(), |
||
398 | args=(no_dens_train, gpmodel), |
||
399 | bounds=bounds, |
||
400 | # method="l-bfgs-b", options=dict(disp=True, maxcor=100, eps=1e-9, ftol=2e-15, gtol=1e-8)) |
||
401 | method="l-bfgs-b", jac=grad_nlpost) |
||
402 | # method="tnc", options=dict(disp=True, maxiter=500, xtol=1e-12)) |
||
403 | # method="nelder-mead", options=dict(disp=True, maxfev=100000, fatol=1.49012e-8, xatol=1.49012e-8)) |
||
404 | # method="Powell", options=dict(ftol=1.49012e-08, xtol=1.49012e-08)) |
||
405 | if args.optimize == 2: |
||
406 | resop_gp = op.differential_evolution( |
||
407 | nlpost, |
||
408 | bounds=bounds, |
||
409 | args=(no_dens_train, gpmodel), |
||
410 | popsize=2 * args.walkers, tol=0.01) |
||
411 | if args.optimize == 3: |
||
412 | resop_bh = op.basinhopping( |
||
413 | nlpost, |
||
414 | gpmodel.get_parameter_vector(), |
||
415 | niter=200, |
||
416 | minimizer_kwargs=dict( |
||
417 | args=(no_dens_train, gpmodel), |
||
418 | bounds=bounds, |
||
419 | # method="tnc")) |
||
420 | # method="l-bfgs-b", options=dict(maxcor=100))) |
||
421 | method="l-bfgs-b", jac=grad_nlpost)) |
||
422 | # method="Nelder-Mead")) |
||
423 | # method="BFGS")) |
||
424 | # method="Powell", options=dict(ftol=1.49012e-08, xtol=1.49012e-08))) |
||
425 | logging.debug("optimization result: %s", resop_bh) |
||
426 | resop_gp = resop_bh.lowest_optimization_result |
||
427 | if args.optimize == 4: |
||
428 | resop_gp, cov_gp = op.curve_fit( |
||
429 | gpmodel_mean, |
||
430 | no_ys_train, no_dens_train, gpmodel.get_parameter_vector(), |
||
431 | bounds=tuple(np.array(bounds).T), |
||
432 | # method='lm', |
||
433 | # absolute_sigma=True, |
||
434 | sigma=no_errs_train) |
||
435 | print(resop_gp, np.sqrt(np.diag(cov_gp))) |
||
436 | logging.info("%s", resop_gp.message) |
||
437 | logging.debug("optimization result: %s", resop_gp) |
||
438 | logging.info("gpmodel dict: %s", gpmodel.get_parameter_dict()) |
||
439 | logging.info("log posterior trained: %s", lpost(gpmodel.get_parameter_vector(), no_dens_train, gpmodel)) |
||
440 | gpmodel.compute(no_ys_test, no_errs_test) |
||
441 | logging.info("log posterior test: %s", lpost(gpmodel.get_parameter_vector(), no_dens_test, gpmodel)) |
||
442 | gpmodel.compute(no_ys, no_errs) |
||
443 | logging.info("log posterior all: %s", lpost(gpmodel.get_parameter_vector(), no_dens, gpmodel)) |
||
444 | # cross check to make sure that the gpmodel parameter vector is really |
||
445 | # set to the fitted parameters |
||
446 | logging.info("opt. model vector: %s", resop_gp.x) |
||
447 | gpmodel.compute(no_ys_train, no_errs_train) |
||
448 | logging.debug("opt. log posterior trained 1: %s", lpost(resop_gp.x, no_dens_train, gpmodel)) |
||
449 | gpmodel.compute(no_ys_test, no_errs_test) |
||
450 | logging.debug("opt. log posterior test 1: %s", lpost(resop_gp.x, no_dens_test, gpmodel)) |
||
451 | gpmodel.compute(no_ys, no_errs) |
||
452 | logging.debug("opt. log posterior all 1: %s", lpost(resop_gp.x, no_dens, gpmodel)) |
||
453 | logging.debug("opt. model vector: %s", gpmodel.get_parameter_vector()) |
||
454 | gpmodel.compute(no_ys_train, no_errs_train) |
||
455 | logging.debug("opt. log posterior trained 2: %s", lpost(gpmodel.get_parameter_vector(), no_dens_train, gpmodel)) |
||
456 | gpmodel.compute(no_ys_test, no_errs_test) |
||
457 | logging.debug("opt. log posterior test 2: %s", lpost(gpmodel.get_parameter_vector(), no_dens_test, gpmodel)) |
||
458 | gpmodel.compute(no_ys, no_errs) |
||
459 | logging.debug("opt. log posterior all 2: %s", lpost(gpmodel.get_parameter_vector(), no_dens, gpmodel)) |
||
460 | pre_opt = resop_gp.success |
||
461 | try: |
||
462 | logging.info("GM lt: %s", gpmodel.get_parameter("mean:GM:tau0")) |
||
463 | except ValueError: |
||
464 | pass |
||
465 | logging.info("(GP) model: %s", gpmodel.kernel) |
||
466 | if isinstance(gpmodel, celerite.GP): |
||
467 | logging.info("(GP) jitter: %s", gpmodel.kernel.jitter) |
||
468 | |||
469 | bestfit = gpmodel.get_parameter_vector() |
||
470 | filename_base = ("NO_regress_fit_{0}_{1:.0f}_{2:.0f}_{{0}}_{3}" |
||
471 | .format(gpmodel_name, lat * 10, alt, ksub)) |
||
472 | |||
473 | if args.mcmc: |
||
474 | gpmodel.compute(no_ys_train, no_errs_train) |
||
475 | samples, lnp = mcmc_sample_model(gpmodel, |
||
476 | no_dens_train, |
||
477 | beta=1.0, |
||
478 | nwalkers=args.walkers, nburnin=args.burn_in, |
||
479 | nprod=args.production, nthreads=args.threads, |
||
480 | show_progress=args.progress, |
||
481 | optimized=pre_opt, bounds=bounds, return_logpost=True) |
||
482 | |||
483 | if args.train_fraction < 1. or args.test_fraction < 1.: |
||
484 | logging.info("Statistics for the test samples") |
||
485 | mcmc_statistics(gpmodel, |
||
486 | no_ys_test, no_dens_test, no_errs_test, |
||
487 | no_ys_train, no_dens_train, no_errs_train, |
||
488 | samples, lnp, |
||
489 | ) |
||
490 | logging.info("Statistics for all samples") |
||
491 | mcmc_statistics(gpmodel, |
||
492 | no_ys, no_dens, no_errs, |
||
493 | no_ys_train, no_dens_train, no_errs_train, |
||
494 | samples, lnp, |
||
495 | ) |
||
496 | |||
497 | sampl_percs = np.percentile(samples, [2.5, 50, 97.5], axis=0) |
||
498 | if args.plot_corner: |
||
499 | import corner |
||
500 | # Corner plot of the sampled parameters |
||
501 | fig = corner.corner(samples, |
||
502 | quantiles=[0.025, 0.5, 0.975], |
||
503 | show_titles=True, |
||
504 | labels=gpmodel.get_parameter_names(), |
||
505 | truths=bestfit, |
||
506 | hist_args=dict(normed=True)) |
||
507 | fig.savefig(filename_base.format("corner") + ".pdf", transparent=True) |
||
508 | |||
509 | if args.save_samples: |
||
510 | if args.samples_format in ["npz"]: |
||
511 | # save the samples compressed to save space. |
||
512 | np.savez_compressed(filename_base.format("sampls") + ".npz", |
||
513 | samples=samples) |
||
514 | if args.samples_format in ["nc", "netcdf4"]: |
||
515 | save_samples_netcdf(filename_base.format("sampls") + ".nc", |
||
516 | gpmodel, alt, lat, samples, scale=args.scale, compressed=True) |
||
517 | if args.samples_format in ["h5", "hdf5"]: |
||
518 | save_samples_netcdf(filename_base.format("sampls") + ".h5", |
||
519 | gpmodel, alt, lat, samples, scale=args.scale, compressed=True) |
||
520 | # MCMC finished here |
||
521 | |||
522 | # set the model times and errors to use the full data set for plotting |
||
523 | gpmodel.compute(no_ys, no_errs) |
||
524 | if args.save_model: |
||
525 | try: |
||
526 | # python 2 |
||
527 | import cPickle as pickle |
||
528 | except ImportError: |
||
529 | # python 3 |
||
530 | import pickle |
||
531 | # pickle and save the model |
||
532 | with open(filename_base.format("model") + ".pkl", "wb") as f: |
||
533 | pickle.dump((gpmodel), f, -1) |
||
534 | |||
535 | if args.plot_samples and args.mcmc: |
||
536 | plot_random_samples(gpmodel, no_ys, no_dens, no_errs, |
||
537 | samples, args.scale, |
||
538 | filename_base.format("sampls") + ".pdf", |
||
539 | size=4, extra_years=[4, 2]) |
||
540 | |||
541 | if args.plot_median: |
||
542 | plot_single_sample_and_residuals(gpmodel, no_ys, no_dens, no_errs, |
||
543 | sampl_percs[1], |
||
544 | filename_base.format("median") + ".pdf") |
||
545 | if args.plot_residuals: |
||
546 | plot_residual(gpmodel, no_ys, no_dens, no_errs, |
||
547 | sampl_percs[1], args.scale, |
||
548 | filename_base.format("medres") + ".pdf") |
||
549 | if args.plot_maxlnp: |
||
550 | plot_single_sample_and_residuals(gpmodel, no_ys, no_dens, no_errs, |
||
551 | samples[np.argmax(lnp)], |
||
552 | filename_base.format("maxlnp") + ".pdf") |
||
553 | if args.plot_maxlnpres: |
||
554 | plot_residual(gpmodel, no_ys, no_dens, no_errs, |
||
555 | samples[np.argmax(lnp)], args.scale, |
||
556 | filename_base.format("mlpres") + ".pdf") |
||
557 | |||
558 | labels = gpmodel.get_parameter_names() |
||
559 | logging.info("param percentiles [2.5, 50, 97.5]:") |
||
560 | for pc, label in zip(sampl_percs.T, labels): |
||
561 | median = pc[1] |
||
562 | pc_minus = median - pc[0] |
||
563 | pc_plus = pc[2] - median |
||
564 | logging.debug("%s: %s", label, pc) |
||
565 | logging.info("%s: %.6f (- %.6f) (+ %.6f)", label, |
||
566 | median, pc_minus, pc_plus) |
||
567 | |||
568 | logging.info("Finished successfully.") |
||
569 | |||
573 |