From 8ec9862f63f21d7227fc54b7c211e50d2dfd77f7 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Mon, 4 Mar 2019 00:22:23 +0800 Subject: astro/wsclean.py: Add -j/--threads argument --- astro/oskar/wsclean.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'astro/oskar/wsclean.py') diff --git a/astro/oskar/wsclean.py b/astro/oskar/wsclean.py index 8a2f265..8f318a0 100755 --- a/astro/oskar/wsclean.py +++ b/astro/oskar/wsclean.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # -# Copyright (c) 2017-2018 Aaron LI -# MIT license +# Copyright (c) 2017-2019 Aaron LI +# MIT License # # Create image from OSKAR simulated visibility data using `WSClean`. # WSClean: https://sourceforge.net/p/wsclean/ @@ -88,6 +88,8 @@ def main(): "--niter to 0") parser.add_argument("-n", "--dry-run", dest="dryrun", action="store_true", help="do not actually run WSClean") + parser.add_argument("-j", "--threads", type=int, + help="number of computing threads to use") parser.add_argument("--update-model", dest="update_model", action="store_true", help="write/update the MODEL_DATA column in MS") @@ -183,6 +185,10 @@ def main(): cmdargs += ["-weight", "briggs", args.briggs] else: cmdargs += ["-weight", args.weight] # natural + + if args.threads: + cmdargs += ["-j", args.threads] + cmdargs += ["-gain", args.gain] cmdargs += ["-mgain", args.mgain] cmdargs += ["-size", args.size, args.size] -- cgit v1.2.2