Commit c47b070c authored by alexandre beelen's avatar alexandre beelen

Add Geach 2017 & Magnelli 2019 for COSMOS

parent 99bfc4ac
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
# Extracted from tab 1
#
# Magnelli et al 2019 (2019ApJ...877...45M)
#
# IRAM/GISMO 2mm Survey
#
# ID R.A. Decl. S/N S_2mm S_2mm_Zavala+19 S_2mm_Bethermin17 S_2mm_Staguhn+14 P_f
# J2000 J2000 (mJy) (mJy) (mJy) (mJy) %
GISMO-C1 09:59:59.2 +2:34:41.89 5.8 1.29 0.22 1.11 +0.20 -0.31 1.07 +0.20 -0.31 1.15 +0.25 -0.25 0.0
GISMO-C2 10:00:08.0 +2:26:11.90 5.0 1.09 0.22 0.90 +0.18 -0.35 0.80 +0.19 -0.33 0.90 +0.27 -0.27 1.4
GISMO-C3 09:59:57.0 +2:27:26.89 4.6 1.02 0.22 0.81 +0.18 -0.35 0.69 +0.20 -0.32 0.80 +0.28 -0.28 4.0
GISMO-C4 09:59:48.2 +2:26:29.88 4.4 1.01 0.23 0.76 +0.21 -0.35 0.65 +0.20 -0.34 0.75 +0.30 -0.30 6.2
#
GISMO-C5 10:00:25.0 +2:23:38.90 3.9 0.86 0.22 0.55 +0.22 -0.35 0.48 +0.13 -0.33 0.55 +0.30 -0.30 23.3
GISMO-C6 10:00:05.2 +2:25:23.90 3.9 0.84 0.22 0.53 +0.21 -0.35 0.47 +0.13 -0.32 0.52 +0.30 -0.30 24.1
GISMO-C7 10:00:19.8 +2:32:02.90 3.8 0.84 0.22 0.53 +0.21 -0.35 0.47 +0.13 -0.32 0.52 +0.30 -0.30 24.1
GISMO-C8 10:00:23.4 +2:29:05.90 3.7 0.82 0.22 0.50 +0.19 -0.35 0.43 +0.13 -0.31 0.49 +0.29 -0.29 31.7
GISMO-C9 09:59:49.8 +2:32:20.88 3.7 0.82 0.22 0.50 +0.19 -0.35 0.43 +0.13 -0.31 0.49 +0.29 -0.29 31.7
This diff is collapsed.
# Region file format: DS9 astropy/regions
fk5
circle(149.996673,2.578298,0.006667) # GISMO-C1
circle(150.033340,2.436634,0.006667) # GISMO-C2
circle(149.987506,2.457464,0.006667) # GISMO-C3
circle(149.950840,2.441628,0.006667) # GISMO-C4
circle(150.104173,2.394134,0.006667) # GISMO-C5
circle(150.021673,2.423301,0.006667) # GISMO-C6
circle(150.082506,2.534134,0.006667) # GISMO-C7
circle(150.097506,2.484967,0.006667) # GISMO-C8
circle(149.957506,2.539128,0.006667) # GISMO-C9
from pathlib import Path
from astropy.io import ascii, fits
from astropy.table import Table
from astropy.coordinates import SkyCoord
import astropy.units as u
from regions import CircleSkyRegion, write_ds9
indir = Path('COSMOS/raw')
fitsdir = Path('COSMOS/cat')
regdir = Path('COSMOS/reg')
################################################################################
#
# Magnelli et al. 2019
#
path = indir / 'Magnelli19_tab1.dat'
filename = 'Magnelli2019'
bibcode = '2019ApJ...877...45M'
name = 'Magnelli et al. 2019'
instrument = 'GISMO@IRAM30m'
fwhm = 24 * u.arcsec
data = ascii.read(path,
format='fixed_width', comment='#', delimiter=' ', header_start=None, data_start=0,
names=['ID',
'R.A. (J2000)', 'Dec. (J2000)',
'S/N',
'f2000', 'e2000',
'f2000 (deboosted Zavala+19)', 'ep2000 (deboosted Zavala+19)', 'em2000 (deboosted Zavala+19)',
'f2000 (deboosted Bethermin+17)', 'ep2000 (deboosted Bethermin+17)', 'em2000 (deboosted Bethermin+17)',
'f2000 (deboosted Staguhn+14)', 'ep2000 (deboosted Staguhn+14)', 'em2000 (deboosted Staguhn+14)',
'P_f'])
for col in [key for key in data.keys() if 'f2000' in key or 'e2000' in key or 'ep2000' in key or 'em2000' in key]:
data[col].unit = u.mJy
coords = SkyCoord(data['R.A. (J2000)'], data['Dec. (J2000)'], unit=(u.hourangle, u.deg))
data['_ra'] = coords.ra
data['_dec'] = coords.dec
data.meta['bibcode'] = bibcode
data.meta['name'] = name
data.meta['inst'] = instrument
reg = [CircleSkyRegion(coord, fwhm, meta={'comment': name}) for coord, name in zip(coords, data['ID'])]
# Meta is PER region, so no way to include global meta yet
# reg[0].meta = data.meta
write_ds9(reg, regdir / f'{filename}.reg')
data.write(fitsdir / f'{filename}.fits', overwrite=True)
################################################################################
#
# Geach et al. 2016
#
# Use the master catalog in GOODSN
path = Path('GOODSN') / 'raw' / 'S2CLS_CATALOGUE_DR1.FITS'
filename = 'Geach2017'
bibcode = '2017MNRAS.465.1789G'
name = 'Geach et al 2017'
instrument = 'SCUBA-2@JCMT'
fwhm = 14.8 * u.arcsec
data = Table.read(path)
mask = [True if 'COS' in id else False for id in data['Nickname']]
data = data[mask]
data['S_850_observed'].name = 'f850'
data['delta_S_850_inst'].name = 'e850'
data['detection_SNR'].name = 'SNR'
data['S_850_deboost'].name = 'f850 (deboosted)'
data['delta_S_850_deboost'].name = 'e850 (deboosted)'
coords = SkyCoord(data['RA'], data['Dec'], unit=(u.hourangle, u.deg))
data['_ra'] = coords.ra
data['_dec'] = coords.dec
data.meta['bibcode'] = bibcode
data.meta['name'] = name
data.meta['inst'] = instrument
reg = [CircleSkyRegion(coord, fwhm, meta={'comment': name}) for coord, name in zip(coords, data['Nickname'])]
write_ds9(reg, regdir / f'{filename}.reg')
data.write(fitsdir / f'{filename}.fits', overwrite=True)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment