final catalog ready

This commit is contained in:
2023-04-25 19:16:05 +03:00
parent 4e6025f357
commit 4e5f88e166
17 changed files with 6762 additions and 115 deletions

15
data/4XMM-DR12/print_ds9reg.py Executable file
View 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']))