From 7f2c4e55d04ba56e304d7aeca47a84c4aecb260d Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 22 Nov 2017 22:24:24 +0800 Subject: Minor improves to output/logging --- astro/21cm/cube_mean.py | 2 +- astro/oskar/taper_sky.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'astro') diff --git a/astro/21cm/cube_mean.py b/astro/21cm/cube_mean.py index a925532..04db27d 100755 --- a/astro/21cm/cube_mean.py +++ b/astro/21cm/cube_mean.py @@ -21,7 +21,7 @@ def main(): parser.add_argument("infiles", nargs="+", help="input data cubes") args = parser.parse_args() - print("# filename: mean side_length") + print("# filename:\t\t mean\t Nside(cubic)") for f in args.infiles: cube = np.fromfile(open(f, "rb"), dtype=args.dtype) sidelen = round(cube.shape[0] ** (1.0/3)) diff --git a/astro/oskar/taper_sky.py b/astro/oskar/taper_sky.py index f70b47c..132919b 100755 --- a/astro/oskar/taper_sky.py +++ b/astro/oskar/taper_sky.py @@ -23,8 +23,9 @@ from scipy import interpolate import astropy.io.fits as fits -logging.basicConfig(level=logging.INFO) -logger = logging.getLogger(os.path.basename(sys.argv[0])) +logging.basicConfig(level=logging.INFO, + format="[%(levelname)s:%(lineno)d] %(message)s") +logger = logging.getLogger() def make2d(w1d, x=None): -- cgit v1.2.2