diff options
author | Aaron LI <aly@aaronly.me> | 2018-12-11 00:00:45 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2018-12-11 00:00:45 +0800 |
commit | 76942d3fa965d4b8fd5e9726bd93b54d0c0f5dab (patch) | |
tree | 36f7067ea6701272d94b5df485adca1bc24aad4c /bin | |
parent | 3179cc6c9efb166fa3a4e14aa3d682286b3e0cec (diff) | |
download | fg21sim-76942d3fa965d4b8fd5e9726bd93b54d0c0f5dab.tar.bz2 |
make-ska1low-model: Add --position argument
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/make-ska1low-model | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/bin/make-ska1low-model b/bin/make-ska1low-model index df88d27..7ed9962 100755 --- a/bin/make-ska1low-model +++ b/bin/make-ska1low-model @@ -50,6 +50,9 @@ def main(): parser.add_argument("-o", "--outdir", dest="outdir", required=True, help="output telescope model directory") + parser.add_argument("--position", + help="telescope position on Earth; " + + "longitude,latitude [deg]") args = parser.parse_args() loglevel = "DEBUG" if args.debug else "INFO" @@ -58,7 +61,11 @@ def main(): logger = logging.getLogger(tool) logger.info("COMMAND: {0}".format(" ".join(sys.argv))) - ska1low = telescope.SKA1Low(args.layoutfile) + position = None + if args.position: + position = list(map(float, args.position.split(","))) + logger.info("Telescope position: (%f, %f) [deg]" % tuple(position)) + ska1low = telescope.SKA1Low(args.layoutfile, position=position) ska1low.generate_stations() ska1low.make_oskar_model(args.outdir, clobber=args.clobber) if args.plot: |