generated from erosita/uds
Initial commit
This commit is contained in:
18
data/X-CLASS/print_ds9reg.py
Executable file
18
data/X-CLASS/print_ds9reg.py
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
from astropy.io import fits
|
||||
|
||||
hdul = fits.open('x-class_UDS.fits.catalog')
|
||||
tbdata = hdul[1].data
|
||||
hdul.close()
|
||||
|
||||
with open("../../products/x-class_UDS.fits.reg", 'w') as writer:
|
||||
for rec in tbdata:
|
||||
writer.write("fk5;circle({}, {}, {}) # color=magenta text={{{} {:.2f} {:.2f}}}\n".format(rec['RAJ2000'],
|
||||
rec['DEJ2000'],
|
||||
rec['extent']/3600,
|
||||
rec['XClass'],
|
||||
rec['MLdet'],
|
||||
rec['MLext'],))
|
||||
|
||||
|
Reference in New Issue
Block a user