From 76942d3fa965d4b8fd5e9726bd93b54d0c0f5dab Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 11 Dec 2018 00:00:45 +0800 Subject: make-ska1low-model: Add --position argument --- bin/make-ska1low-model | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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: -- cgit v1.2.2