diff options
author | Aaron LI <aly@aaronly.me> | 2017-11-29 11:19:35 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-11-29 11:19:35 +0800 |
commit | 399e5695dbe998d26fba95b294bbd08c4f14b56b (patch) | |
tree | ce56b9f58db7f0731528322afe91344b9e7ff283 /astro | |
parent | 1331acf69ea16d508a4078b0ea4beded179aa831 (diff) | |
download | atoolbox-399e5695dbe998d26fba95b294bbd08c4f14b56b.tar.bz2 |
astro/wsclean.py: Add arguments --beam-size and --wlayers
Also set --niter default value to 500,000
Diffstat (limited to 'astro')
-rwxr-xr-x | astro/oskar/wsclean.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/astro/oskar/wsclean.py b/astro/oskar/wsclean.py index 383510d..2ee62bf 100755 --- a/astro/oskar/wsclean.py +++ b/astro/oskar/wsclean.py @@ -94,6 +94,12 @@ def main(): action="store_true", help="force the fitted beam to be circular, i.e., " + "BMIN == BMAJ") + parser.add_argument("--beam-size", dest="beam_size", type=float, + help="specify the circular beam size (FWHM) in " + + "[arcsec] for restoring the clean components; " + + "implies --circular-beam") + parser.add_argument("--wlayers", dest="wlayers", type=int, + help="specify the number of w-layers to use") parser.add_argument("--uv-range", dest="uv_range", default=":", help="uv range [lambda] (i.e., baseline lengths) " + "used for imaging; syntax: '<min>:<max>' " + @@ -106,9 +112,9 @@ def main(): help="Briggs robustness parameter (default: 0); " + "-1 (uniform) -> 1 (natural)") parser.add_argument("-#", "--niter", dest="niter", - type=int, default=200000, + type=float, default=5e5, help="maximum number of CLEAN iterations " + - "(default: 200,000)") + "(default: 500,000)") parser.add_argument("--gain", dest="gain", type=float, default=0.1, help="CLEAN gain for each minor iteration " + "(default: 0.1)") @@ -147,14 +153,14 @@ def main(): cmdargs = [ "-verbose", "-log-time", - "-pol", "XX", # OSKAR "Scalar" simulation only give "XX" component + "-pol", "XX", # OSKAR "Scalar" simulation only gives "XX" component "-make-psf", # always make the PSF, even no cleaning performed ] if args.dirty: cmdargs += ["-niter", 0] # make dirty image only else: - cmdargs += ["-niter", args.niter] + cmdargs += ["-niter", int(args.niter)] if args.weight == "uniform": cmdargs += ["-weight", "uniform", @@ -183,6 +189,10 @@ def main(): cmdargs += ["-saveuv"] if args.circular_beam: cmdargs += ["-circularbeam"] + if args.beam_size: + cmdargs += ["-beamsize", args.beam_size] + if args.wlayers: + cmdargs += ["-nwlayers", args.wlayers] # uv/baseline range uvmin, uvmax = args.uv_range.strip().split(":") |