XMM-LSS master catalogue¶

This notebook presents the merge of the various pristine catalogues to produce the HELP master catalogue on XMM-LSS.

In [1]:
from herschelhelp_internal import git_version
print("This notebook was run with herschelhelp_internal version: \n{}".format(git_version()))
This notebook was run with herschelhelp_internal version: 
33f5ec7 (Wed Dec 6 16:56:17 2017 +0000)
In [2]:
%matplotlib inline
#%config InlineBackend.figure_format = 'svg'

import matplotlib.pyplot as plt
plt.rc('figure', figsize=(10, 6))

import os
import time

from astropy import units as u
from astropy.coordinates import SkyCoord
from astropy.table import Column, Table
import numpy as np
from pymoc import MOC

from herschelhelp_internal.masterlist import merge_catalogues, nb_merge_dist_plot, specz_merge
from herschelhelp_internal.utils import coords_to_hpidx, ebv, gen_help_id, inMoc
/Users/rs548/anaconda/envs/herschelhelp_internal/lib/python3.6/site-packages/seaborn/apionly.py:6: UserWarning: As seaborn no longer sets a default style on import, the seaborn.apionly module is deprecated. It will be removed in a future version.
  warnings.warn(msg, UserWarning)
In [3]:
TMP_DIR = os.environ.get('TMP_DIR', "./data_tmp")
OUT_DIR = os.environ.get('OUT_DIR', "./data")
SUFFIX = os.environ.get('SUFFIX', time.strftime("_%Y%m%d"))

try:
    os.makedirs(OUT_DIR)
except FileExistsError:
    pass

I - Reading the prepared pristine catalogues¶

In [4]:
candels = Table.read("{}/CANDELS.fits".format(TMP_DIR))           # 1.1
cfht_wirds = Table.read("{}/CFHT-WIRDS.fits".format(TMP_DIR))     # 1.3
cfhtls_wide = Table.read("{}/CFHTLS-WIDE.fits".format(TMP_DIR))   # 1.4a
cfhtls_deep = Table.read("{}/CFHTLS-DEEP.fits".format(TMP_DIR))   # 1.4b
#We no longer use CFHTLenS as it is the same raw data set as CFHTLS-WIDE
# cfhtlens = Table.read("{}/CFHTLENS.fits".format(TMP_DIR))         # 1.5
decals = Table.read("{}/DECaLS.fits".format(TMP_DIR))             # 1.6
servs = Table.read("{}/SERVS.fits".format(TMP_DIR))               # 1.8
swire = Table.read("{}/SWIRE.fits".format(TMP_DIR))               # 1.7
hsc_wide = Table.read("{}/HSC-WIDE.fits".format(TMP_DIR))         # 1.9a
hsc_deep = Table.read("{}/HSC-DEEP.fits".format(TMP_DIR))         # 1.9b
hsc_udeep = Table.read("{}/HSC-UDEEP.fits".format(TMP_DIR))       # 1.9c
ps1 = Table.read("{}/PS1.fits".format(TMP_DIR))                   # 1.10
sxds = Table.read("{}/SXDS.fits".format(TMP_DIR))                 # 1.11
sparcs = Table.read("{}/SpARCS.fits".format(TMP_DIR))             # 1.12
dxs = Table.read("{}/UKIDSS-DXS.fits".format(TMP_DIR))            # 1.13
uds = Table.read("{}/UKIDSS-UDS.fits".format(TMP_DIR))            # 1.14
vipers = Table.read("{}/VIPERS.fits".format(TMP_DIR))             # 1.15
vhs = Table.read("{}/VISTA-VHS.fits".format(TMP_DIR))             # 1.16
video = Table.read("{}/VISTA-VIDEO.fits".format(TMP_DIR))         # 1.17
viking = Table.read("{}/VISTA-VIKING.fits".format(TMP_DIR))       # 1.18

II - Merging tables¶

We first merge the optical catalogues and then add the infrared ones. We start with PanSTARRS because it coevrs the whole field.

At every step, we look at the distribution of the distances separating the sources from one catalogue to the other (within a maximum radius) to determine the best cross-matching radius.

Add PanSTARRS¶

In [5]:
master_catalogue = ps1
master_catalogue['ps1_ra'].name = 'ra'
master_catalogue['ps1_dec'].name = 'dec'

CANDELS¶

In [6]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(candels['candels_ra'], candels['candels_dec'])
)
HELP Warning: There weren't any cross matches. The two surveys probably don't overlap.
In [7]:
# Given the graph above, we use 0.8 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, candels, "candels_ra", "candels_dec", radius=0.8*u.arcsec)

Add CFHT-WIRDS¶

In [8]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(cfht_wirds['wirds_ra'], cfht_wirds['wirds_dec'])
)
HELP Warning: There weren't any cross matches. The two surveys probably don't overlap.
In [9]:
# Given the graph above, we use 0.8 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, cfht_wirds, "wirds_ra", "wirds_dec", radius=0.8*u.arcsec)
WARNING: MergeConflictWarning: Cannot merge meta key 'EXTNAME' types <class 'str'> and <class 'str'>, choosing EXTNAME='/Users/rs548/GitHub/dmu_products/dmu1/dmu1_ml_XMM-LSS/data_tmp/CF...' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-12-04T16:58:48' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'EXTNAME' types <class 'str'> and <class 'str'>, choosing EXTNAME='/Users/rs548/GitHub/dmu_products/dmu1/dmu1_ml_XMM-LSS/data_tmp/CF...' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-12-04T16:58:48' [astropy.utils.metadata]

Add CFHTLS¶

In [10]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(cfhtls_wide['cfhtls-wide_ra'], cfhtls_wide['cfhtls-wide_dec'])
)
In [11]:
# Given the graph above, we use 0.8 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, 
                                    cfhtls_wide, 
                                    "cfhtls-wide_ra", 
                                    "cfhtls-wide_dec", 
                                    radius=0.8*u.arcsec)
master_catalogue = merge_catalogues(master_catalogue, 
                                    cfhtls_deep, 
                                    "cfhtls-deep_ra", 
                                    "cfhtls-deep_dec", 
                                    radius=0.8*u.arcsec)

Add CFHT-LenS¶

CFHTLenS is no longer included since it is made from the same raw data as CFHTLS

In [12]:
"""
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(cfhtlens['cfhtlens_ra'], cfhtlens['cfhtlens_dec'])
)
"""
Out[12]:
"\nnb_merge_dist_plot(\n    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),\n    SkyCoord(cfhtlens['cfhtlens_ra'], cfhtlens['cfhtlens_dec'])\n)\n"
In [13]:
"""# Given the graph above, we use 0.8 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, 
                                    cfhtlens, 
                                    "cfhtlens_ra", 
                                    "cfhtlens_dec", 
                                    radius=0.8*u.arcsec)"""
Out[13]:
'# Given the graph above, we use 0.8 arc-second radius\nmaster_catalogue = merge_catalogues(master_catalogue, \n                                    cfhtlens, \n                                    "cfhtlens_ra", \n                                    "cfhtlens_dec", \n                                    radius=0.8*u.arcsec)'

Add HSC-PSS¶

In [14]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(hsc_wide['hsc-wide_ra'], hsc_wide['hsc-wide_dec'])
)
In [15]:
# Given the graph above, we use 0.8 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, hsc_wide, "hsc-wide_ra", "hsc-wide_dec", radius=0.8*u.arcsec)
master_catalogue = merge_catalogues(master_catalogue, hsc_deep, "hsc-deep_ra", "hsc-deep_dec", radius=0.8*u.arcsec)
master_catalogue = merge_catalogues(master_catalogue, hsc_udeep, "hsc-udeep_ra", "hsc-udeep_dec", radius=0.8*u.arcsec)
WARNING: MergeConflictWarning: Cannot merge meta key 'EXTNAME' types <class 'str'> and <class 'str'>, choosing EXTNAME='/Users/rs548/GitHub/dmu_products/dmu1/dmu1_ml_XMM-LSS/data_tmp/HS...' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-10-27T11:26:18' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'EXTNAME' types <class 'str'> and <class 'str'>, choosing EXTNAME='/Users/rs548/GitHub/dmu_products/dmu1/dmu1_ml_XMM-LSS/data_tmp/HS...' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-10-27T11:26:18' [astropy.utils.metadata]

Add DECaLS¶

In [16]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(decals['decals_ra'], decals['decals_dec'])
)
In [17]:
# Given the graph above, we use 0.8 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, decals, "decals_ra", "decals_dec", radius=0.8*u.arcsec)

Add SpARCS¶

In [18]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(sparcs['sparcs_ra'], sparcs['sparcs_dec'])
)
HELP Warning: There weren't any cross matches. The two surveys probably don't overlap.
In [19]:
# Given the graph above, we use 0.8 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, sparcs, "sparcs_ra", "sparcs_dec", radius=0.8*u.arcsec)
WARNING: MergeConflictWarning: Cannot merge meta key 'EXTNAME' types <class 'str'> and <class 'str'>, choosing EXTNAME='/Users/rs548/GitHub/dmu_products/dmu1/dmu1_ml_XMM-LSS/data_tmp/Sp...' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-11-01T10:29:56' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'EXTNAME' types <class 'str'> and <class 'str'>, choosing EXTNAME='/Users/rs548/GitHub/dmu_products/dmu1/dmu1_ml_XMM-LSS/data_tmp/Sp...' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-11-01T10:29:56' [astropy.utils.metadata]

 Add SXDS¶

In [20]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(sxds['sxds_ra'], sxds['sxds_dec'])
)
HELP Warning: There weren't any cross matches. The two surveys probably don't overlap.

It is strange that this does not peak at zero. This is bservable in the original band cross match. It implies there is a persistent offset. Perhaps each band should be astrometrically corrected before the original merge.

In [21]:
# Given the graph above, we use 0.8 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, sxds, "sxds_ra", "sxds_dec", radius=0.8*u.arcsec)
WARNING: MergeConflictWarning: Cannot merge meta key 'EXTNAME' types <class 'str'> and <class 'str'>, choosing EXTNAME='/Users/rs548/GitHub/dmu_products/dmu1/dmu1_ml_XMM-LSS/data_tmp/SX...' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-12-04T18:31:47' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'EXTNAME' types <class 'str'> and <class 'str'>, choosing EXTNAME='/Users/rs548/GitHub/dmu_products/dmu1/dmu1_ml_XMM-LSS/data_tmp/SX...' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-12-04T18:31:47' [astropy.utils.metadata]

Add DXS¶

In [22]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(dxs['dxs_ra'], dxs['dxs_dec'])
)
In [23]:
# Given the graph above, we use 0.8 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, dxs, "dxs_ra", "dxs_dec", radius=0.8*u.arcsec)
WARNING: MergeConflictWarning: Cannot merge meta key 'EXTNAME' types <class 'str'> and <class 'str'>, choosing EXTNAME='/Users/rs548/GitHub/dmu_products/dmu1/dmu1_ml_XMM-LSS/data_tmp/UK...' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-10-27T13:11:51' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'EXTNAME' types <class 'str'> and <class 'str'>, choosing EXTNAME='/Users/rs548/GitHub/dmu_products/dmu1/dmu1_ml_XMM-LSS/data_tmp/UK...' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-10-27T13:11:51' [astropy.utils.metadata]

Add UDS¶

In [24]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(uds['uds_ra'], uds['uds_dec'])
)
In [25]:
# Given the graph above, we use 0.8 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, uds, "uds_ra", "uds_dec", radius=0.8*u.arcsec)
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-10-27T13:11:22' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-10-27T13:11:22' [astropy.utils.metadata]

Add VIPERS¶

In [26]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(vipers['vipers_ra'], vipers['vipers_dec'])
)
In [27]:
# Given the graph above, we use 0.8 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, vipers, "vipers_ra", "vipers_dec", radius=0.8*u.arcsec)
WARNING: MergeConflictWarning: Cannot merge meta key 'EXTNAME' types <class 'str'> and <class 'str'>, choosing EXTNAME='/Users/rs548/GitHub/dmu_products/dmu1/dmu1_ml_XMM-LSS/data_tmp/VI...' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-11-01T10:29:26' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'EXTNAME' types <class 'str'> and <class 'str'>, choosing EXTNAME='/Users/rs548/GitHub/dmu_products/dmu1/dmu1_ml_XMM-LSS/data_tmp/VI...' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-11-01T10:29:26' [astropy.utils.metadata]

Add VIDEO¶

In [28]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(video['video_ra'], video['video_dec'])
)
HELP Warning: There weren't any cross matches. The two surveys probably don't overlap.
In [29]:
# Given the graph above, we use 0.8 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, video, "video_ra", "video_dec", radius=0.8*u.arcsec)
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-10-26T17:48:54' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-10-26T17:48:54' [astropy.utils.metadata]

Add VHS¶

In [30]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(vhs['vhs_ra'], vhs['vhs_dec'])
)
In [31]:
# Given the graph above, we use 0.8 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, vhs, "vhs_ra", "vhs_dec", radius=0.8*u.arcsec)
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-10-27T11:29:07' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-10-27T11:29:07' [astropy.utils.metadata]

Add VIKING¶

In [32]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(viking['viking_ra'], viking['viking_dec'])
)
In [33]:
# Given the graph above, we use 0.8 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, viking, "viking_ra", "viking_dec", radius=0.8*u.arcsec)
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-10-27T11:26:49' [astropy.utils.metadata]
WARNING: MergeConflictWarning: Cannot merge meta key 'DATE-HDU' types <class 'str'> and <class 'str'>, choosing DATE-HDU='2017-10-27T11:26:49' [astropy.utils.metadata]

Add SERVS¶

In [34]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(servs['servs_ra'], servs['servs_dec'])
)
In [35]:
# Given the graph above, we use 1 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, servs, "servs_ra", "servs_dec", radius=1.*u.arcsec)

Add SWIRE¶

In [36]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(swire['swire_ra'], swire['swire_dec'])
)
In [37]:
# Given the graph above, we use 1 arc-second radius
master_catalogue = merge_catalogues(master_catalogue, swire, "swire_ra", "swire_dec", radius=1.*u.arcsec)

Cleaning¶

When we merge the catalogues, astropy masks the non-existent values (e.g. when a row comes only from a catalogue and has no counterparts in the other, the columns from the latest are masked for that row). We indicate to use NaN for masked values for floats columns, False for flag columns and -1 for ID columns.

In [38]:
for col in master_catalogue.colnames:
    if "m_" in col or "merr_" in col or "f_" in col or "ferr_" in col or "stellarity" in col:
        master_catalogue[col] = master_catalogue[col].astype(float)
        master_catalogue[col].fill_value = np.nan
    elif "flag" in col:
        master_catalogue[col].fill_value = 0
    elif "id" in col:
        master_catalogue[col].fill_value = -1
        
master_catalogue = master_catalogue.filled()
In [39]:
master_catalogue[:10].show_in_notebook()
Out[39]:
<Table length=10>
idxps1_idradecm_ap_gpc1_gmerr_ap_gpc1_gm_gpc1_gmerr_gpc1_gm_ap_gpc1_rmerr_ap_gpc1_rm_gpc1_rmerr_gpc1_rm_ap_gpc1_imerr_ap_gpc1_im_gpc1_imerr_gpc1_im_ap_gpc1_zmerr_ap_gpc1_zm_gpc1_zmerr_gpc1_zm_ap_gpc1_ymerr_ap_gpc1_ym_gpc1_ymerr_gpc1_yf_ap_gpc1_gferr_ap_gpc1_gf_gpc1_gferr_gpc1_gflag_gpc1_gf_ap_gpc1_rferr_ap_gpc1_rf_gpc1_rferr_gpc1_rflag_gpc1_rf_ap_gpc1_iferr_ap_gpc1_if_gpc1_iferr_gpc1_iflag_gpc1_if_ap_gpc1_zferr_ap_gpc1_zf_gpc1_zferr_gpc1_zflag_gpc1_zf_ap_gpc1_yferr_ap_gpc1_yf_gpc1_yferr_gpc1_yflag_gpc1_yps1_flag_cleanedps1_flag_gaiaflag_mergedcandels_idcandels_stellarityf_ap_candels_f140wferr_ap_candels_f140wf_candels_f140wferr_candels_f140wf_ap_candels_f160wferr_ap_candels_f160wf_candels_f160wferr_candels_f160wf_candels_f606wferr_candels_f606wf_candels_f814wferr_candels_f814wf_candels_f125wferr_candels_f125wm_ap_candels_f140wmerr_ap_candels_f140wm_candels_f140wmerr_candels_f140wflag_candels_f140wm_ap_candels_f160wmerr_ap_candels_f160wm_candels_f160wmerr_candels_f160wflag_candels_f160wm_candels_f606wmerr_candels_f606wm_ap_candels_f606wmerr_ap_candels_f606wf_ap_candels_f606wferr_ap_candels_f606wflag_candels_f606wm_candels_f814wmerr_candels_f814wm_ap_candels_f814wmerr_ap_candels_f814wf_ap_candels_f814wferr_ap_candels_f814wflag_candels_f814wm_candels_f125wmerr_candels_f125wm_ap_candels_f125wmerr_ap_candels_f125wf_ap_candels_f125wferr_ap_candels_f125wflag_candels_f125wcandels_flag_cleanedcandels_flag_gaiam_ap_wirds_ksmerr_ap_wirds_ksm_wirds_ksmerr_wirds_ksf_ap_wirds_ksferr_ap_wirds_ksf_wirds_ksferr_wirds_ksflag_wirds_kswirds_flag_mergedm_ap_wirds_jmerr_ap_wirds_jm_wirds_jmerr_wirds_jf_ap_wirds_jferr_ap_wirds_jf_wirds_jferr_wirds_jflag_wirds_jm_ap_wirds_hmerr_ap_wirds_hm_wirds_hmerr_wirds_hf_ap_wirds_hferr_ap_wirds_hf_wirds_hferr_wirds_hflag_wirds_hwirds_intidwirds_stellaritywirds_flag_cleanedcfht-wirds_flag_gaiacfhtls-wide_idcfhtls-wide_stellaritym_cfhtls-wide_umerr_cfhtls-wide_um_cfhtls-wide_gmerr_cfhtls-wide_gm_cfhtls-wide_rmerr_cfhtls-wide_rm_cfhtls-wide_imerr_cfhtls-wide_im_cfhtls-wide_zmerr_cfhtls-wide_zm_ap_cfhtls-wide_umerr_ap_cfhtls-wide_um_ap_cfhtls-wide_gmerr_ap_cfhtls-wide_gm_ap_cfhtls-wide_rmerr_ap_cfhtls-wide_rm_ap_cfhtls-wide_imerr_ap_cfhtls-wide_im_ap_cfhtls-wide_zmerr_ap_cfhtls-wide_zf_cfhtls-wide_uferr_cfhtls-wide_uflag_cfhtls-wide_uf_cfhtls-wide_gferr_cfhtls-wide_gflag_cfhtls-wide_gf_cfhtls-wide_rferr_cfhtls-wide_rflag_cfhtls-wide_rf_cfhtls-wide_iferr_cfhtls-wide_iflag_cfhtls-wide_if_cfhtls-wide_zferr_cfhtls-wide_zflag_cfhtls-wide_zf_ap_cfhtls-wide_uferr_ap_cfhtls-wide_uf_ap_cfhtls-wide_gferr_ap_cfhtls-wide_gf_ap_cfhtls-wide_rferr_ap_cfhtls-wide_rf_ap_cfhtls-wide_iferr_ap_cfhtls-wide_if_ap_cfhtls-wide_zferr_ap_cfhtls-wide_zcfhtls-wide_flag_cleanedcfhtls-wide_flag_gaiacfhtls-deep_idcfhtls-deep_stellaritym_cfhtls-deep_umerr_cfhtls-deep_um_cfhtls-deep_gmerr_cfhtls-deep_gm_cfhtls-deep_rmerr_cfhtls-deep_rm_cfhtls-deep_imerr_cfhtls-deep_im_cfhtls-deep_zmerr_cfhtls-deep_zm_cfhtls-deep_ymerr_cfhtls-deep_ym_ap_cfhtls-deep_umerr_ap_cfhtls-deep_um_ap_cfhtls-deep_gmerr_ap_cfhtls-deep_gm_ap_cfhtls-deep_rmerr_ap_cfhtls-deep_rm_ap_cfhtls-deep_imerr_ap_cfhtls-deep_im_ap_cfhtls-deep_zmerr_ap_cfhtls-deep_zm_ap_cfhtls-deep_ymerr_ap_cfhtls-deep_yf_cfhtls-deep_uferr_cfhtls-deep_uflag_cfhtls-deep_uf_cfhtls-deep_gferr_cfhtls-deep_gflag_cfhtls-deep_gf_cfhtls-deep_rferr_cfhtls-deep_rflag_cfhtls-deep_rf_cfhtls-deep_iferr_cfhtls-deep_iflag_cfhtls-deep_if_cfhtls-deep_zferr_cfhtls-deep_zflag_cfhtls-deep_zf_cfhtls-deep_yferr_cfhtls-deep_yflag_cfhtls-deep_yf_ap_cfhtls-deep_uferr_ap_cfhtls-deep_uf_ap_cfhtls-deep_gferr_ap_cfhtls-deep_gf_ap_cfhtls-deep_rferr_ap_cfhtls-deep_rf_ap_cfhtls-deep_iferr_ap_cfhtls-deep_if_ap_cfhtls-deep_zferr_ap_cfhtls-deep_zf_ap_cfhtls-deep_yferr_ap_cfhtls-deep_ycfhtls-deep_flag_cleanedcfhtls-deep_flag_gaiahsc-wide_idm_ap_hsc-wide_gmerr_ap_hsc-wide_gm_hsc-wide_gmerr_hsc-wide_gm_ap_hsc-wide_rmerr_ap_hsc-wide_rm_hsc-wide_rmerr_hsc-wide_rm_ap_hsc-wide_imerr_ap_hsc-wide_im_hsc-wide_imerr_hsc-wide_im_ap_hsc-wide_zmerr_ap_hsc-wide_zm_hsc-wide_zmerr_hsc-wide_zm_ap_hsc-wide_ymerr_ap_hsc-wide_ym_hsc-wide_ymerr_hsc-wide_yhsc-wide_stellarityf_ap_hsc-wide_gferr_ap_hsc-wide_gf_hsc-wide_gferr_hsc-wide_gflag_hsc-wide_gf_ap_hsc-wide_rferr_ap_hsc-wide_rf_hsc-wide_rferr_hsc-wide_rflag_hsc-wide_rf_ap_hsc-wide_iferr_ap_hsc-wide_if_hsc-wide_iferr_hsc-wide_iflag_hsc-wide_if_ap_hsc-wide_zferr_ap_hsc-wide_zf_hsc-wide_zferr_hsc-wide_zflag_hsc-wide_zf_ap_hsc-wide_yferr_ap_hsc-wide_yf_hsc-wide_yferr_hsc-wide_yflag_hsc-wide_yhsc-wide_flag_cleanedhsc-wide_flag_gaiahsc-deep_idm_ap_hsc-deep_gmerr_ap_hsc-deep_gm_hsc-deep_gmerr_hsc-deep_gm_ap_hsc-deep_rmerr_ap_hsc-deep_rm_hsc-deep_rmerr_hsc-deep_rm_ap_hsc-deep_imerr_ap_hsc-deep_im_hsc-deep_imerr_hsc-deep_im_ap_hsc-deep_zmerr_ap_hsc-deep_zm_hsc-deep_zmerr_hsc-deep_zm_ap_hsc-deep_ymerr_ap_hsc-deep_ym_hsc-deep_ymerr_hsc-deep_yhsc-deep_stellarityf_ap_hsc-deep_gferr_ap_hsc-deep_gf_hsc-deep_gferr_hsc-deep_gflag_hsc-deep_gf_ap_hsc-deep_rferr_ap_hsc-deep_rf_hsc-deep_rferr_hsc-deep_rflag_hsc-deep_rf_ap_hsc-deep_iferr_ap_hsc-deep_if_hsc-deep_iferr_hsc-deep_iflag_hsc-deep_if_ap_hsc-deep_zferr_ap_hsc-deep_zf_hsc-deep_zferr_hsc-deep_zflag_hsc-deep_zf_ap_hsc-deep_yferr_ap_hsc-deep_yf_hsc-deep_yferr_hsc-deep_yflag_hsc-deep_yhsc-deep_flag_cleanedhsc-deep_flag_gaiahsc-udeep_idm_ap_hsc-udeep_gmerr_ap_hsc-udeep_gm_hsc-udeep_gmerr_hsc-udeep_gm_ap_hsc-udeep_rmerr_ap_hsc-udeep_rm_hsc-udeep_rmerr_hsc-udeep_rm_ap_hsc-udeep_imerr_ap_hsc-udeep_im_hsc-udeep_imerr_hsc-udeep_im_ap_hsc-udeep_zmerr_ap_hsc-udeep_zm_hsc-udeep_zmerr_hsc-udeep_zm_ap_hsc-udeep_ymerr_ap_hsc-udeep_ym_hsc-udeep_ymerr_hsc-udeep_ym_ap_hsc-udeep_n921merr_ap_hsc-udeep_n921m_hsc-udeep_n921merr_hsc-udeep_n921m_ap_hsc-udeep_n816merr_ap_hsc-udeep_n816m_hsc-udeep_n816merr_hsc-udeep_n816hsc-udeep_stellarityf_ap_hsc-udeep_gferr_ap_hsc-udeep_gf_hsc-udeep_gferr_hsc-udeep_gflag_hsc-udeep_gf_ap_hsc-udeep_rferr_ap_hsc-udeep_rf_hsc-udeep_rferr_hsc-udeep_rflag_hsc-udeep_rf_ap_hsc-udeep_iferr_ap_hsc-udeep_if_hsc-udeep_iferr_hsc-udeep_iflag_hsc-udeep_if_ap_hsc-udeep_zferr_ap_hsc-udeep_zf_hsc-udeep_zferr_hsc-udeep_zflag_hsc-udeep_zf_ap_hsc-udeep_yferr_ap_hsc-udeep_yf_hsc-udeep_yferr_hsc-udeep_yflag_hsc-udeep_yf_ap_hsc-udeep_n921ferr_ap_hsc-udeep_n921f_hsc-udeep_n921ferr_hsc-udeep_n921flag_hsc-udeep_n921f_ap_hsc-udeep_n816ferr_ap_hsc-udeep_n816f_hsc-udeep_n816ferr_hsc-udeep_n816flag_hsc-udeep_n816hsc-udeep_flag_cleanedhsc-udeep_flag_gaiadecals_idf_decam_gf_decam_rf_decam_zferr_decam_gferr_decam_rferr_decam_zf_ap_decam_gf_ap_decam_rf_ap_decam_zferr_ap_decam_gferr_ap_decam_rferr_ap_decam_zm_decam_gmerr_decam_gflag_decam_gm_decam_rmerr_decam_rflag_decam_rm_decam_zmerr_decam_zflag_decam_zm_ap_decam_gmerr_ap_decam_gm_ap_decam_rmerr_ap_decam_rm_ap_decam_zmerr_ap_decam_zdecals_stellaritydecals_flag_cleaneddecals_flag_gaiasparcs_intidsparcs_stellaritym_ap_sparcs_umerr_ap_sparcs_uf_ap_sparcs_uferr_ap_sparcs_um_sparcs_umerr_sparcs_uf_sparcs_uferr_sparcs_uflag_sparcs_um_ap_sparcs_gmerr_ap_sparcs_gf_ap_sparcs_gferr_ap_sparcs_gm_sparcs_gmerr_sparcs_gf_sparcs_gferr_sparcs_gflag_sparcs_gm_ap_sparcs_rmerr_ap_sparcs_rf_ap_sparcs_rferr_ap_sparcs_rm_sparcs_rmerr_sparcs_rf_sparcs_rferr_sparcs_rflag_sparcs_rm_ap_sparcs_zmerr_ap_sparcs_zf_ap_sparcs_zferr_ap_sparcs_zm_sparcs_zmerr_sparcs_zf_sparcs_zferr_sparcs_zflag_sparcs_zm_ap_sparcs_ymerr_ap_sparcs_yf_ap_sparcs_yferr_ap_sparcs_ym_sparcs_ymerr_sparcs_yf_sparcs_yferr_sparcs_yflag_sparcs_ysparcs_flag_cleanedsparcs_flag_gaiasxds_b_idm_ap_sxds_bmerr_ap_sxds_bm_sxds_bmerr_sxds_bsxds_flag_mergedsxds_v_idm_ap_sxds_vmerr_ap_sxds_vm_sxds_vmerr_sxds_vsxds_r_idm_ap_sxds_rmerr_ap_sxds_rm_sxds_rmerr_sxds_rsxds_i_idm_ap_sxds_imerr_ap_sxds_im_sxds_imerr_sxds_isxds_z_idm_ap_sxds_zmerr_ap_sxds_zm_sxds_zmerr_sxds_zf_ap_sxds_bferr_ap_sxds_bf_sxds_bferr_sxds_bflag_sxds_bf_ap_sxds_vferr_ap_sxds_vf_sxds_vferr_sxds_vflag_sxds_vf_ap_sxds_rferr_ap_sxds_rf_sxds_rferr_sxds_rflag_sxds_rf_ap_sxds_iferr_ap_sxds_if_sxds_iferr_sxds_iflag_sxds_if_ap_sxds_zferr_ap_sxds_zf_sxds_zferr_sxds_zflag_sxds_zsxds_stellaritysxds_flag_cleanedsxds_flag_gaiasxds_intiddxs_idm_ap_ukidss_jmerr_ap_ukidss_jm_ukidss_jmerr_ukidss_jm_ap_ukidss_kmerr_ap_ukidss_km_ukidss_kmerr_ukidss_kdxs_stellarityf_ap_ukidss_jferr_ap_ukidss_jf_ukidss_jferr_ukidss_jflag_ukidss_jf_ap_ukidss_kferr_ap_ukidss_kf_ukidss_kferr_ukidss_kflag_ukidss_kdxs_flag_cleaneddxs_flag_gaiauds_idm_ap_uds_jmerr_ap_uds_jm_uds_jmerr_uds_jm_ap_uds_hmerr_ap_uds_hm_uds_hmerr_uds_hm_ap_uds_kmerr_ap_uds_km_uds_kmerr_uds_kuds_stellarityf_ap_uds_jferr_ap_uds_jf_uds_jferr_uds_jflag_uds_jf_ap_uds_hferr_ap_uds_hf_uds_hferr_uds_hflag_uds_hf_ap_uds_kferr_ap_uds_kf_uds_kferr_uds_kflag_uds_kuds_flag_cleaneduds_flag_gaiavipers_idm_vipers_umerr_vipers_um_vipers_gmerr_vipers_gm_vipers_rmerr_vipers_rm_vipers_imerr_vipers_im_vipers_ymerr_vipers_ym_vipers_zmerr_vipers_zm_vipers_ksmerr_vipers_ksf_vipers_uferr_vipers_um_ap_vipers_umerr_ap_vipers_uf_ap_vipers_uferr_ap_vipers_uflag_vipers_uf_vipers_gferr_vipers_gm_ap_vipers_gmerr_ap_vipers_gf_ap_vipers_gferr_ap_vipers_gflag_vipers_gf_vipers_rferr_vipers_rm_ap_vipers_rmerr_ap_vipers_rf_ap_vipers_rferr_ap_vipers_rflag_vipers_rf_vipers_iferr_vipers_im_ap_vipers_imerr_ap_vipers_if_ap_vipers_iferr_ap_vipers_iflag_vipers_if_vipers_yferr_vipers_ym_ap_vipers_ymerr_ap_vipers_yf_ap_vipers_yferr_ap_vipers_yflag_vipers_yf_vipers_zferr_vipers_zm_ap_vipers_zmerr_ap_vipers_zf_ap_vipers_zferr_ap_vipers_zflag_vipers_zf_vipers_ksferr_vipers_ksm_ap_vipers_ksmerr_ap_vipers_ksf_ap_vipers_ksferr_ap_vipers_ksflag_vipers_ksvipers_flag_cleanedvipers_flag_gaiavideo_idvideo_stellaritym_ap_video_zmerr_ap_video_zm_video_zmerr_video_zf_ap_video_zferr_ap_video_zf_video_zferr_video_zm_ap_video_ymerr_ap_video_ym_video_ymerr_video_yf_ap_video_yferr_ap_video_yf_video_yferr_video_ym_ap_video_jmerr_ap_video_jm_video_jmerr_video_jf_ap_video_jferr_ap_video_jf_video_jferr_video_jm_ap_video_hmerr_ap_video_hm_video_hmerr_video_hf_ap_video_hferr_ap_video_hf_video_hferr_video_hm_ap_video_kmerr_ap_video_km_video_kmerr_video_kf_ap_video_kferr_ap_video_kf_video_kferr_video_kflag_video_zflag_video_yflag_video_jflag_video_hflag_video_kvideo_flag_cleanedvideo_flag_gaiavhs_idvhs_stellaritym_vhs_ymerr_vhs_ym_ap_vhs_ymerr_ap_vhs_ym_vhs_jmerr_vhs_jm_ap_vhs_jmerr_ap_vhs_jm_vhs_hmerr_vhs_hm_ap_vhs_hmerr_ap_vhs_hm_vhs_kmerr_vhs_km_ap_vhs_kmerr_ap_vhs_kf_vhs_yferr_vhs_yflag_vhs_yf_ap_vhs_yferr_ap_vhs_yf_vhs_jferr_vhs_jflag_vhs_jf_ap_vhs_jferr_ap_vhs_jf_vhs_hferr_vhs_hflag_vhs_hf_ap_vhs_hferr_ap_vhs_hf_vhs_kferr_vhs_kflag_vhs_kf_ap_vhs_kferr_ap_vhs_kvhs_flag_cleanedvhs_flag_gaiaviking_idviking_stellaritym_viking_zmerr_viking_zm_ap_viking_zmerr_ap_viking_zm_viking_ymerr_viking_ym_ap_viking_ymerr_ap_viking_ym_viking_jmerr_viking_jm_ap_viking_jmerr_ap_viking_jm_viking_hmerr_viking_hm_ap_viking_hmerr_ap_viking_hm_viking_kmerr_viking_km_ap_viking_kmerr_ap_viking_kf_viking_zferr_viking_zflag_viking_zf_ap_viking_zferr_ap_viking_zf_viking_yferr_viking_yflag_viking_yf_ap_viking_yferr_ap_viking_yf_viking_jferr_viking_jflag_viking_jf_ap_viking_jferr_ap_viking_jf_viking_hferr_viking_hflag_viking_hf_ap_viking_hferr_ap_viking_hf_viking_kferr_viking_kflag_viking_kf_ap_viking_kferr_ap_viking_kviking_flag_cleanedviking_flag_gaiaservs_intidf_ap_servs_irac_i1ferr_ap_servs_irac_i1f_servs_irac_i1ferr_servs_irac_i1servs_stellarity_irac_i1f_ap_servs_irac_i2ferr_ap_servs_irac_i2f_servs_irac_i2ferr_servs_irac_i2servs_stellarity_irac_i2m_ap_servs_irac_i1merr_ap_servs_irac_i1m_servs_irac_i1merr_servs_irac_i1flag_servs_irac_i1m_ap_servs_irac_i2merr_ap_servs_irac_i2m_servs_irac_i2merr_servs_irac_i2flag_servs_irac_i2servs_flag_cleanedservs_flag_gaiaswire_intidf_ap_swire_irac_i1ferr_ap_swire_irac_i1f_swire_irac_i1ferr_swire_irac_i1swire_stellarity_irac_i1f_ap_swire_irac_i2ferr_ap_swire_irac_i2f_swire_irac_i2ferr_swire_irac_i2swire_stellarity_irac_i2f_ap_irac_i3ferr_ap_irac_i3f_irac_i3ferr_irac_i3swire_stellarity_irac_i3f_ap_irac_i4ferr_ap_irac_i4f_irac_i4ferr_irac_i4swire_stellarity_irac_i4m_ap_swire_irac_i1merr_ap_swire_irac_i1m_swire_irac_i1merr_swire_irac_i1flag_swire_irac_i1m_ap_swire_irac_i2merr_ap_swire_irac_i2m_swire_irac_i2merr_swire_irac_i2flag_swire_irac_i2m_ap_irac_i3merr_ap_irac_i3m_irac_i3merr_irac_i3flag_irac_i3m_ap_irac_i4merr_ap_irac_i4m_irac_i4merr_irac_i4flag_irac_i4swire_flag_cleanedswire_flag_gaia
degdeguJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJymagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmagmaguJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJyuJy
010304035434939254435.4349721923-4.1315341552514.4321002960.0002979999990214.77680015560.000628000008874nan7.9999999798e-0613.87199974060.0009519999730417.05990028380.000732999993488nannan12.50189971920.050000000745112.80589962010.00069399998756111.84879970559.40000027185e-0511.84920024870.0004769999941356125.758644921.681325594734459.436023162.57937964106Falsenannan10261.24610358.99731073817False544.5526633530.367637274084nannanFalse36244.33303431669.1132438827393.034973517.5095624955False66142.42564835.7264261461566118.029286329.0478473901FalseTrue2False-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0nannannannannannannannanFalseFalsenannannannannannannannanFalsenannannannannannannannanFalse-1nanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannan0.0nannan0.0nannan0.0nannannannannannannanFalse0-1nannannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalseFalse0-1nannannannanFalse-1nannannannan-1nannannannan-1nannannannan-1nannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenanFalse0-1-1nannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalseFalseFalseFalseFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0
110278034905085838534.9051226823-4.34320021525nan1.4000000192e-05nannannan1.29999998535e-05nannan15.28479957580.000345999986166nannan12.8769998550.000140999996802nannan18.64570045470.00200499990024nannannannannannanFalsenannannannanFalse2793.059385450.890085920033nannanFalse25656.65639583.33192211322nannanFalse126.3920675280.233404837817nannanFalseFalse1False-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0nannannannannannannannanFalseFalsenannannannannannannannanFalsenannannannannannannannanFalse-1nanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannan0.0nannan0.0nannan0.0nannannannannannannanFalse0-1nannannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalseFalse0-1nannannannanFalse-1nannannannan-1nannannannan-1nannannannan-1nannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenanFalse0-1-1nannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalseFalseFalseFalseFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0
210314035076189966935.0762068823-4.04235938525nannannannannan5.60000007681e-05nannan16.18689918520.000523999973666nannannannannannan19.77540016170.00337400007993nannannannannannanFalsenannannannanFalse1216.859188830.587282785734nannanFalsenannannannanFalse44.65189916260.138758853839nannanFalseFalse2False-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0nannannannannannannannanFalseFalsenannannannannannannannanFalsenannannannannannannannanFalse-1nanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannan0.0nannan0.0nannan0.0nannannannannannannanFalse0-1nannannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalseFalse0-1nannannannanFalse-1nannannannan-1nannannannan-1nannannannan-1nannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenanFalse0-1-1nannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalseFalseFalseFalseFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0
310290034901845990134.9018332223-4.2420935152512.33399963380.050000000745112.27550029750.00044599999091612.08199977878.49999996717e-0512.09780025480.00030200000037412.30500030528.80000006873e-0512.28499984740.00020100000256212.17850017550.00010199999815112.18260002140.00036700000055111.99540042889.40000027185e-0512.04780006410.00029500000528142305.82284711948.2551697244647.781175618.3404678885False53358.0670584.1772906370252587.181910514.627244525False43451.01020413.5217476501844258.84345638.19354425977False48820.24221844.5864406051648636.239842616.4399970921False57788.28799655.0031482831355065.549113614.9615875459FalseFalse3False-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0nannannannannannannannanFalseFalsenannannannannannannannanFalsenannannannannannannannanFalse-1nanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannan0.0nannan0.0nannan0.0nannannannannannannanFalse0-1nannannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalseFalse0-1nannannannanFalse-1nannannannan-1nannannannan-1nannannannan-1nannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenanFalse0-1-1nannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalseFalseFalseFalseFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0
410316034884877269334.8848419323-4.0314587252517.22139930730.00104899995495nannan12.52449989320.00010499999916613.21700000760.00103899999522nannannannan12.21739959720.00010399999882812.22229957580.00032900000223912.05449962629.60000033956e-0512.10089969640.00032699998701469.288894650.453410346996nannanFalse35497.68593893.4329305568518758.581606217.95110646FalsenannannannanFalse47102.08817694.5117930982946889.993191414.2086151289False54726.81195034.8389048002952437.275817615.7929600542FalseTrue3False-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0nannannannannannannannanFalseFalsenannannannannannannannanFalsenannannannannannannannanFalse-1nanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannan0.0nannan0.0nannan0.0nannannannannannannanFalse0-1nannannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalseFalse0-1nannannannanFalse-1nannannannan-1nannannannan-1nannannannan-1nannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenanFalse0-1-1nannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalseFalseFalseFalseFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0
510314035075926955935.0759661923-4.04239428525nan4.60000010207e-05nannan12.55560016630.00010599999950512.59969997410.00028899998869713.08759975430.050000000745113.36250019070.00055599998449917.57320022580.0012229999993nannan12.20699977870.00010299999848912.21360015870.000357000011718nannannannanFalse34495.30057063.3677626548633122.26369488.816445276False21132.9486744973.20826627416405.89484998.40137525328False339.406308060.382315623907nannanFalse47555.42732244.5114171572347267.20653715.5418905749FalseTrue3False-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0nannannannannannannannanFalseFalsenannannannannannannannanFalsenannannannannannannannanFalse-1nanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannan0.0nannan0.0nannan0.0nannannannannannannanFalse0-1nannannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalseFalse0-1nannannannanFalse-1nannannannan-1nannannannan-1nannannannan-1nannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenanFalse0-1-1nannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalseFalseFalseFalseFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0
610309035556019659335.5558866523-4.0864324352513.17510032650.00016700000560413.10840034480.00031100001069712.67930030820.00010800000018212.70370006560.00021800000104116.58550071720.000589000002947nannan12.45730018620.00012599999912.49829959870.00031999999191612.30270004270.0001160000028912.36349964140.0003239999932719496.64434342.9988313002120731.93612265.93848885913False30780.79813273.0618175845830096.77584596.042993811False842.9459203750.457288932071nannanFalse37764.1683954.3825426094736364.712679210.717803931False43543.16396884.6521495038141171.82739712.2862917724FalseTrue3False-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0nannannannannannannannanFalseFalsenannannannannannannannanFalsenannannannannannannannanFalse-1nanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannan0.0nannan0.0nannan0.0nannannannannannannanFalse0-1nannannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalseFalse0-1nannannannanFalse-1nannannannan-1nannannannan-1nannannannan-1nannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenanFalse0-1-1nannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalseFalseFalseFalseFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0
710321035471379327435.4714062823-3.9892983552513.33699989320.00018000000272913.37080001830.00034599998616612.74320030210.00011100000119812.77320003510.00035700001171817.38870048520.000852999975905nannan12.73289966580.050000000745113.10809993740.00060400000074912.2061996460.00011100000119812.26000022890.0003239999932716795.77479222.7845064898616280.95937685.18837973206False29021.50157722.9670068067328230.59203229.2824773109False402.272001110.316041784137nannanFalse29298.14564891349.2294885820737.673141311.5364621148False47590.48618744.8654028489245289.748442913.5151412713FalseTrue3False-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0nannannannannannannannanFalseFalsenannannannannannannannanFalsenannannannannannannannanFalse-1nanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannan0.0nannan0.0nannan0.0nannannannannannannanFalse0-1nannannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalseFalse0-1nannannannanFalse-1nannannannan-1nannannannan-1nannannannan-1nannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenanFalse0-1-1nannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalseFalseFalseFalseFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0
810254035345970719835.3460365923-4.5443168052513.06949996950.00016399999731213.09280014040.00042799999937412.63679981230.00011800000356712.58300018310.00052300002425918.23810005190.001304000034nannannannannannan12.21090030670.00011700000322912.07260036470.00034100000630121488.1987483.2457833877821031.96952678.29085638373False32009.58731893.4788665987933635.657902316.2023241205False183.9754946380.220959796875nannanFalsenannannannanFalse47384.89005845.1062424422653822.002753916.9040170143FalseTrue3False-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0nannannannannannannannanFalseFalsenannannannannannannannanFalsenannannannannannannannanFalse-1nanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannan0.0nannan0.0nannan0.0nannannannannannannanFalse0-1nannannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalseFalse0-1nannannannanFalse-1nannannannan-1nannannannan-1nannannannan-1nannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenanFalse0-1-1nannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalseFalseFalseFalseFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0
910278034904876816434.9048964923-4.3436287752513.31369972230.00017299999308313.33940029140.00035399998887412.87010002140.0001230000052612.89439964290.00027700001373916.61310005190.000637000019196nannan12.65890026090.00012700000661412.71269989010.00044599999091612.55160045620.00012099999730712.66079998020.00033800001256217160.11172442.7342730182616758.68289625.46410217583False25820.22315832.9251005634425248.76515226.44162759185False821.7883481280.482142155009nannanFalse31364.61028263.6687601425529848.330437912.2611321662False34622.61109713.8585209106531309.77941629.74703228059FalseFalse3False-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0nannannannannannannannanFalseFalsenannannannannannannannanFalsenannannannannannannannanFalse-1nanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannanFalsenannannannannannannannannannannannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannan0.0nannan0.0nannan0.0nannannannannannannanFalse0-1nannannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalsenannannannannannannannanFalseFalse0-1nannannannanFalse-1nannannannan-1nannannannan-1nannannannan-1nannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenanFalse0-1-1nannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalsenannannannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannannanFalseFalseFalseFalseFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0-1nannannannannannannannannannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0

III - Merging flags and stellarity¶

Each pristine catalogue contains a flag indicating if the source was associated to a another nearby source that was removed during the cleaning process. We merge these flags in a single one.

In [40]:
flag_cleaned_columns = [column for column in master_catalogue.colnames
                        if 'flag_cleaned' in column]

flag_column = np.zeros(len(master_catalogue), dtype=bool)
for column in flag_cleaned_columns:
    flag_column |= master_catalogue[column]
    
master_catalogue.add_column(Column(data=flag_column, name="flag_cleaned"))
master_catalogue.remove_columns(flag_cleaned_columns)

combining the flag_merged column which contains information regarding multiple associations

In [41]:
master_catalogue['flag_merged'].name = 'flag_merged_tmp'
flag_merged_columns = [column for column in master_catalogue.colnames
                        if 'flag_merged' in column]

flag_merged_column = np.zeros(len(master_catalogue), dtype=bool)
for column in flag_merged_columns:
    flag_merged_column |= master_catalogue[column]
    
master_catalogue.add_column(Column(data=flag_merged_column, name="flag_merged"))
master_catalogue.remove_columns(flag_merged_columns)

Each pristine catalogue contains a flag indicating the probability of a source being a Gaia object (0: not a Gaia object, 1: possibly, 2: probably, 3: definitely). We merge these flags taking the highest value.

In [42]:
flag_gaia_columns = [column for column in master_catalogue.colnames
                     if 'flag_gaia' in column]

master_catalogue.add_column(Column(
    data=np.max([master_catalogue[column] for column in flag_gaia_columns], axis=0),
    name="flag_gaia"
))
master_catalogue.remove_columns(flag_gaia_columns)

Each prisitine catalogue may contain one or several stellarity columns indicating the probability (0 to 1) of each source being a star. We merge these columns taking the highest value. We keep trace of the origin of the stellarity.

In [43]:
stellarity_columns = [column for column in master_catalogue.colnames
                      if 'stellarity' in column]

print(", ".join(stellarity_columns))
candels_stellarity, wirds_stellarity, cfhtls-wide_stellarity, cfhtls-deep_stellarity, hsc-wide_stellarity, hsc-deep_stellarity, hsc-udeep_stellarity, decals_stellarity, sparcs_stellarity, sxds_stellarity, dxs_stellarity, uds_stellarity, video_stellarity, vhs_stellarity, viking_stellarity, servs_stellarity_irac_i1, servs_stellarity_irac_i2, swire_stellarity_irac_i1, swire_stellarity_irac_i2, swire_stellarity_irac_i3, swire_stellarity_irac_i4
In [44]:
# We create an masked array with all the stellarities and get the maximum value, as well as its
# origin.  Some sources may not have an associated stellarity.
stellarity_array = np.array([master_catalogue[column] for column in stellarity_columns])
stellarity_array = np.ma.masked_array(stellarity_array, np.isnan(stellarity_array))

max_stellarity = np.max(stellarity_array, axis=0)
max_stellarity.fill_value = np.nan

no_stellarity_mask = max_stellarity.mask

master_catalogue.add_column(Column(data=max_stellarity.filled(), name="stellarity"))

stellarity_origin = np.full(len(master_catalogue), "NO_INFORMATION", dtype="S20")
stellarity_origin[~no_stellarity_mask] = np.array(stellarity_columns)[np.argmax(stellarity_array, axis=0)[~no_stellarity_mask]]

master_catalogue.add_column(Column(data=stellarity_origin, name="stellarity_origin"))

master_catalogue.remove_columns(stellarity_columns)

IV - Adding E(B-V) column¶

In [45]:
master_catalogue.add_column(
    ebv(master_catalogue['ra'], master_catalogue['dec'])
)

V - Adding HELP unique identifiers and field columns¶

In [46]:
master_catalogue.add_column(Column(gen_help_id(master_catalogue['ra'], master_catalogue['dec']),
                                   name="help_id"))
master_catalogue.add_column(Column(np.full(len(master_catalogue), "ELAIS-N1", dtype='<U18'),
                                   name="field"))
In [47]:
# Check that the HELP Ids are unique
if len(master_catalogue) != len(np.unique(master_catalogue['help_id'])):
    print("The HELP IDs are not unique!!!")
else:
    print("OK!")
OK!

VI - Cross-matching with spec-z catalogue¶

In [48]:
specz =  Table.read("../../dmu23/dmu23_XMM-LSS/data/XMM-LSS-specz-v2.8.fits")
In [49]:
specz['objid'].name = 'specz_id'
In [50]:
nb_merge_dist_plot(
    SkyCoord(master_catalogue['ra'], master_catalogue['dec']),
    SkyCoord(specz['ra'] * u.deg, specz['dec'] * u.deg)
)
In [51]:
master_catalogue = specz_merge(master_catalogue, specz, radius=1. * u.arcsec)

VII - Choosing between multiple values for the same filter¶

VII.a SERVS and SWIRE IRAC fluxes¶

Both SERVS and SWIRE provide IRAC1 and IRAC2 fluxes. SERVS is deeper but tends to under-estimate flux of bright sources (Mattia said over 2000 µJy) as illustrated by this comparison of SWIRE, SERVS, and Spitzer-EIP fluxes.

In [52]:
seip = Table.read("../../dmu0/dmu0_SEIP/data/SEIP_XMM-LSS.fits")
seip_coords = SkyCoord(seip['ra'], seip['dec'])
idx, d2d, _ = seip_coords.match_to_catalog_sky(SkyCoord(master_catalogue['ra'], master_catalogue['dec']))
mask = d2d <= 2 * u.arcsec
In [53]:
fig, ax = plt.subplots()
ax.scatter(seip['i1_f_ap1'][mask], master_catalogue[idx[mask]]['f_ap_servs_irac_i1'], label="SERVS", s=2.)
ax.scatter(seip['i1_f_ap1'][mask], master_catalogue[idx[mask]]['f_ap_swire_irac_i1'], label="SWIRE", s=2.)
ax.set_xscale('log')
ax.set_yscale('log')
ax.set_xlabel("SEIP flux [μJy]")
ax.set_ylabel("SERVS/SWIRE flux [μJy]")
ax.set_title("IRAC 1")
ax.legend()
ax.axvline(2000, color="black", linestyle="--", linewidth=1.)
ax.plot(seip['i1_f_ap1'][mask], seip['i1_f_ap1'][mask], linewidth=.1, color="black", alpha=.5);
In [54]:
fig, ax = plt.subplots()
ax.scatter(seip['i2_f_ap1'][mask], master_catalogue[idx[mask]]['f_ap_servs_irac_i2'], label="SERVS", s=2.)
ax.scatter(seip['i2_f_ap1'][mask], master_catalogue[idx[mask]]['f_ap_swire_irac_i2'], label="SWIRE", s=2.)
ax.set_xscale('log')
ax.set_yscale('log')
ax.set_xlabel("SEIP flux [μJy]")
ax.set_ylabel("SERVS/SWIRE flux [μJy]")
ax.set_title("IRAC 2")
ax.legend()
ax.axvline(2000, color="black", linestyle="--", linewidth=1.)

ax.plot(seip['i1_f_ap2'][mask], seip['i1_f_ap2'][mask], linewidth=.1, color="black", alpha=.5);

When both SWIRE and SERVS fluxes are provided, we use the SERVS flux below 2000 μJy and the SWIRE flux over.

We create a table indicating for each source the origin on the IRAC1 and IRAC2 fluxes that will be saved separately.

In [55]:
irac_origin = Table()
irac_origin.add_column(master_catalogue['help_id'])
In [56]:
# IRAC1 aperture flux and magnitudes
has_servs = ~np.isnan(master_catalogue['f_ap_servs_irac_i1'])
has_swire = ~np.isnan(master_catalogue['f_ap_swire_irac_i1'])
has_both = has_servs & has_swire

print("{} sources with SERVS flux".format(np.sum(has_servs)))
print("{} sources with SWIRE flux".format(np.sum(has_swire)))
print("{} sources with SERVS and SWIRE flux".format(np.sum(has_both)))

has_servs_above_limit = has_servs.copy()
has_servs_above_limit[has_servs] = master_catalogue['f_ap_servs_irac_i1'][has_servs] > 2000

use_swire = (has_swire & ~has_servs) | (has_both & has_servs_above_limit)
use_servs = (has_servs & ~(has_both & has_servs_above_limit))

print("{} sources for which we use SERVS".format(np.sum(use_servs)))
print("{} sources for which we use SWIRE".format(np.sum(use_swire)))

f_ap_irac_i = np.full(len(master_catalogue), np.nan)
f_ap_irac_i[use_servs] = master_catalogue['f_ap_servs_irac_i1'][use_servs]
f_ap_irac_i[use_swire] = master_catalogue['f_ap_swire_irac_i1'][use_swire]

ferr_ap_irac_i = np.full(len(master_catalogue), np.nan)
ferr_ap_irac_i[use_servs] = master_catalogue['ferr_ap_servs_irac_i1'][use_servs]
ferr_ap_irac_i[use_swire] = master_catalogue['ferr_ap_swire_irac_i1'][use_swire]

m_ap_irac_i = np.full(len(master_catalogue), np.nan)
m_ap_irac_i[use_servs] = master_catalogue['m_ap_servs_irac_i1'][use_servs]
m_ap_irac_i[use_swire] = master_catalogue['m_ap_swire_irac_i1'][use_swire]

merr_ap_irac_i = np.full(len(master_catalogue), np.nan)
merr_ap_irac_i[use_servs] = master_catalogue['merr_ap_servs_irac_i1'][use_servs]
merr_ap_irac_i[use_swire] = master_catalogue['merr_ap_swire_irac_i1'][use_swire]

master_catalogue.add_column(Column(data=f_ap_irac_i, name="f_ap_irac_i1"))
master_catalogue.add_column(Column(data=ferr_ap_irac_i, name="ferr_ap_irac_i1"))
master_catalogue.add_column(Column(data=m_ap_irac_i, name="m_ap_irac_i1"))
master_catalogue.add_column(Column(data=merr_ap_irac_i, name="merr_ap_irac_i1"))

master_catalogue.remove_columns(['f_ap_servs_irac_i1', 'f_ap_swire_irac_i1', 'ferr_ap_servs_irac_i1',
                                     'ferr_ap_swire_irac_i1', 'm_ap_servs_irac_i1', 'm_ap_swire_irac_i1',
                                     'merr_ap_servs_irac_i1', 'merr_ap_swire_irac_i1'])

origin = np.full(len(master_catalogue), '     ', dtype='<U5')
origin[use_servs] = "SERVS"
origin[use_swire] = "SWIRE"
irac_origin.add_column(Column(data=origin, name="IRAC1_app"))
1776 sources with SERVS flux
735 sources with SWIRE flux
655 sources with SERVS and SWIRE flux
1775 sources for which we use SERVS
81 sources for which we use SWIRE
In [57]:
# IRAC1 total flux and magnitudes
has_servs = ~np.isnan(master_catalogue['f_servs_irac_i1'])
has_swire = ~np.isnan(master_catalogue['f_swire_irac_i1'])
has_both = has_servs & has_swire

print("{} sources with SERVS flux".format(np.sum(has_servs)))
print("{} sources with SWIRE flux".format(np.sum(has_swire)))
print("{} sources with SERVS and SWIRE flux".format(np.sum(has_both)))

has_servs_above_limit = has_servs.copy()
has_servs_above_limit[has_servs] = master_catalogue['f_servs_irac_i1'][has_servs] > 2000

use_swire = (has_swire & ~has_servs) | (has_both & has_servs_above_limit)
use_servs = (has_servs & ~(has_both & has_servs_above_limit))

print("{} sources for which we use SERVS".format(np.sum(use_servs)))
print("{} sources for which we use SWIRE".format(np.sum(use_swire)))

f_ap_irac_i = np.full(len(master_catalogue), np.nan)
f_ap_irac_i[use_servs] = master_catalogue['f_servs_irac_i1'][use_servs]
f_ap_irac_i[use_swire] = master_catalogue['f_swire_irac_i1'][use_swire]

ferr_ap_irac_i = np.full(len(master_catalogue), np.nan)
ferr_ap_irac_i[use_servs] = master_catalogue['ferr_servs_irac_i1'][use_servs]
ferr_ap_irac_i[use_swire] = master_catalogue['ferr_swire_irac_i1'][use_swire]

flag_irac_i = np.full(len(master_catalogue), False, dtype=bool)
flag_irac_i[use_servs] = master_catalogue['flag_servs_irac_i1'][use_servs]
flag_irac_i[use_swire] = master_catalogue['flag_swire_irac_i1'][use_swire]

m_ap_irac_i = np.full(len(master_catalogue), np.nan)
m_ap_irac_i[use_servs] = master_catalogue['m_servs_irac_i1'][use_servs]
m_ap_irac_i[use_swire] = master_catalogue['m_swire_irac_i1'][use_swire]

merr_ap_irac_i = np.full(len(master_catalogue), np.nan)
merr_ap_irac_i[use_servs] = master_catalogue['merr_servs_irac_i1'][use_servs]
merr_ap_irac_i[use_swire] = master_catalogue['merr_swire_irac_i1'][use_swire]

master_catalogue.add_column(Column(data=f_ap_irac_i, name="f_irac_i1"))
master_catalogue.add_column(Column(data=ferr_ap_irac_i, name="ferr_irac_i1"))
master_catalogue.add_column(Column(data=m_ap_irac_i, name="m_irac_i1"))
master_catalogue.add_column(Column(data=merr_ap_irac_i, name="merr_irac_i1"))
master_catalogue.add_column(Column(data=flag_irac_i, name="flag_irac_i1"))

master_catalogue.remove_columns(['f_servs_irac_i1', 'f_swire_irac_i1', 'ferr_servs_irac_i1',
                                 'ferr_swire_irac_i1', 'm_servs_irac_i1', 'flag_servs_irac_i1', 'm_swire_irac_i1',
                                 'merr_servs_irac_i1', 'merr_swire_irac_i1', 'flag_swire_irac_i1'])

origin = np.full(len(master_catalogue), '     ', dtype='<U5')
origin[use_servs] = "SERVS"
origin[use_swire] = "SWIRE"
irac_origin.add_column(Column(data=origin, name="IRAC1_total"))
1776 sources with SERVS flux
735 sources with SWIRE flux
655 sources with SERVS and SWIRE flux
1775 sources for which we use SERVS
81 sources for which we use SWIRE
In [58]:
# IRAC2 aperture flux and magnitudes
has_servs = ~np.isnan(master_catalogue['f_ap_servs_irac_i2'])
has_swire = ~np.isnan(master_catalogue['f_ap_swire_irac_i2'])
has_both = has_servs & has_swire

print("{} sources with SERVS flux".format(np.sum(has_servs)))
print("{} sources with SWIRE flux".format(np.sum(has_swire)))
print("{} sources with SERVS and SWIRE flux".format(np.sum(has_both)))

has_servs_above_limit = has_servs.copy()
has_servs_above_limit[has_servs] = master_catalogue['f_ap_servs_irac_i2'][has_servs] > 2000

use_swire = (has_swire & ~has_servs) | (has_both & has_servs_above_limit)
use_servs = (has_servs & ~(has_both & has_servs_above_limit))

print("{} sources for which we use SERVS".format(np.sum(use_servs)))
print("{} sources for which we use SWIRE".format(np.sum(use_swire)))

f_ap_irac_i = np.full(len(master_catalogue), np.nan)
f_ap_irac_i[use_servs] = master_catalogue['f_ap_servs_irac_i2'][use_servs]
f_ap_irac_i[use_swire] = master_catalogue['f_ap_swire_irac_i2'][use_swire]

ferr_ap_irac_i = np.full(len(master_catalogue), np.nan)
ferr_ap_irac_i[use_servs] = master_catalogue['ferr_ap_servs_irac_i2'][use_servs]
ferr_ap_irac_i[use_swire] = master_catalogue['ferr_ap_swire_irac_i2'][use_swire]

m_ap_irac_i = np.full(len(master_catalogue), np.nan)
m_ap_irac_i[use_servs] = master_catalogue['m_ap_servs_irac_i2'][use_servs]
m_ap_irac_i[use_swire] = master_catalogue['m_ap_swire_irac_i2'][use_swire]

merr_ap_irac_i = np.full(len(master_catalogue), np.nan)
merr_ap_irac_i[use_servs] = master_catalogue['merr_ap_servs_irac_i2'][use_servs]
merr_ap_irac_i[use_swire] = master_catalogue['merr_ap_swire_irac_i2'][use_swire]

master_catalogue.add_column(Column(data=f_ap_irac_i, name="f_ap_irac_i2"))
master_catalogue.add_column(Column(data=ferr_ap_irac_i, name="ferr_ap_irac_i2"))
master_catalogue.add_column(Column(data=m_ap_irac_i, name="m_ap_irac_i2"))
master_catalogue.add_column(Column(data=merr_ap_irac_i, name="merr_ap_irac_i2"))

master_catalogue.remove_columns(['f_ap_servs_irac_i2', 'f_ap_swire_irac_i2', 'ferr_ap_servs_irac_i2',
                                 'ferr_ap_swire_irac_i2', 'm_ap_servs_irac_i2', 'm_ap_swire_irac_i2',
                                 'merr_ap_servs_irac_i2', 'merr_ap_swire_irac_i2'])

origin = np.full(len(master_catalogue), '     ', dtype='<U5')
origin[use_servs] = "SERVS"
origin[use_swire] = "SWIRE"
irac_origin.add_column(Column(data=origin, name="IRAC2_app"))
1856 sources with SERVS flux
507 sources with SWIRE flux
481 sources with SERVS and SWIRE flux
1855 sources for which we use SERVS
27 sources for which we use SWIRE
In [59]:
# IRAC2 total flux and magnitudes
has_servs = ~np.isnan(master_catalogue['f_servs_irac_i2'])
has_swire = ~np.isnan(master_catalogue['f_swire_irac_i2'])
has_both = has_servs & has_swire

print("{} sources with SERVS flux".format(np.sum(has_servs)))
print("{} sources with SWIRE flux".format(np.sum(has_swire)))
print("{} sources with SERVS and SWIRE flux".format(np.sum(has_both)))

has_servs_above_limit = has_servs.copy()
has_servs_above_limit[has_servs] = master_catalogue['f_servs_irac_i2'][has_servs] > 2000

use_swire = (has_swire & ~has_servs) | (has_both & has_servs_above_limit)
use_servs = (has_servs & ~(has_both & has_servs_above_limit))

print("{} sources for which we use SERVS".format(np.sum(use_servs)))
print("{} sources for which we use SWIRE".format(np.sum(use_swire)))

f_ap_irac_i = np.full(len(master_catalogue), np.nan)
f_ap_irac_i[use_servs] = master_catalogue['f_servs_irac_i2'][use_servs]
f_ap_irac_i[use_swire] = master_catalogue['f_swire_irac_i2'][use_swire]

ferr_ap_irac_i = np.full(len(master_catalogue), np.nan)
ferr_ap_irac_i[use_servs] = master_catalogue['ferr_servs_irac_i2'][use_servs]
ferr_ap_irac_i[use_swire] = master_catalogue['ferr_swire_irac_i2'][use_swire]

flag_irac_i = np.full(len(master_catalogue), False, dtype=bool)
flag_irac_i[use_servs] = master_catalogue['flag_servs_irac_i2'][use_servs]
flag_irac_i[use_swire] = master_catalogue['flag_swire_irac_i2'][use_swire]

m_ap_irac_i = np.full(len(master_catalogue), np.nan)
m_ap_irac_i[use_servs] = master_catalogue['m_servs_irac_i2'][use_servs]
m_ap_irac_i[use_swire] = master_catalogue['m_swire_irac_i2'][use_swire]

merr_ap_irac_i = np.full(len(master_catalogue), np.nan)
merr_ap_irac_i[use_servs] = master_catalogue['merr_servs_irac_i2'][use_servs]
merr_ap_irac_i[use_swire] = master_catalogue['merr_swire_irac_i2'][use_swire]

master_catalogue.add_column(Column(data=f_ap_irac_i, name="f_irac_i2"))
master_catalogue.add_column(Column(data=ferr_ap_irac_i, name="ferr_irac_i2"))
master_catalogue.add_column(Column(data=m_ap_irac_i, name="m_irac_i2"))
master_catalogue.add_column(Column(data=merr_ap_irac_i, name="merr_irac_i2"))
master_catalogue.add_column(Column(data=flag_irac_i, name="flag_irac_i2"))

master_catalogue.remove_columns(['f_servs_irac_i2', 'f_swire_irac_i2', 'ferr_servs_irac_i2',
                                 'ferr_swire_irac_i2', 'm_servs_irac_i2', 'flag_servs_irac_i2', 'm_swire_irac_i2',
                                 'merr_servs_irac_i2', 'merr_swire_irac_i2', 'flag_swire_irac_i2'])

origin = np.full(len(master_catalogue), '     ', dtype='<U5')
origin[use_servs] = "SERVS"
origin[use_swire] = "SWIRE"
irac_origin.add_column(Column(data=origin, name="IRAC2_total"))
1856 sources with SERVS flux
507 sources with SWIRE flux
481 sources with SERVS and SWIRE flux
1855 sources for which we use SERVS
27 sources for which we use SWIRE
In [60]:
irac_origin.write("{}/xmm-lss_irac_i_fluxes_origins{}.fits".format(OUT_DIR, SUFFIX))

 VII.b CFHTLS-DEEP, CFHTLS-WIDE and SpARCS: CFHT Megacam fluxes¶

According to Mattia CFHTLenS is built on the same data as CFHTLS-WIDE and should not be included. I have therefore excluded it from the merge above.

CFHTLS-DEEP is prefferred to CFHTLS-WIDE which is prefferred to SpARCS

CFHTLS-WIDE u, g, r, i, z
CFHTLS-DEEP u, g, r, i, z, y
SpARCS u, g, r, z, y
In [61]:
megacam_origin = Table()
megacam_origin.add_column(master_catalogue['help_id'])
In [62]:
megacam_stats = Table()
megacam_stats.add_column(Column(data=['u','g','r','i','z','y'], name="Band"))
for col in ["CFHTLS-DEEP", "CFHTLS-WIDE", "SpARCS"]:
    megacam_stats.add_column(Column(data=np.full(6, 0), name="{}".format(col)))
    megacam_stats.add_column(Column(data=np.full(6, 0), name="use {}".format(col)))
    megacam_stats.add_column(Column(data=np.full(6, 0), name="{} ap".format(col)))
    megacam_stats.add_column(Column(data=np.full(6, 0), name="use {} ap".format(col)))
    
In [63]:
megacam_bands = ['u','g','r','i','z','y'] # Lowercase naming convention (k is Ks)
for band in megacam_bands:

    # Megacam total flux 
    has_cfhtls_deep = ~np.isnan(master_catalogue['f_cfhtls-deep_' + band])
    if band == 'y':
        has_cfhtls_wide = np.full(len(master_catalogue), False)
    else:
        has_cfhtls_wide = ~np.isnan(master_catalogue['f_cfhtls-wide_' + band])
    if band == 'i':
        has_sparcs = np.full(len(master_catalogue), False)
    else:
        has_sparcs = ~np.isnan(master_catalogue['f_sparcs_' + band])
    

    use_cfhtls_deep = has_cfhtls_deep 
    use_cfhtls_wide = has_cfhtls_wide & ~has_cfhtls_deep
    use_sparcs = has_sparcs & ~has_cfhtls_wide & ~has_cfhtls_deep

    f_megacam = np.full(len(master_catalogue), np.nan)
    f_megacam[use_cfhtls_deep] = master_catalogue['f_cfhtls-deep_' + band][use_cfhtls_deep]
    if not (band == 'y'):
        f_megacam[use_cfhtls_wide] = master_catalogue['f_cfhtls-wide_' + band][use_cfhtls_wide]
    if not (band == 'i'):
        f_megacam[use_sparcs] = master_catalogue['f_sparcs_' + band][use_sparcs]

    ferr_megacam = np.full(len(master_catalogue), np.nan)
    ferr_megacam[use_cfhtls_deep] = master_catalogue['ferr_cfhtls-deep_' + band][use_cfhtls_deep]
    if not (band == 'y'):
        ferr_megacam[use_cfhtls_wide] = master_catalogue['ferr_cfhtls-wide_' + band][use_cfhtls_wide]
    if not (band == 'i'):
        ferr_megacam[use_sparcs] = master_catalogue['ferr_sparcs_' + band][use_sparcs]
    
    m_megacam = np.full(len(master_catalogue), np.nan)
    m_megacam[use_cfhtls_deep] = master_catalogue['m_cfhtls-deep_' + band][use_cfhtls_deep]
    if not (band == 'y'):
        m_megacam[use_cfhtls_wide] = master_catalogue['m_cfhtls-wide_' + band][use_cfhtls_wide]
    if not (band == 'i'):
        m_megacam[use_sparcs] = master_catalogue['m_sparcs_' + band][use_sparcs]

    merr_megacam = np.full(len(master_catalogue), np.nan)
    merr_megacam[use_cfhtls_deep] = master_catalogue['merr_cfhtls-deep_' + band][use_cfhtls_deep]
    if not (band == 'y'):
        merr_megacam[use_cfhtls_wide] = master_catalogue['merr_cfhtls-wide_' + band][use_cfhtls_wide]
    if not (band == 'i'):
        merr_megacam[use_sparcs] = master_catalogue['merr_sparcs_' + band][use_sparcs]

    flag_megacam = np.full(len(master_catalogue), False, dtype=bool)
    flag_megacam[use_cfhtls_deep] = master_catalogue['flag_cfhtls-deep_' + band][use_cfhtls_deep]
    if not (band == 'y'):
        flag_megacam[use_cfhtls_wide] = master_catalogue['flag_cfhtls-wide_' + band][use_cfhtls_wide]
    if not (band == 'i'):
        flag_megacam[use_sparcs] = master_catalogue['flag_sparcs_' + band][use_sparcs]

    master_catalogue.add_column(Column(data=f_megacam, name="f_megacam_" + band))
    master_catalogue.add_column(Column(data=ferr_megacam, name="ferr_megacam_" + band))
    master_catalogue.add_column(Column(data=m_megacam, name="m_megacam_" + band))
    master_catalogue.add_column(Column(data=merr_megacam, name="merr_megacam_" + band))
    master_catalogue.add_column(Column(data=flag_megacam, name="flag_megacam_" + band))

    old_cfhtls_deep_columns = ['f_cfhtls-deep_' + band,
                               'ferr_cfhtls-deep_' + band,
                               'm_cfhtls-deep_' + band, 
                               'merr_cfhtls-deep_' + band,
                               'flag_cfhtls-deep_' + band]
    old_cfhtls_wide_columns = ['f_cfhtls-wide_' + band,
                               'ferr_cfhtls-wide_' + band,
                               'm_cfhtls-wide_' + band, 
                               'merr_cfhtls-wide_' + band,
                               'flag_cfhtls-wide_' + band]
    old_sparcs_columns =      ['f_sparcs_' + band,
                               'ferr_sparcs_' + band,
                               'm_sparcs_' + band, 
                               'merr_sparcs_' + band,
                               'flag_sparcs_' + band]
    
    if (band == 'i'):
        old_columns = old_cfhtls_deep_columns + old_cfhtls_wide_columns
    elif (band == 'y'):
        old_columns = old_cfhtls_deep_columns + old_sparcs_columns
    else:
        old_columns = old_cfhtls_deep_columns + old_cfhtls_wide_columns + old_sparcs_columns
    master_catalogue.remove_columns(old_columns)

    origin = np.full(len(master_catalogue), '     ', dtype='<U5')
    origin[use_cfhtls_deep] = "CFHTLS-DEEP"
    origin[use_cfhtls_wide] = "CFHTLS-WIDE"
    origin[use_sparcs] = "SpARCS"
    
    megacam_origin.add_column(Column(data=origin, name= 'f_megacam_' + band ))
    
    # Megacam aperture flux 
    has_ap_cfhtls_deep = ~np.isnan(master_catalogue['f_ap_cfhtls-deep_' + band])
    if band == 'y':
        has_ap_cfhtls_wide = np.full(len(master_catalogue), False)
    else:
        has_ap_cfhtls_wide = ~np.isnan(master_catalogue['f_ap_cfhtls-wide_' + band])
    if band == 'i':
        has_ap_sparcs = np.full(len(master_catalogue), False)
    else:
        has_ap_sparcs = ~np.isnan(master_catalogue['f_ap_sparcs_' + band])
    

    use_ap_cfhtls_deep = has_ap_cfhtls_deep 
    use_ap_cfhtls_wide = has_ap_cfhtls_wide & ~has_ap_cfhtls_deep
    use_ap_sparcs = has_ap_sparcs & ~has_ap_cfhtls_wide & ~has_ap_cfhtls_deep

    f_ap_megacam = np.full(len(master_catalogue), np.nan)
    f_ap_megacam[use_ap_cfhtls_deep] = master_catalogue['f_ap_cfhtls-deep_' + band][use_ap_cfhtls_deep]
    if not (band == 'y'):
        f_ap_megacam[use_ap_cfhtls_wide] = master_catalogue['f_ap_cfhtls-wide_' + band][use_ap_cfhtls_wide]
    if not (band == 'i'):
        f_ap_megacam[use_ap_sparcs] = master_catalogue['f_ap_sparcs_' + band][use_ap_sparcs]

    ferr_ap_megacam = np.full(len(master_catalogue), np.nan)
    ferr_ap_megacam[use_ap_cfhtls_deep] = master_catalogue['ferr_ap_cfhtls-deep_' + band][use_ap_cfhtls_deep]
    if not (band == 'y'):
        ferr_ap_megacam[use_ap_cfhtls_wide] = master_catalogue['ferr_ap_cfhtls-wide_' + band][use_ap_cfhtls_wide]
    if not (band == 'i'):
        ferr_ap_megacam[use_ap_sparcs] = master_catalogue['ferr_ap_sparcs_' + band][use_ap_sparcs]
    
    m_ap_megacam = np.full(len(master_catalogue), np.nan)
    m_ap_megacam[use_ap_cfhtls_deep] = master_catalogue['m_ap_cfhtls-deep_' + band][use_ap_cfhtls_deep]
    if not (band == 'y'):
        m_ap_megacam[use_ap_cfhtls_wide] = master_catalogue['m_ap_cfhtls-wide_' + band][use_ap_cfhtls_wide]
    if not (band == 'i'):
        m_ap_megacam[use_ap_sparcs] = master_catalogue['m_ap_sparcs_' + band][use_ap_sparcs]

    merr_ap_megacam = np.full(len(master_catalogue), np.nan)
    merr_ap_megacam[use_ap_cfhtls_deep] = master_catalogue['merr_ap_cfhtls-deep_' + band][use_ap_cfhtls_deep]
    if not (band == 'y'):
        merr_ap_megacam[use_ap_cfhtls_wide] = master_catalogue['merr_ap_cfhtls-wide_' + band][use_ap_cfhtls_wide]
    if not (band == 'i'):
        merr_ap_megacam[use_ap_sparcs] = master_catalogue['merr_ap_sparcs_' + band][use_ap_sparcs]



    master_catalogue.add_column(Column(data=f_ap_megacam, name="f_ap_megacam_" + band))
    master_catalogue.add_column(Column(data=ferr_ap_megacam, name="ferr_ap_megacam_" + band))
    master_catalogue.add_column(Column(data=m_ap_megacam, name="m_ap_megacam_" + band))
    master_catalogue.add_column(Column(data=merr_ap_megacam, name="merr_ap_megacam_" + band))


    old_ap_cfhtls_deep_columns = ['f_ap_cfhtls-deep_' + band,
                               'ferr_ap_cfhtls-deep_' + band,
                               'm_ap_cfhtls-deep_' + band, 
                               'merr_ap_cfhtls-deep_' + band]
    old_ap_cfhtls_wide_columns = ['f_ap_cfhtls-wide_' + band,
                               'ferr_ap_cfhtls-wide_' + band,
                               'm_ap_cfhtls-wide_' + band, 
                               'merr_ap_cfhtls-wide_' + band]
    old_ap_sparcs_columns =      ['f_ap_sparcs_' + band,
                               'ferr_ap_sparcs_' + band,
                               'm_ap_sparcs_' + band, 
                               'merr_ap_sparcs_' + band]
    
    if (band == 'i'):
        old_ap_columns = old_ap_cfhtls_deep_columns + old_ap_cfhtls_wide_columns
    elif (band == 'y'):
        old_ap_columns = old_ap_cfhtls_deep_columns + old_ap_sparcs_columns
    else:
        old_ap_columns = old_ap_cfhtls_deep_columns + old_ap_cfhtls_wide_columns + old_ap_sparcs_columns
    master_catalogue.remove_columns(old_ap_columns)

    origin_ap = np.full(len(master_catalogue), '     ', dtype='<U5')
    origin_ap[use_ap_cfhtls_deep] = "CFHTLS-DEEP"
    origin_ap[use_ap_cfhtls_wide] = "CFHTLS-WIDE"
    origin_ap[use_ap_sparcs] = "SpARCS"
    
    megacam_origin.add_column(Column(data=origin_ap, name= 'f_ap_megacam_' + band ))
    

   
    megacam_stats['CFHTLS-DEEP'][megacam_stats['Band'] == band] = np.sum(has_cfhtls_deep)
    megacam_stats['CFHTLS-WIDE'][megacam_stats['Band'] == band] = np.sum(has_cfhtls_wide)
    megacam_stats['SpARCS'][megacam_stats['Band'] == band] = np.sum(has_sparcs)
    megacam_stats['use CFHTLS-DEEP'][megacam_stats['Band'] == band] = np.sum(use_cfhtls_deep)
    megacam_stats['use CFHTLS-WIDE'][megacam_stats['Band'] == band] = np.sum(use_cfhtls_wide)
    megacam_stats['use SpARCS'][megacam_stats['Band'] == band] = np.sum(use_sparcs)
    megacam_stats['CFHTLS-DEEP ap'][megacam_stats['Band'] == band] = np.sum(has_ap_cfhtls_deep)
    megacam_stats['CFHTLS-WIDE ap'][megacam_stats['Band'] == band] = np.sum(has_ap_cfhtls_wide)
    megacam_stats['SpARCS ap'][megacam_stats['Band'] == band] = np.sum(has_ap_sparcs)
    megacam_stats['use CFHTLS-DEEP ap'][megacam_stats['Band'] == band] = np.sum(use_ap_cfhtls_deep)
    megacam_stats['use CFHTLS-WIDE ap'][megacam_stats['Band'] == band] = np.sum(use_ap_cfhtls_wide)
    megacam_stats['use SpARCS ap'][megacam_stats['Band'] == band] = np.sum(use_ap_sparcs)
In [64]:
megacam_stats.show_in_notebook()
Out[64]:
<Table length=6>
idxBandCFHTLS-DEEPuse CFHTLS-DEEPCFHTLS-DEEP apuse CFHTLS-DEEP apCFHTLS-WIDEuse CFHTLS-WIDECFHTLS-WIDE apuse CFHTLS-WIDE apSpARCSuse SpARCSSpARCS apuse SpARCS ap
0u2630263026412641122819112471964290429041524152
1g3051305130373037134719613571974550455044724472
2r3130313031353135135019913552024852485248084808
3i3123312331263126131919613281970000
4z2779277928112811115818112061884423442341444144
5y291329132928292800004559455944044404
In [65]:
megacam_origin.write("{}/xmm-lss_megacam_fluxes_origins{}.fits".format(OUT_DIR, SUFFIX))

VII.c VISTA VIDEO, VHS, and VIKING: VISTA fluxes¶

According to Mattia Vacari VIDEO is deeper than VIKING which is deeper than VHS

In [66]:
vista_origin = Table()
vista_origin.add_column(master_catalogue['help_id'])
In [67]:
vista_stats = Table()
vista_stats.add_column(Column(data=['y','j','h','k','z'], name="Band"))
vista_stats.add_column(Column(data=np.full(5, 0), name="VIDEO"))
vista_stats.add_column(Column(data=np.full(5, 0), name="VIKING"))
vista_stats.add_column(Column(data=np.full(5, 0), name="VHS"))
vista_stats.add_column(Column(data=np.full(5, 0), name="use VIDEO"))
vista_stats.add_column(Column(data=np.full(5, 0), name="use VIKING"))
vista_stats.add_column(Column(data=np.full(5, 0), name="use VHS"))
vista_stats.add_column(Column(data=np.full(5, 0), name="VIDEO ap"))
vista_stats.add_column(Column(data=np.full(5, 0), name="VIKING ap"))
vista_stats.add_column(Column(data=np.full(5, 0), name="VHS ap"))
vista_stats.add_column(Column(data=np.full(5, 0), name="use VIDEO ap"))
vista_stats.add_column(Column(data=np.full(5, 0), name="use VIKING ap"))
vista_stats.add_column(Column(data=np.full(5, 0), name="use VHS ap"))
In [68]:
vista_bands = ['y','j','h','k','z'] # Lowercase naming convention (k is Ks)
for band in vista_bands:
    #print('For VISTA band ' + band + ':')
    # VISTA total flux 
    has_video = ~np.isnan(master_catalogue['f_video_' + band])
    has_viking = ~np.isnan(master_catalogue['f_viking_' + band])
    if band == 'z':
        has_vhs = np.full(len(master_catalogue), False)
    else:
        has_vhs = ~np.isnan(master_catalogue['f_vhs_' + band])
    

    #print("{} sources with VIDEO flux".format(np.sum(has_video)))
    #print("{} sources with VIKING flux".format(np.sum(has_viking)))
    #print("{} sources with VHS flux".format(np.sum(has_vhs)))
    #print("{} sources with VIDEO, VIKING, and VHS flux".format(np.sum(has_video & has_viking & has_vhs)))


    use_video = has_video 
    use_viking = has_viking & ~has_video
    use_vhs = has_vhs & ~has_video & ~has_viking

    #print("{} sources for which we use VIDEO".format(np.sum(use_video)))
    #print("{} sources for which we use VIKING".format(np.sum(use_viking)))
    #print("{} sources for which we use VHS".format(np.sum(use_vhs)))

    f_vista = np.full(len(master_catalogue), np.nan)
    f_vista[use_video] = master_catalogue['f_video_' + band][use_video]
    f_vista[use_viking] = master_catalogue['f_viking_' + band][use_viking]
    if not (band == 'z'):
        f_vista[use_vhs] = master_catalogue['f_vhs_' + band][use_vhs]

    ferr_vista = np.full(len(master_catalogue), np.nan)
    ferr_vista[use_video] = master_catalogue['ferr_video_' + band][use_video]
    ferr_vista[use_viking] = master_catalogue['ferr_viking_' + band][use_viking]
    if not (band == 'z'):
        ferr_vista[use_vhs] = master_catalogue['ferr_vhs_' + band][use_vhs]
    
    m_vista = np.full(len(master_catalogue), np.nan)
    m_vista[use_video] = master_catalogue['m_video_' + band][use_video]
    m_vista[use_viking] = master_catalogue['m_viking_' + band][use_viking]
    if not (band == 'z'):
        m_vista[use_vhs] = master_catalogue['m_vhs_' + band][use_vhs]

    merr_vista = np.full(len(master_catalogue), np.nan)
    merr_vista[use_video] = master_catalogue['merr_video_' + band][use_video]
    merr_vista[use_viking] = master_catalogue['merr_viking_' + band][use_viking]
    if not (band == 'z'):
        merr_vista[use_vhs] = master_catalogue['merr_vhs_' + band][use_vhs]

    flag_vista = np.full(len(master_catalogue), False, dtype=bool)
    flag_vista[use_video] = master_catalogue['flag_video_' + band][use_video]
    flag_vista[use_viking] = master_catalogue['flag_viking_' + band][use_viking]
    if not (band == 'z'):
        flag_vista[use_vhs] = master_catalogue['flag_vhs_' + band][use_vhs]

    master_catalogue.add_column(Column(data=f_vista, name="f_vista_" + band))
    master_catalogue.add_column(Column(data=ferr_vista, name="ferr_vista_" + band))
    master_catalogue.add_column(Column(data=m_vista, name="m_vista_" + band))
    master_catalogue.add_column(Column(data=merr_vista, name="merr_vista_" + band))
    master_catalogue.add_column(Column(data=flag_vista, name="flag_vista_" + band))

    old_video_and_viking_columns = ['f_video_' + band, 
                                     'f_viking_' + band, 
                                     'ferr_video_' + band,
                                     'ferr_viking_' + band, 
                                     'm_video_' + band, 
                                     'm_viking_' + band, 
                                     'merr_video_' + band,
                                     'merr_viking_' + band,
                                     'flag_video_' + band, 
                                     'flag_viking_' + band]
    old_vhs_columns = ['f_vhs_' + band, 
                       'ferr_vhs_' + band, 
                       'm_vhs_' + band, 
                       'merr_vhs_' + band,
                       'flag_vhs_' + band]
    
    if not (band == 'z'):
        old_columns = old_video_and_viking_columns + old_vhs_columns
    else:
        old_columns = old_video_and_viking_columns
    master_catalogue.remove_columns(old_columns)

    origin = np.full(len(master_catalogue), '     ', dtype='<U5')
    origin[use_video] = "VIDEO"
    origin[use_viking] = "VIKING"
    origin[use_vhs] = "VHS"
    
    vista_origin.add_column(Column(data=origin, name= 'f_vista_' + band ))
    
    
    
    # VISTA Aperture flux
    has_ap_video = ~np.isnan(master_catalogue['f_ap_video_' + band])
    has_ap_viking = ~np.isnan(master_catalogue['f_ap_viking_' + band])
    if (band == 'z'):
        has_ap_vhs = np.full(len(master_catalogue), False)
    else:
        has_ap_vhs = ~np.isnan(master_catalogue['f_ap_vhs_' + band])

    #print("{} sources with VIDEO aperture flux".format(np.sum(has_ap_video)))
    #print("{} sources with VIKING aperture flux".format(np.sum(has_ap_viking)))
    #print("{} sources with VHS aperture flux".format(np.sum(has_ap_vhs)))
    #print("{} sources with VIDEO, VIKING and VHS aperture flux".format(np.sum(has_ap_video & has_ap_viking & has_ap_vhs)))

    use_ap_video = has_ap_video 
    use_ap_viking = has_ap_viking & ~has_ap_video
    use_ap_vhs = has_ap_vhs & ~has_ap_video & ~has_ap_viking

    #print("{} sources for which we use VIDEO aperture fluxes".format(np.sum(use_ap_video)))
    #print("{} sources for which we use VIKING aperture fluxes".format(np.sum(use_ap_viking)))
    #print("{} sources for which we use VHS aperture fluxes".format(np.sum(use_ap_vhs)))

    f_ap_vista = np.full(len(master_catalogue), np.nan)
    f_ap_vista[use_ap_video] = master_catalogue['f_ap_video_' + band][use_ap_video]
    f_ap_vista[use_ap_viking] = master_catalogue['f_ap_viking_' + band][use_ap_viking]
    if not (band == 'z'):
        f_ap_vista[use_ap_vhs] = master_catalogue['f_ap_vhs_' + band][use_ap_vhs]

    ferr_ap_vista = np.full(len(master_catalogue), np.nan)
    ferr_ap_vista[use_ap_video] = master_catalogue['ferr_ap_video_' + band][use_ap_video]
    ferr_ap_vista[use_ap_viking] = master_catalogue['ferr_ap_viking_' + band][use_ap_viking]
    if not (band == 'z'):
        ferr_ap_vista[use_ap_vhs] = master_catalogue['ferr_ap_vhs_' + band][use_ap_vhs]
    
    m_ap_vista = np.full(len(master_catalogue), np.nan)
    m_ap_vista[use_ap_video] = master_catalogue['m_ap_video_' + band][use_ap_video]
    m_ap_vista[use_ap_viking] = master_catalogue['m_ap_viking_' + band][use_ap_viking]
    if not (band == 'z'):
        m_ap_vista[use_ap_vhs] = master_catalogue['m_ap_vhs_' + band][use_ap_vhs]

    merr_ap_vista = np.full(len(master_catalogue), np.nan)
    merr_ap_vista[use_ap_video] = master_catalogue['merr_ap_video_' + band][use_ap_video]
    merr_ap_vista[use_ap_viking] = master_catalogue['merr_ap_viking_' + band][use_ap_viking]
    if not (band == 'z'):
        merr_ap_vista[use_ap_vhs] = master_catalogue['merr_ap_vhs_' + band][use_ap_vhs]


    master_catalogue.add_column(Column(data=f_ap_vista, name="f_ap_vista_" + band))
    master_catalogue.add_column(Column(data=ferr_ap_vista, name="ferr_ap_vista_" + band))
    master_catalogue.add_column(Column(data=m_ap_vista, name="m_ap_vista_" + band))
    master_catalogue.add_column(Column(data=merr_vista, name="merr_ap_vista_" + band))


    ap_old_video_and_viking_columns = ['f_ap_video_' + band, 
                                     'f_ap_viking_' + band, 
                                     'ferr_ap_video_' + band,
                                     'ferr_ap_viking_' + band, 
                                     'm_ap_video_' + band, 
                                     'm_ap_viking_' + band, 
                                     'merr_ap_video_' + band,
                                     'merr_ap_viking_' + band]
    ap_old_vhs_columns = ['f_ap_vhs_' + band, 
                       'ferr_ap_vhs_' + band, 
                       'm_ap_vhs_' + band, 
                       'merr_ap_vhs_' + band]
    
    if not (band == 'z'):
        ap_old_columns = ap_old_video_and_viking_columns + ap_old_vhs_columns
    else:
        ap_old_columns = ap_old_video_and_viking_columns
    master_catalogue.remove_columns(ap_old_columns)

    origin_ap = np.full(len(master_catalogue), '     ', dtype='<U5')
    origin_ap[use_ap_video] = "VIDEO"
    origin_ap[use_ap_viking] = "VIKING"
    origin_ap[use_ap_vhs] = "VHS"
    
    vista_origin.add_column(Column(data=origin_ap, name= 'f_ap_vista_' + band ))
    
    vista_stats['VIDEO'][vista_stats['Band'] == band] = np.sum(has_video)
    vista_stats['VIKING'][vista_stats['Band'] == band] = np.sum(has_viking)
    vista_stats['VHS'][vista_stats['Band'] == band] = np.sum(has_vhs)
    vista_stats['use VIDEO'][vista_stats['Band'] == band] = np.sum(use_video)
    vista_stats['use VIKING'][vista_stats['Band'] == band] = np.sum(use_viking)
    vista_stats['use VHS'][vista_stats['Band'] == band] = np.sum(use_vhs)
    vista_stats['VIDEO ap'][vista_stats['Band'] == band] = np.sum(has_ap_video)
    vista_stats['VIKING ap'][vista_stats['Band'] == band] = np.sum(has_ap_viking)
    vista_stats['VHS ap'][vista_stats['Band'] == band] = np.sum(has_ap_vhs)
    vista_stats['use VIDEO ap'][vista_stats['Band'] == band] = np.sum(use_ap_video)
    vista_stats['use VIKING ap'][vista_stats['Band'] == band] = np.sum(use_ap_viking)
    vista_stats['use VHS ap'][vista_stats['Band'] == band] = np.sum(use_ap_vhs)

Vista origin overview¶

For each band show how many objects have fluxes from each survey for both total and aperture photometries.

In [69]:
vista_stats.show_in_notebook()
Out[69]:
<Table length=5>
idxBandVIDEOVIKINGVHSuse VIDEOuse VIKINGuse VHSVIDEO apVIKING apVHS apuse VIDEO apuse VIKING apuse VHS ap
0y633619960633619830631419960631419830
1j634133307240634129046631632133307238632129046629
2h630735216938630730516286625635216936625630516284
3k622838166261622832385649612638166261612632385649
4z109333960109333930109333960109333930
In [70]:
vista_origin.write("{}/xmm-lss_vista_fluxes_origins{}.fits".format(OUT_DIR, SUFFIX))

VII. d UKIDSS DXS and UDS¶

There is no overlap between UDS and DXS so I simply merge the two columns.

In [71]:
#Band H is only in UDS so we can simply rename it
for col in master_catalogue.colnames:
    if 'uds_h' in col:
        master_catalogue[col].name = col.replace('uds_h', 'ukidss_h')
        
has_uds_k =     ~np.isnan(master_catalogue['f_uds_k'])
has_uds_j =     ~np.isnan(master_catalogue['f_uds_j'])
has_ukidss_k =  ~np.isnan(master_catalogue['f_ukidss_k'])
has_ukidss_j =  ~np.isnan(master_catalogue['f_ukidss_j'])

master_catalogue['f_ukidss_k'][has_uds_k] = master_catalogue['f_uds_k'][has_uds_k]
master_catalogue['ferr_ukidss_k'][has_uds_k] = master_catalogue['ferr_uds_k'][has_uds_k]
master_catalogue['m_ukidss_k'][has_uds_k] = master_catalogue['m_uds_k'][has_uds_k]
master_catalogue['merr_ukidss_k'][has_uds_k] = master_catalogue['merr_uds_k'][has_uds_k]
master_catalogue['flag_ukidss_k'][has_uds_k] = master_catalogue['flag_uds_k'][has_uds_k]

master_catalogue['f_ukidss_j'][has_uds_j] = master_catalogue['f_uds_j'][has_uds_j]
master_catalogue['ferr_ukidss_j'][has_uds_j] = master_catalogue['ferr_uds_j'][has_uds_j]
master_catalogue['m_ukidss_j'][has_uds_j] = master_catalogue['m_uds_j'][has_uds_j]
master_catalogue['merr_ukidss_j'][has_uds_j] = master_catalogue['merr_uds_j'][has_uds_j]
master_catalogue['flag_ukidss_j'][has_uds_j] = master_catalogue['flag_uds_j'][has_uds_j]

has_ap_uds_k =  ~np.isnan(master_catalogue['f_ap_uds_k'])
has_ap_uds_j =  ~np.isnan(master_catalogue['f_ap_uds_j'])
has_ap_ukidss_k =  ~np.isnan(master_catalogue['f_ap_ukidss_k'])
has_ap_ukidss_j =  ~np.isnan(master_catalogue['f_ap_ukidss_j'])

master_catalogue['f_ap_ukidss_k'][has_ap_uds_k] = master_catalogue['f_ap_uds_k'][has_ap_uds_k]
master_catalogue['ferr_ap_ukidss_k'][has_ap_uds_k] = master_catalogue['ferr_ap_uds_k'][has_ap_uds_k]
master_catalogue['m_ap_ukidss_k'][has_ap_uds_k] = master_catalogue['m_ap_uds_k'][has_ap_uds_k]
master_catalogue['merr_ap_ukidss_k'][has_ap_uds_k] = master_catalogue['merr_ap_uds_k'][has_ap_uds_k]

master_catalogue['f_ap_ukidss_j'][has_ap_uds_j] = master_catalogue['f_ap_uds_j'][has_ap_uds_j]
master_catalogue['ferr_ap_ukidss_j'][has_ap_uds_j] = master_catalogue['ferr_ap_uds_j'][has_ap_uds_j]
master_catalogue['m_ap_ukidss_j'][has_ap_uds_j] = master_catalogue['m_ap_uds_j'][has_ap_uds_j]
master_catalogue['merr_ap_ukidss_j'][has_ap_uds_j] = master_catalogue['merr_ap_uds_j'][has_ap_uds_j]

master_catalogue.remove_columns(['f_uds_j','ferr_uds_j','m_uds_j','merr_uds_j','flag_uds_j',
                               'f_uds_k','ferr_uds_k','m_uds_k','merr_uds_k','flag_uds_k',
                               'f_ap_uds_j','ferr_ap_uds_j','m_ap_uds_j','merr_ap_uds_j',
                               'f_ap_uds_k','ferr_ap_uds_k','m_ap_uds_k','merr_ap_uds_k'])

ukidss_origin = Table()
ukidss_origin.add_column(master_catalogue['help_id'])

origin = np.full(len(master_catalogue), '     ', dtype='<U5')
origin[has_uds_k] = "UDS"
origin[has_ukidss_k] = "DXS"

ukidss_origin.add_column(Column(data=origin, name= 'f_ukidss_k' ))

origin = np.full(len(master_catalogue), '     ', dtype='<U5')
origin[has_uds_j] = "UDS"
origin[has_ukidss_j] = "DXS"
ukidss_origin.add_column(Column(data=origin, name= 'f_ukidss_j' ))
origin_ap = np.full(len(master_catalogue), '     ', dtype='<U5')
origin_ap[has_ap_uds_k] = "UDS"
origin_ap[has_ap_ukidss_k] = "DXS"
ukidss_origin.add_column(Column(data=origin_ap, name= 'f_ap_ukidss_k' ))
origin_ap = np.full(len(master_catalogue), '     ', dtype='<U5')
origin_ap[has_ap_uds_j] = "UDS"
origin_ap[has_ap_ukidss_j] = "DXS"
ukidss_origin.add_column(Column(data=origin_ap, name= 'f_ap_ukidss_j' ))

ukidss_origin.write("{}/xmm-lss_ukidss_fluxes_origins{}.fits".format(OUT_DIR, SUFFIX))

 VII. e HSC wide, deep and udeep¶

Here we straightforwardly take the deepest

Survey Bands observed
HSC-WIDE grizy
HSC-DEEP grizy
HSC-UDEEP grizy n921 n816
In [72]:
suprime_origin = Table()
suprime_origin.add_column(master_catalogue['help_id'])
In [73]:
suprime_stats = Table()
suprime_stats.add_column(Column(data=['g','r','i','z','y'], name="Band"))
for col in ["HSC-UDEEP",  "HSC-DEEP", "HSC-WIDE"]:
    suprime_stats.add_column(Column(data=np.full(5, 0), name="{}".format(col)))
    suprime_stats.add_column(Column(data=np.full(5, 0), name="use {}".format(col)))
    suprime_stats.add_column(Column(data=np.full(5, 0), name="{} ap".format(col)))
    suprime_stats.add_column(Column(data=np.full(5, 0), name="use {} ap".format(col)))
    
#n921 and n816 only in udeep so we can just rename those columns
for col in master_catalogue.colnames:
    if ('n921' in col) or ('n816' in col):
        master_catalogue[col].name = col.replace('hsc-udeep', 'suprime')
In [74]:
suprime_bands = ['g','r','i','z','y'] # Lowercase naming convention (k is Ks)
for band in suprime_bands:

    # Suprime total flux 
    has_hsc_udeep = ~np.isnan(master_catalogue['f_hsc-udeep_' + band])
    has_hsc_deep  = ~np.isnan(master_catalogue['f_hsc-deep_' + band])
    has_hsc_wide  = ~np.isnan(master_catalogue['f_hsc-wide_' + band])
    

    use_hsc_udeep = has_hsc_udeep
    use_hsc_deep = has_hsc_deep & ~has_hsc_udeep
    use_hsc_wide = has_hsc_wide & ~has_hsc_deep & ~has_hsc_udeep

    f_suprime = np.full(len(master_catalogue), np.nan)
    f_suprime[use_hsc_udeep] = master_catalogue['f_hsc-udeep_' + band][use_hsc_udeep]
    f_suprime[use_hsc_deep] = master_catalogue['f_hsc-deep_' + band][use_hsc_deep]
    f_suprime[use_hsc_wide] = master_catalogue['f_hsc-wide_' + band][use_hsc_wide]

    ferr_suprime = np.full(len(master_catalogue), np.nan)
    ferr_suprime[use_hsc_udeep] = master_catalogue['ferr_hsc-udeep_' + band][use_hsc_udeep]
    ferr_suprime[use_hsc_deep] = master_catalogue['ferr_hsc-deep_' + band][use_hsc_deep]
    ferr_suprime[use_hsc_wide] = master_catalogue['ferr_hsc-wide_' + band][use_hsc_wide]
    
    m_suprime = np.full(len(master_catalogue), np.nan)
    m_suprime[use_hsc_udeep] = master_catalogue['m_hsc-udeep_' + band][use_hsc_udeep]
    m_suprime[use_hsc_deep] = master_catalogue['m_hsc-deep_' + band][use_hsc_deep]
    m_suprime[use_hsc_wide] = master_catalogue['m_hsc-wide_' + band][use_hsc_wide]

    merr_suprime = np.full(len(master_catalogue), np.nan)
    merr_suprime[use_hsc_udeep] = master_catalogue['merr_hsc-udeep_' + band][use_hsc_udeep]
    merr_suprime[use_hsc_deep] = master_catalogue['merr_hsc-deep_' + band][use_hsc_deep]
    merr_suprime[use_hsc_wide] = master_catalogue['merr_hsc-wide_' + band][use_hsc_wide]

    flag_suprime = np.full(len(master_catalogue), False, dtype=bool)
    flag_suprime[use_hsc_udeep] = master_catalogue['flag_hsc-udeep_' + band][use_hsc_udeep]
    flag_suprime[use_hsc_deep] = master_catalogue['flag_hsc-deep_' + band][use_hsc_deep]
    flag_suprime[use_hsc_wide] = master_catalogue['flag_hsc-wide_' + band][use_hsc_wide]

    master_catalogue.add_column(Column(data=f_suprime, name="f_suprime_" + band))
    master_catalogue.add_column(Column(data=ferr_suprime, name="ferr_suprime_" + band))
    master_catalogue.add_column(Column(data=m_suprime, name="m_suprime_" + band))
    master_catalogue.add_column(Column(data=merr_suprime, name="merr_suprime_" + band))
    master_catalogue.add_column(Column(data=flag_suprime, name="flag_suprime_" + band))

    old_hsc_udeep_columns = ['f_hsc-udeep_' + band,
                               'ferr_hsc-udeep_' + band,
                               'm_hsc-udeep_' + band, 
                               'merr_hsc-udeep_' + band,
                               'flag_hsc-udeep_' + band]
    old_hsc_deep_columns = ['f_hsc-deep_' + band,
                               'ferr_hsc-deep_' + band,
                               'm_hsc-deep_' + band, 
                               'merr_hsc-deep_' + band,
                               'flag_hsc-deep_' + band]
    old_hsc_wide_columns =      ['f_hsc-wide_' + band,
                               'ferr_hsc-wide_' + band,
                               'm_hsc-wide_' + band, 
                               'merr_hsc-wide_' + band,
                               'flag_hsc-wide_' + band]
    
    old_columns = old_hsc_udeep_columns + old_hsc_deep_columns + old_hsc_wide_columns
    master_catalogue.remove_columns(old_columns)

    origin = np.full(len(master_catalogue), '     ', dtype='<U5')
    origin[use_hsc_udeep] = "HSC-UDEEP"
    origin[use_hsc_deep] = "HSC-DEEP"
    origin[use_hsc_wide] = "HSC-WIDE"
    
    suprime_origin.add_column(Column(data=origin, name= 'f_suprime_' + band ))
    
  
    # Suprime aperture flux 
    has_ap_hsc_udeep = ~np.isnan(master_catalogue['f_ap_hsc-udeep_' + band])
    has_ap_hsc_deep  = ~np.isnan(master_catalogue['f_ap_hsc-deep_' + band])
    has_ap_hsc_wide  = ~np.isnan(master_catalogue['f_ap_hsc-wide_' + band])
    

    use_ap_hsc_udeep = has_ap_hsc_udeep
    use_ap_hsc_deep = has_ap_hsc_deep & ~has_ap_hsc_udeep
    use_ap_hsc_wide = has_ap_hsc_wide & ~has_ap_hsc_deep & ~has_ap_hsc_udeep

    f_ap_suprime = np.full(len(master_catalogue), np.nan)
    f_ap_suprime[use_ap_hsc_udeep] = master_catalogue['f_ap_hsc-udeep_' + band][use_ap_hsc_udeep]
    f_ap_suprime[use_ap_hsc_deep] = master_catalogue['f_ap_hsc-deep_' + band][use_ap_hsc_deep]
    f_ap_suprime[use_ap_hsc_wide] = master_catalogue['f_ap_hsc-wide_' + band][use_ap_hsc_wide]

    ferr_ap_suprime = np.full(len(master_catalogue), np.nan)
    ferr_ap_suprime[use_ap_hsc_udeep] = master_catalogue['ferr_ap_hsc-udeep_' + band][use_ap_hsc_udeep]
    ferr_ap_suprime[use_ap_hsc_deep] = master_catalogue['ferr_ap_hsc-deep_' + band][use_ap_hsc_deep]
    ferr_ap_suprime[use_ap_hsc_wide] = master_catalogue['ferr_ap_hsc-wide_' + band][use_ap_hsc_wide]
    
    m_ap_suprime = np.full(len(master_catalogue), np.nan)
    m_ap_suprime[use_ap_hsc_udeep] = master_catalogue['m_ap_hsc-udeep_' + band][use_ap_hsc_udeep]
    m_ap_suprime[use_ap_hsc_deep] = master_catalogue['m_ap_hsc-deep_' + band][use_ap_hsc_deep]
    m_ap_suprime[use_ap_hsc_wide] = master_catalogue['m_ap_hsc-wide_' + band][use_ap_hsc_wide]

    merr_ap_suprime = np.full(len(master_catalogue), np.nan)
    merr_ap_suprime[use_ap_hsc_udeep] = master_catalogue['merr_ap_hsc-udeep_' + band][use_ap_hsc_udeep]
    merr_ap_suprime[use_ap_hsc_deep] = master_catalogue['merr_ap_hsc-deep_' + band][use_ap_hsc_deep]
    merr_ap_suprime[use_ap_hsc_wide] = master_catalogue['merr_ap_hsc-wide_' + band][use_ap_hsc_wide]


    master_catalogue.add_column(Column(data=f_ap_suprime, name="f_ap_suprime_" + band))
    master_catalogue.add_column(Column(data=ferr_ap_suprime, name="ferr_ap_suprime_" + band))
    master_catalogue.add_column(Column(data=m_ap_suprime, name="m_ap_suprime_" + band))
    master_catalogue.add_column(Column(data=merr_ap_suprime, name="merr_ap_suprime_" + band))


    old_ap_hsc_udeep_columns = ['f_ap_hsc-udeep_' + band,
                               'ferr_ap_hsc-udeep_' + band,
                               'm_ap_hsc-udeep_' + band, 
                               'merr_ap_hsc-udeep_' + band]
    old_ap_hsc_deep_columns = ['f_ap_hsc-deep_' + band,
                               'ferr_ap_hsc-deep_' + band,
                               'm_ap_hsc-deep_' + band, 
                               'merr_ap_hsc-deep_' + band]
    old_ap_hsc_wide_columns =      ['f_ap_hsc-wide_' + band,
                               'ferr_ap_hsc-wide_' + band,
                               'm_ap_hsc-wide_' + band, 
                               'merr_ap_hsc-wide_' + band]
    
    old_ap_columns = old_ap_hsc_udeep_columns + old_ap_hsc_deep_columns + old_ap_hsc_wide_columns
    master_catalogue.remove_columns(old_ap_columns)

    origin_ap = np.full(len(master_catalogue), '     ', dtype='<U5')
    origin_ap[use_ap_hsc_udeep] = "HSC-UDEEP"
    origin_ap[use_ap_hsc_deep] = "HSC-DEEP"
    origin_ap[use_ap_hsc_wide] = "HSC-WIDE"
    
    suprime_origin.add_column(Column(data=origin_ap, name= 'f_ap_suprime_' + band ))

   
    suprime_stats['HSC-UDEEP'][suprime_stats['Band'] == band] = np.sum(has_hsc_udeep)
    suprime_stats['HSC-DEEP'][suprime_stats['Band'] == band] = np.sum(has_hsc_deep)
    suprime_stats['HSC-WIDE'][suprime_stats['Band'] == band] = np.sum(has_hsc_wide)
    suprime_stats['use HSC-UDEEP'][suprime_stats['Band'] == band] = np.sum(use_hsc_udeep)
    suprime_stats['use HSC-DEEP'][suprime_stats['Band'] == band] = np.sum(use_hsc_deep)
    suprime_stats['use HSC-WIDE'][suprime_stats['Band'] == band] = np.sum(use_hsc_wide)
    suprime_stats['HSC-UDEEP ap'][suprime_stats['Band'] == band] = np.sum(has_ap_hsc_udeep)
    suprime_stats['HSC-DEEP ap'][suprime_stats['Band'] == band] = np.sum(has_ap_hsc_deep)
    suprime_stats['HSC-WIDE ap'][suprime_stats['Band'] == band] = np.sum(has_ap_hsc_wide)
    suprime_stats['use HSC-UDEEP ap'][suprime_stats['Band'] == band] = np.sum(use_ap_hsc_udeep)
    suprime_stats['use HSC-DEEP ap'][suprime_stats['Band'] == band] = np.sum(use_ap_hsc_deep)
    suprime_stats['use HSC-WIDE ap'][suprime_stats['Band'] == band] = np.sum(use_ap_hsc_wide)
In [75]:
suprime_stats.show_in_notebook()
Out[75]:
<Table length=5>
idxBandHSC-UDEEPuse HSC-UDEEPHSC-UDEEP apuse HSC-UDEEP apHSC-DEEPuse HSC-DEEPHSC-DEEP apuse HSC-DEEP apHSC-WIDEuse HSC-WIDEHSC-WIDE apuse HSC-WIDE ap
0g5370537057965796320812967536356335862198188723835113664
1r53605360586258623185729494368103401134304137763851713601
2i53755375588458843150429171360013328834942143583923614437
3z51555155575757572974927556336243107633425141473834515002
4y48344834550755072731825327321502966130515134843553213871
In [76]:
suprime_origin.write("{}/xmm-lss_suprime_fluxes_origins{}.fits".format(OUT_DIR, SUFFIX))

VIII.a Wavelength domain coverage¶

We add a binary flag_optnir_obs indicating that a source was observed in a given wavelength domain:

  • 1 for observation in optical;
  • 2 for observation in near-infrared;
  • 4 for observation in mid-infrared (IRAC).

It's an integer binary flag, so a source observed both in optical and near-infrared by not in mid-infrared would have this flag at 1 + 2 = 3.

Note 1: The observation flag is based on the creation of multi-order coverage maps from the catalogues, this may not be accurate, especially on the edges of the coverage.

Note 2: Being on the observation coverage does not mean having fluxes in that wavelength domain. For sources observed in one domain but having no flux in it, one must take into consideration the different depths in the catalogue we are using.

In [77]:
candels_moc =   MOC(filename="../../dmu0/dmu0_CANDELS-3D-HST/data/CANDELS-3D-HST_XMM-LSS_MOC.fits") # 1.1
cfht_wirds_moc =  MOC(filename="../../dmu0/dmu0_CFHT-WIRDS/data/XMM-LSS_Ks-priors_MOC.fits")        # 1.3
cfhtls_wide_moc = MOC(filename="../../dmu0/dmu0_CFHTLS/data/CFHTLS-WIDE_XMM-LSS_MOC.fits")          # 1.4a
cfhtls_deep_moc = MOC(filename="../../dmu0/dmu0_CFHTLS/data/CFHTLS-DEEP_XMM-LSS_MOC.fits")          # 1.4b
cfhtls_moc = cfhtls_wide_moc + cfhtls_deep_moc
#cfhtlens_moc = MOC(filename="../../dmu0/dmu0_CFHTLenS/data/CFHTLenS_XMM-LSS_MOC.fits")              # 1.5
decals_moc =  MOC(filename="../../dmu0/dmu0_DECaLS/data/DECaLS_XMM-LSS_MOC.fits")                   # 1.6
servs_moc = MOC(filename="../../dmu0/dmu0_DataFusion-Spitzer/data/DF-SERVS_XMM-LSS_MOC.fits")       # 1.8
swire_moc = MOC(filename="../../dmu0/dmu0_DataFusion-Spitzer/data/DF-SWIRE_XMM-LSS_MOC.fits")       # 1.7
hsc_wide_moc = MOC(filename="../../dmu0/dmu0_HSC/data/HSC-PDR1_wide_XMM-LSS_MOC.fits")              # 1.9a
hsc_deep_moc = MOC(filename="../../dmu0/dmu0_HSC/data/HSC-PDR1_deep_XMM-LSS_MOC.fits")              # 1.9b
hsc_udeep_moc = MOC(filename="../../dmu0/dmu0_HSC/data/HSC-PDR1_udeep_XMM-LSS_MOC.fits")            # 1.9c
hsc_moc = hsc_wide_moc + hsc_deep_moc + hsc_udeep_moc
ps1_moc = MOC(filename="../../dmu0/dmu0_PanSTARRS1-3SS/data/PanSTARRS1-3SS_XMM-LSS_MOC.fits")       # 1.10
sxds_moc = MOC(filename="../../dmu0/dmu0_SXDS/data/dmu0_SXDS_MOC.fits")                             # 1.11
sparcs_moc = MOC(filename="../../dmu0/dmu0_SpARCS/data/SpARCS_HELP_XMM-LSS_MOC.fits")               # 1.12
dxs_moc = MOC(filename="../../dmu0/dmu0_UKIDSS-DXS_DR10plus/data/UKIDSS-DR10plus_XMM-LSS_MOC.fits") # 1.13
uds_moc =  MOC(filename="../../dmu0/dmu0_UKIDSS-UDS/data/UKIDSS-UDS_XMM-LSS_MOC.fits")              # 1.14
vipers_moc =  MOC(filename="../../dmu0/dmu0_VIPERS-MLS/data/VIPERS-MLS_20160502_MOC.fits")          # 1.15
vhs_moc =   MOC(filename="../../dmu0/dmu0_VISTA-VHS/data/VHS_XMM-LSS_MOC.fits")                     # 1.16
video_moc =  MOC(filename="../../dmu0/dmu0_VISTA-VIDEO-private/data/VIDEO-all_2016-04-14_fullcat_errfix_XMM-LSS_MOC.fits")         # 1.17
viking_moc = MOC(filename="../../dmu0/dmu0_VISTA-VIKING/data/VIKING_XMM-LSS_MOC.fits")              # 1.18
In [78]:
was_observed_optical = inMoc(
    master_catalogue['ra'], master_catalogue['dec'],
    (candels_moc + 
     cfht_wirds_moc + 
     cfhtls_moc + 
     #cfhtlens_moc + 
     sparcs_moc + 
     decals_moc + 
     hsc_moc + 
     ps1_moc) )

was_observed_nir = inMoc(
    master_catalogue['ra'], master_catalogue['dec'],
    dxs_moc + uds_moc + vhs_moc + video_moc + viking_moc
)

was_observed_mir = inMoc(
    master_catalogue['ra'], master_catalogue['dec'],
    servs_moc + swire_moc
)
In [79]:
master_catalogue.add_column(
    Column(
        1 * was_observed_optical + 2 * was_observed_nir + 4 * was_observed_mir,
        name="flag_optnir_obs")
)

VIII.b Wavelength domain detection¶

We add a binary flag_optnir_det indicating that a source was detected in a given wavelength domain:

  • 1 for detection in optical;
  • 2 for detection in near-infrared;
  • 4 for detection in mid-infrared (IRAC).

It's an integer binary flag, so a source detected both in optical and near-infrared by not in mid-infrared would have this flag at 1 + 2 = 3.

Note 1: We use the total flux columns to know if the source has flux, in some catalogues, we may have aperture flux and no total flux.

To get rid of artefacts (chip edges, star flares, etc.) we consider that a source is detected in one wavelength domain when it has a flux value in at least two bands. That means that good sources will be excluded from this flag when they are on the coverage of only one band.

In [83]:
# SpARCS is a catalogue of sources detected in r (with fluxes measured at 
# this prior position in the other bands).  Thus, we are only using the r
# CFHT band.
# Check to use catalogue flags from HSC and PanSTARRS.
nb_optical_flux = (
    # CANDELS
    1 * ~np.isnan(master_catalogue['f_candels_f140w']) + 
    1 * ~np.isnan(master_catalogue['f_candels_f160w']) +
    1 * ~np.isnan(master_catalogue['f_candels_f606w']) +
    1 * ~np.isnan(master_catalogue['f_candels_f814w']) +
    1 * ~np.isnan(master_catalogue['f_candels_f125w']) +
    # DECaLS
    1 * ~np.isnan(master_catalogue['f_decam_g']) + 
    1 * ~np.isnan(master_catalogue['f_decam_r']) +
    #1 * ~np.isnan(master_catalogue['f_decam_i']) +
    1 * ~np.isnan(master_catalogue['f_decam_z']) +
   # 1 * ~np.isnan(master_catalogue['f_decam_y']) +
    # HSC
    1 * ~np.isnan(master_catalogue['f_suprime_g']) + 
    1 * ~np.isnan(master_catalogue['f_suprime_r']) +
    1 * ~np.isnan(master_catalogue['f_suprime_i']) +
    1 * ~np.isnan(master_catalogue['f_suprime_z']) +
    1 * ~np.isnan(master_catalogue['f_suprime_y']) +
    1 * ~np.isnan(master_catalogue['f_suprime_n921']) +
    1 * ~np.isnan(master_catalogue['f_suprime_n816']) +
    # PanSTARRS
    1 * ~np.isnan(master_catalogue['f_gpc1_g']) +
    1 * ~np.isnan(master_catalogue['f_gpc1_r']) +
    1 * ~np.isnan(master_catalogue['f_gpc1_i']) +
    1 * ~np.isnan(master_catalogue['f_gpc1_z']) +
    1 * ~np.isnan(master_catalogue['f_gpc1_y']) +
    # CFHT
    1 * ~np.isnan(master_catalogue['f_megacam_u']) +
    1 * ~np.isnan(master_catalogue['f_megacam_g']) +
    1 * ~np.isnan(master_catalogue['f_megacam_r']) +
    1 * ~np.isnan(master_catalogue['f_megacam_z']) +
    1 * ~np.isnan(master_catalogue['f_megacam_y']) 
)

nb_nir_flux = (
    # UKIDSS
    1 * ~np.isnan(master_catalogue['f_ukidss_j']) +
    1 * ~np.isnan(master_catalogue['f_ukidss_h']) +
    1 * ~np.isnan(master_catalogue['f_ukidss_k']) +
    # VISTA
    1 * ~np.isnan(master_catalogue['f_vista_z']) +
    1 * ~np.isnan(master_catalogue['f_vista_y']) +
    1 * ~np.isnan(master_catalogue['f_vista_j']) +
    1 * ~np.isnan(master_catalogue['f_vista_h']) +
    1 * ~np.isnan(master_catalogue['f_vista_k'])
)

nb_mir_flux = (
    1 * ~np.isnan(master_catalogue['f_irac_i1']) +
    1 * ~np.isnan(master_catalogue['f_irac_i2']) +
    1 * ~np.isnan(master_catalogue['f_irac_i3']) +
    1 * ~np.isnan(master_catalogue['f_irac_i4'])
)
In [84]:
has_optical_flux = nb_optical_flux >= 2
has_nir_flux = nb_nir_flux >= 2
has_mir_flux = nb_mir_flux >= 2

master_catalogue.add_column(
    Column(
        1 * has_optical_flux + 2 * has_nir_flux + 4 * has_mir_flux,
        name="flag_optnir_det")
)

IX - Cross-identification table¶

We are producing a table associating to each HELP identifier, the identifiers of the sources in the pristine catalogues. This can be used to easily get additional information from them.

For convenience, we also cross-match the master list with the SDSS catalogue and add the objID associated with each source, if any. TODO: should we correct the astrometry with respect to Gaia positions?

In [85]:
#
# Addind SDSS ids
#
sdss = Table.read("../../dmu0/dmu0_SDSS-DR13/data/SDSS-DR13_XMM-LSS.fits")['objID', 'ra', 'dec']
sdss_coords = SkyCoord(sdss['ra'] * u.deg, sdss['dec'] * u.deg)
idx_ml, d2d, _ = sdss_coords.match_to_catalog_sky(SkyCoord(master_catalogue['ra'], master_catalogue['dec']))
idx_sdss = np.arange(len(sdss))

# Limit the cross-match to 1 arcsec
mask = d2d <= 1. * u.arcsec
idx_ml = idx_ml[mask]
idx_sdss = idx_sdss[mask]
d2d = d2d[mask]
nb_orig_matches = len(idx_ml)

# In case of multiple associations of one master list object to an SDSS object, we keep only the
# association to the nearest one.
sort_idx = np.argsort(d2d)
idx_ml = idx_ml[sort_idx]
idx_sdss = idx_sdss[sort_idx]
_, unique_idx = np.unique(idx_ml, return_index=True)
idx_ml = idx_ml[unique_idx]
idx_sdss = idx_sdss[unique_idx]
print("{} master list rows had multiple associations.".format(nb_orig_matches - len(idx_ml)))

# Adding the ObjID to the master list
master_catalogue.add_column(Column(data=np.full(len(master_catalogue), -1, dtype='>i8'), name="sdss_id"))
master_catalogue['sdss_id'][idx_ml] = sdss['objID'][idx_sdss]
7 master list rows had multiple associations.
In [86]:
id_names = []
for col in master_catalogue.colnames:
    if '_id' in col:
        id_names += [col]
    if '_intid' in col:
        id_names += [col]
        
print(id_names)
['ps1_id', 'candels_id', 'wirds_intid', 'cfhtls-wide_id', 'cfhtls-deep_id', 'hsc-wide_id', 'hsc-deep_id', 'hsc-udeep_id', 'decals_id', 'sparcs_intid', 'sxds_b_id', 'sxds_v_id', 'sxds_r_id', 'sxds_i_id', 'sxds_z_id', 'sxds_intid', 'dxs_id', 'uds_id', 'vipers_id', 'video_id', 'vhs_id', 'viking_id', 'servs_intid', 'swire_intid', 'help_id', 'specz_id', 'sdss_id']
In [87]:
master_catalogue[id_names].write(
    "{}/master_list_cross_ident_xmm-lss{}.fits".format(OUT_DIR, SUFFIX))
id_names.remove('help_id')
master_catalogue.remove_columns(id_names)

X - Adding HEALPix index¶

We are adding a column with a HEALPix index at order 13 associated with each source.

In [88]:
master_catalogue.add_column(Column(
    data=coords_to_hpidx(master_catalogue['ra'], master_catalogue['dec'], order=13),
    name="hp_idx"
))

XI - Saving the catalogue¶

In [89]:
columns = ["help_id", "field", "ra", "dec", "hp_idx"]

bands = [column[5:] for column in master_catalogue.colnames if 'f_ap' in column]
for band in bands:
    columns += ["f_ap_{}".format(band), "ferr_ap_{}".format(band),
                "m_ap_{}".format(band), "merr_ap_{}".format(band),
                "f_{}".format(band), "ferr_{}".format(band),
                "m_{}".format(band), "merr_{}".format(band),
                "flag_{}".format(band)]    
    
columns += ["stellarity", "stellarity_origin", "flag_cleaned", "flag_merged", "flag_gaia", "flag_optnir_obs", "flag_optnir_det", 
            "zspec", "zspec_qual", "zspec_association_flag", "ebv"]
In [90]:
# We check for columns in the master catalogue that we will not save to disk.
print("Missing columns: {}".format(set(master_catalogue.colnames) - set(columns)))
Missing columns: set()
In [91]:
#master_catalogue[columns].write("{}/master_catalogue_xmm-lss{}.fits".format(OUT_DIR, SUFFIX))

Saving the master catalogue to a file uses to much memory because the masterlist has a lot of sources and a lot of columns. To deal with this problem, we save the catalogue into separated catalogues of 1 million sources that will be merged afterwards.

In [92]:
# Beware in the number or sources is a round million, the last source may be lost.
#top_million_nb = int(np.ceil(len(master_catalogue)/1.e6))
#for part_nb, m_boundaries in enumerate(zip(np.arange(top_million_nb), 1 + np.arange(top_million_nb))):
#    low_idx = m_boundaries[0] * 1000000
#    high_idx = m_boundaries[1] * 1000000
#    master_catalogue[columns][low_idx:high_idx].write(
#        "{}/master_catalogue_xmm-lss{}_part{}.csv".format(OUT_DIR, SUFFIX,part_nb), format="ascii.csv")
In [ ]:
with open("{}/master_catalogue_xmm-lss{}.csv".format(OUT_DIR, SUFFIX), "w") as out:
    out.write(",".join(master_catalogue.colnames))
    out.write("\n")
    for row in master_catalogue:
        out.write(",".join([str(_) for _ in row]))
        out.write("\n")