diff options
Diffstat (limited to 'acispy')
-rw-r--r-- | acispy/image.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/acispy/image.py b/acispy/image.py new file mode 100644 index 0000000..0bcaf67 --- /dev/null +++ b/acispy/image.py @@ -0,0 +1,22 @@ +# Copyright (c) 2017 Weitian LI <liweitianux@live.com> +# MIT license + +""" +FITS image utilities +""" + +import subprocess + + +def get_xygrid(image): + """ + Get the ``xygrid`` of the input image. + """ + subprocess.check_call(["punlearn", "get_sky_limits"]) + subprocess.check_call([ + "get_sky_limits", "image=%s" % image, "verbose=0" + ]) + xygrid = subprocess.check_output([ + "pget", "get_sky_limits", "xygrid" + ]).decode("utf-8").strip() + return xygrid |