File: votabletofits

package info (click to toggle)
astrometry.net 0.76%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 18,120 kB
  • sloc: ansic: 161,636; python: 19,915; makefile: 1,439; awk: 159; cpp: 78; pascal: 67; sh: 61; perl: 9
file content (25 lines) | stat: -rwxr-xr-x 781 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#! /usr/bin/env python3
# This file is part of the Astrometry.net suite.
# Licensed under a 3-clause BSD style license - see LICENSE
import sys

# Assume this script is in $(INSTALL_DIR)/bin/ and the
# python base directory is in $(INSTALL_DIR)/lib/python/ .
try:
    # If the PYTHONPATH is already set up, don't mess with it.
    import astrometry.util.siap
except:
    import os
    sys.path.insert(1, os.path.normpath(os.path.join(os.path.dirname(__file__), '..', 'lib', 'python')))

from astrometry.util.siap import siap_parse_result

from optparse import OptionParser
parser = OptionParser('%prog <input vo-table> <output FITS.')
opt,args = parser.parse_args()
if len(args) != 2:
    parser.print_help()
    sys.exit(-1)
T = siap_parse_result(args[0])
T.writeto(args[1])