aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-09-13 10:10:08 +0800
committerAaron LI <aly@aaronly.me>2017-09-13 10:10:08 +0800
commita11a34e451bc50a6a4856c6869ef2a9c9efbe038 (patch)
tree2568ca72a755c07766f91eebc5855315d0bd61c6
parent8288f12f8439fbc2958fcc8ffd32eedc7f216739 (diff)
downloadatoolbox-a11a34e451bc50a6a4856c6869ef2a9c9efbe038.tar.bz2
run_oskar.py: Convert command arguments to string
-rwxr-xr-xastro/oskar/run_oskar.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/astro/oskar/run_oskar.py b/astro/oskar/run_oskar.py
index a2f0a00..dd55251 100755
--- a/astro/oskar/run_oskar.py
+++ b/astro/oskar/run_oskar.py
@@ -29,16 +29,16 @@ def run_oskar(configfile, model, freq, vis_ms, vis_oskar=None,
print("Updating simulation settings ...")
simulator = "oskar_sim_interferometer"
for item, value in [
- ("simulator/max_sources_per_chunk", chunksize),
- ("sky/oskar_sky_model/file", model),
- ("telescope/input_directory", telescope),
- ("observation/start_frequency_hz", str(freq*1e6)),
+ ("simulator/max_sources_per_chunk", chunksize),
+ ("sky/oskar_sky_model/file", model),
+ ("telescope/input_directory", telescope),
+ ("observation/start_frequency_hz", freq*1e6), # [MHz] -> [Hz]
("interferometer/oskar_vis_filename", vis_oskar),
- ("interferometer/ms_filename", vis_ms)]:
+ ("interferometer/ms_filename", vis_ms)]:
if value is not None:
subprocess.check_call([simulator, "--set",
- configfile, item, value])
- print("Updated '%s' -> '%s'" % (item, value))
+ configfile, item, str(value)])
+ print("Updated '%s' -> '%s'" % (item, str(value)))
print("-------------------------------------------------------------")
print("Simulating %s @ %.2f [MHz] ..." % (model, freq))