@@ -0,0 +1,1051 @@
+from astrometry.util.sip import *%0A%0Afrom optparse import OptionParser%0A%0Aif __name__ == '__main__':%0A%09parser = OptionParser('usage: %25prog %5Boptions%5D %3Coutfn%3E')%0A%09#parser.add_option('-o', dest='ra', type='float', help='RA (deg)')%0A%09parser.add_option('-r', '--ra', dest='ra', type='float', help='RA (deg)')%0A%09parser.add_option('-d', '--dec', dest='dec', type='float', help='Dec (deg)')%0A%09parser.add_option('-s', '--size', dest='size', type='float', help='Field width (deg)')%0A%09parser.add_option('-W', '--width', dest='w', type='int', help='Image width')%0A%09parser.add_option('-H', '--height', dest='h', type='int', help='Image height')%0A%09# crpix at image middle%0A%09parser.set_defaults(ra=None, dec=None, size=None, w=None, h=None)%0A%09opt,args = parser.parse_args()%0A%0A%09wcs = Tan()%0A%09wcs.crval%5B0%5D = opt.ra%0A%09wcs.crval%5B1%5D = opt.dec%0A%09wcs.imagew = opt.w%0A%09wcs.imageh = opt.h%0A%09wcs.crpix%5B0%5D = 0.5 + (opt.w / 2.)%0A%09wcs.crpix%5B1%5D = 0.5 + (opt.h / 2.)%0A%09pixscale = opt.size / opt.w%0A%09wcs.cd%5B0%5D = -pixscale%0A%09wcs.cd%5B1%5D = 0%0A%09wcs.cd%5B2%5D = 0%0A%09wcs.cd%5B3%5D = -pixscale%0A%0A%09wcs.write_to_file(args%5B0%5D)%0A%0A

add hacky make-wcs.py