diff options
author | Aaron LI <aly@aaronly.me> | 2017-07-01 01:56:07 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-07-01 01:56:07 +0800 |
commit | 773ade27ee773e30fbb5c93bdaffffd53b964d48 (patch) | |
tree | 1be86d1d46a14cadfa3e8dd6326ff8ff8b5cd571 /astro | |
parent | 70cf735e7bee9c320229432400c775f6da8f0a5d (diff) | |
download | atoolbox-773ade27ee773e30fbb5c93bdaffffd53b964d48.tar.bz2 |
astro/run_oskar.py: add arguments --no-vis-oskar and --no-vis-ms
Allow to disable the output of visibility in OSKAR native format
Diffstat (limited to 'astro')
-rwxr-xr-x | astro/oskar/run_oskar.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/astro/oskar/run_oskar.py b/astro/oskar/run_oskar.py index 34860c4..257a0ea 100755 --- a/astro/oskar/run_oskar.py +++ b/astro/oskar/run_oskar.py @@ -60,6 +60,12 @@ def main(): default="visibility", help="simulated visibilities output directory " + "(default: 'visibility/')") + parser.add_argument("--no-vis-oskar", dest="no_vis_oskar", + action="store_true", + help="not save visibility in OSKAR native format") + parser.add_argument("--no-vis-ms", dest="no_vis_ms", + action="store_true", + help="not save visibility in MeasurementSet format") args = parser.parse_args() if not os.path.exists(args.outdir): @@ -76,8 +82,14 @@ def main(): for freq, skyfile in skymodels: basename = os.path.splitext(os.path.basename(skyfile))[0] - vis_oskar = os.path.join(args.outdir, basename+".oskar") - vis_ms = os.path.join(args.outdir, basename+".ms") + if args.no_vis_oskar: + vis_oskar = "" + else: + vis_oskar = os.path.join(args.outdir, basename+".oskar") + if args.no_vis_ms: + vis_ms = "" + else: + vis_ms = os.path.join(args.outdir, basename+".ms") configfile = args.fconfig.format(freq=freq) shutil.copy(args.config, configfile) print("Copied OSKAR configuration file as: %s" % configfile) |