action='store_true', dest='overwrite', default=False, help='Destroy everything.') parser.add_argument('--data-path', dest='data_path', default=None, type=str) args = parser.parse_args() # Set logger level based on verbose flags if args.verbosity != 0: if args.verbosity == 1: logger.setLevel(logging.DEBUG) else: # anything >= 2 logger.setLevel(1) elif args.quietness != 0: if args.quietness == 1: logger.setLevel(logging.WARNING) else: # anything >= 2 logger.setLevel(logging.ERROR) else: # default logger.setLevel(logging.INFO) if args.seed is not None: np.random.seed(args.seed)
dest="data_file_ext", default='ecsv', type=str, help="Extension of data files.") args = parser.parse_args() loggers = [joker_logger, logger] # Set logger level based on verbose flags if args.verbosity != 0: if args.verbosity == 1: logger.setLevel(logging.DEBUG) else: # anything >= 2 logger.setLevel(1) joker_logger.setLevel(1) elif args.quietness != 0: if args.quietness == 1: logger.setLevel(logging.WARNING) joker_logger.setLevel(logging.WARNING) else: # anything >= 2 logger.setLevel(logging.ERROR) joker_logger.setLevel(logging.ERROR) else: # default logger.setLevel(logging.INFO) joker_logger.setLevel(logging.INFO) # Load data here filename = path.join(args.data_path,
default=False) parser.add_argument('-P', default=128, type=int, dest='P') parser.add_argument('--time_sampling', type=str, default='uniform', dest='time_sampling') args = parser.parse_args() # Set logger level based on verbose flags if args.verbosity != 0: if args.verbosity == 1: logger.setLevel(logging.DEBUG) else: # anything >= 2 logger.setLevel(1) joker_logger.setLevel(logging.DEBUG) elif args.quietness != 0: if args.quietness == 1: logger.setLevel(logging.WARNING) else: # anything >= 2 logger.setLevel(logging.ERROR) joker_logger.setLevel(logging.ERROR) else: # default logger.setLevel(logging.INFO) if args.seed is not None: np.random.seed(args.seed) pool = schwimmbad.choose_pool(mpi=args.mpi, processes=args.n_cores)