final catalog ready
This commit is contained in:
15
data/4XMM-DR12/print_ds9reg.py
Executable file
15
data/4XMM-DR12/print_ds9reg.py
Executable file
@@ -0,0 +1,15 @@
|
||||
from astropy.io import fits
|
||||
import sys
|
||||
|
||||
filename='4XMM_DR12cat_slim_v1.0_UDS.fits.catalog'
|
||||
fout=filename.replace(".fits.catalog", ".names.reg")
|
||||
|
||||
hdul = fits.open(filename)
|
||||
#hdul.info()
|
||||
|
||||
tbdata = hdul[1].data
|
||||
|
||||
with open("../../products/{}".format(fout), 'w') as writer:
|
||||
for rec in tbdata:
|
||||
#writer.write("fk5;point({}, {})\n".format(rec['sc_ra'],rec['sc_dec']))
|
||||
writer.write("fk5;circle({}, {}, {}) # text={{{}}}\n".format(rec['sc_ra'],rec['sc_dec'],rec['sc_poserr']/3600,rec['IAUNAME']))
|
Reference in New Issue
Block a user