From 5dbb18fcc00813bfbbc0e87fc6f95a9b2c58b5fe Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 15 Nov 2017 16:29:49 +0800 Subject: jybeam2k.py & wsclean.py: Update descriptions/comments --- astro/oskar/jybeam2k.py | 2 +- astro/oskar/wsclean.py | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'astro') diff --git a/astro/oskar/jybeam2k.py b/astro/oskar/jybeam2k.py index 5fcc383..76072e3 100755 --- a/astro/oskar/jybeam2k.py +++ b/astro/oskar/jybeam2k.py @@ -80,7 +80,7 @@ def main(): raise ValueError("--frequency required") print("Frequency: %.2f [MHz]" % freq) - # beam size + # Elliptical Gaussian beam (full width at half power; FWHP) bmajor = header["BMAJ"] * 3600 # [arcsec] bminor = header["BMIN"] * 3600 # [arcsec] beam = np.pi * bmajor*bminor / (4*np.log(2)) # [arcsec^2] diff --git a/astro/oskar/wsclean.py b/astro/oskar/wsclean.py index 16abeea..05899b4 100755 --- a/astro/oskar/wsclean.py +++ b/astro/oskar/wsclean.py @@ -36,13 +36,14 @@ def wsclean(args, dryrun=False): def main(): parser = argparse.ArgumentParser( description="Run WSClean with more handy arguments") - parser.add_argument("-n", "--dry-run", dest="dryrun", action="store_true", - help="do not actually run WSClean") parser.add_argument("-a", "--args", dest="args", - help="additional arguments for WSClean " + - "(in a quoted string separated by space)") + help="additional arguments for WSClean, " + + "in a quoted string separated by space, e.g.," + + "' -simulate-noise 0.001' (NOTE the beginning space!)") parser.add_argument("-d", "--dirty", dest="dirty", action="store_true", help="only create dirty images (by setting niter=0)") + parser.add_argument("-n", "--dry-run", dest="dryrun", action="store_true", + help="do not actually run WSClean") parser.add_argument("--update-model", dest="update_model", action="store_true", help="write/update the MODEL_DATA column in MS") @@ -51,12 +52,13 @@ def main(): help="save gridded weights in -weights.fits") parser.add_argument("--save-uv", dest="save_uv", action="store_true", - help="save gridded uv in -uv-{real,imag}.fits") + help="save gridded uv plane (i.e., FFT of the " + + "residual image) in -uv-{real,imag}.fits") parser.add_argument("--uv-range", dest="uv_range", default=":", help="uv range [lambda] (i.e., baseline lengths) " + "used for imaging; syntax: ':' " + "(default: ':', i.e., all uv/baselines)") - parser.add_argument("-w", "--weight", dest="weight", default="briggs", + parser.add_argument("-w", "--weight", dest="weight", default="uniform", choices=["uniform", "natural", "briggs"], help="weighting method (default: 'briggs')") parser.add_argument("-B", "--briggs", dest="briggs", @@ -64,9 +66,9 @@ def main(): help="Briggs robustness parameter (default: 0); " + "-1 (uniform) -> 1 (natural)") parser.add_argument("-#", "--niter", dest="niter", - type=int, default=100000, + type=int, default=200000, help="maximum number of CLEAN iterations " + - "(default: 100,000)") + "(default: 200,000)") parser.add_argument("--gain", dest="gain", type=float, default=0.1, help="CLEAN gain for each minor iteration " + "(default: 0.1)") @@ -121,7 +123,7 @@ def main(): elif args.weight == "briggs": cmdargs += ["-weight", "briggs", args.briggs] else: - cmdargs += ["-weight", args.weight] + cmdargs += ["-weight", args.weight] # natural cmdargs += ["-gain", args.gain] cmdargs += ["-mgain", args.mgain] cmdargs += ["-size", args.size, args.size] -- cgit v1.2.2