blob: 0bcaf670ac61c2b9d4b69098ca4d988bfbe2c320 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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
|