{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# HATLAS-NGP master catalogue\n", "\n", "This notebook presents the merge of the various pristine catalogues to produce HELP mater catalogue on GAMA-12." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "This notebook was run with herschelhelp_internal version: \n", "017bb1e (Mon Jun 18 14:58:59 2018 +0100)\n", "This notebook was executed on: \n", "2019-02-04 18:06:03.294306\n" ] } ], "source": [ "from herschelhelp_internal import git_version\n", "print(\"This notebook was run with herschelhelp_internal version: \\n{}\".format(git_version()))\n", "import datetime\n", "print(\"This notebook was executed on: \\n{}\".format(datetime.datetime.now()))" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": true }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/opt/pyenv/versions/3.7.2/lib/python3.7/site-packages/matplotlib/__init__.py:855: MatplotlibDeprecationWarning: \n", "examples.directory is deprecated; in the future, examples will be found relative to the 'datapath' directory.\n", " \"found relative to the 'datapath' directory.\".format(key))\n", "/opt/pyenv/versions/3.7.2/lib/python3.7/site-packages/matplotlib/__init__.py:846: MatplotlibDeprecationWarning: \n", "The text.latex.unicode rcparam was deprecated in Matplotlib 2.2 and will be removed in 3.1.\n", " \"2.2\", name=key, obj_type=\"rcparam\", addendum=addendum)\n", "/opt/pyenv/versions/3.7.2/lib/python3.7/site-packages/seaborn/apionly.py:9: 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.\n", " warnings.warn(msg, UserWarning)\n" ] } ], "source": [ "%matplotlib inline\n", "#%config InlineBackend.figure_format = 'svg'\n", "\n", "import matplotlib.pyplot as plt\n", "plt.rc('figure', figsize=(10, 6))\n", "\n", "import os\n", "import time\n", "\n", "from astropy import units as u\n", "from astropy.coordinates import SkyCoord\n", "from astropy.table import Column, Table\n", "import numpy as np\n", "from pymoc import MOC\n", "\n", "from herschelhelp_internal.masterlist import merge_catalogues, nb_merge_dist_plot, specz_merge\n", "from herschelhelp_internal.utils import coords_to_hpidx, ebv, gen_help_id, inMoc" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": true }, "outputs": [], "source": [ "TMP_DIR = os.environ.get('TMP_DIR', \"./data_tmp\")\n", "OUT_DIR = os.environ.get('OUT_DIR', \"./data\")\n", "SUFFIX = os.environ.get('SUFFIX', time.strftime(\"_%Y%m%d\"))\n", "\n", "try:\n", " os.makedirs(OUT_DIR)\n", "except FileExistsError:\n", " pass" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## I - Reading the prepared pristine catalogues" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": true }, "outputs": [], "source": [ "decals = Table.read(\"{}/DECaLS.fits\".format(TMP_DIR))\n", "ps1 = Table.read(\"{}/PS1.fits\".format(TMP_DIR))\n", "las = Table.read(\"{}/UKIDSS-LAS.fits\".format(TMP_DIR))\n", "legacy = Table.read(\"{}/LegacySurvey.fits\".format(TMP_DIR))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## II - Merging tables\n", "\n", "We first merge the optical catalogues and then add the infrared ones: DECaLS, HSC, KIDS, PanSTARRS, UKIDSS-LAS, and VISTA-VIKING.\n", "\n", "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." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### DECaLS" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": true }, "outputs": [], "source": [ "master_catalogue = decals\n", "master_catalogue['decals_ra'].name = 'ra'\n", "master_catalogue['decals_dec'].name = 'dec'" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Add PanSTARRS" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEKCAYAAADpfBXhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U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ngejNbB5SBP6h571533wMQ18kHiQJ/r7vfB+Dx1MFm9u+AC8zs6vizvUQ/LJ6Ypo0fMrO3xsur488ciNtya7z+7FMc89fAf41vZHGbu//OzF4LXATcF3/XLqI53i8B7nH3J+J9BHtzFkmWwl2axsyeTxSG+4h6rgC4+2fN7EfAG4FfmdkBqVESAAABoElEQVTrJ/n4R4FngQuJeuijNe+N1SyXmfrfuQH/yd1/MoN2Xwb8W+BSdx8xs58DnfHbo+5enurz7n6zmW0iukPRnXEpyIBvuPsnJhzrj+ptl0gt1dylKcxsAPgKcL27+4T3XuDuD7r73xLNlngOcBRYXLNZL1GvuEI0c+R0Jy8fBc4ws5fFx1hsZhmiWUM/EM8bj5n9gZn1TLOvXuBgHOznEPWu6z5m/EPtcXf/EvAD4ALgZ8DVZnZavG2/ma0FfgP8GzM7s7p+mraJAOq5y/zqisskWaKbX38LmGye9o+Y2WuIbs22A/hxvFyOT1R+nagmfauZvQf4F2B4qgO7e8HM3gF8OZ47PU/U+/4qUdlma3zidT/wlmm+x78Af25mDxMF+G9meMy3A9eaWRH4PfA37j5kZp8EfhoPDy0C17n7b+ITtrfF6/cRjTQSmZKm/BWZhkX3b73D3RfULfDi8tDH3f3KZrdFFh6VZUSmVwZ6F9pFTES/vRxsdltkYVLPXUQkQOq5i4gESOEuIhIghbuISIAU7iIiAVK4i4gE6P8DdYJl6Nw1WpoAAAAASUVORK5CYII=\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "nb_merge_dist_plot(\n", " SkyCoord(master_catalogue['ra'], master_catalogue['dec']),\n", " SkyCoord(ps1['ps1_ra'], ps1['ps1_dec'])\n", ")" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Given the graph above, we use 0.8 arc-second radius\n", "master_catalogue = merge_catalogues(master_catalogue, ps1, \"ps1_ra\", \"ps1_dec\", radius=0.8*u.arcsec)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Add UKIDSS LAS" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEKCAYAAADpfBXhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3XmUXGd55/HvU1tXb2ptrcWS5baDvLLYIG9DCMZstkNsMuMEQ1iSA9GEgWAYMjMhk0DgzJmBk4TJgEmIY3vYbCADHsYYG/AEcWxDLNw23mWPZeNFtmy1pVZLvdX6zB/3VqvUaqmqu291Vd36fQ51+tatW/e+JTe/fuq9732vuTsiIhIviWY3QEREoqdwFxGJIYW7iEgMKdxFRGJI4S4iEkMKdxGRGFK4i4jEkMJdRCSGFO4iIjGUataBV69e7UNDQ806vIhIW7rnnntecvfBWts1LdyHhoYYHh5u1uFFRNqSmT1dz3bqlhERiaGa4W5mWTP7hZndb2YPm9mn59imy8y+bWY7zWy7mQ01orEiIlKfeir3HHChu78KOBO4yMzOm7XN+4FRd38Z8N+Bz0XbTBERmY+a4e6B8fBpOnzMnif4MuCr4fJ3gDeamUXWShERmZe6+tzNLGlm9wF7gNvcffusTTYAzwK4exEYA1ZF2VAREalfXeHu7iV3PxPYCJxjZi9fyMHMbKuZDZvZ8MjIyEJ2ISIidZjXaBl33w9sAy6a9dJzwPEAZpYCBoC9c7z/anff4u5bBgdrDtMUEZEFqme0zKCZLQ+Xu4E3A4/O2uwm4H3h8uXAT1z37xMRaZp6LmJaD3zVzJIEfwz+yd1vNrPPAMPufhNwLfB1M9sJ7AOuaFiLRUSkpprh7u4PAGfNsf6TVcvTwO9E27SlccP2Z45Y965zNzWhJSIi0dEVqiIiMaRwFxGJIYW7iEgMKdxFRGJI4S4iEkMKdxGRGFK4i4jEkMJdRCSGFO4i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h8schvNnMveE+/jnC/wwSZ+6uhx5L8gDG51i3H1gLXADcHK77PvDacLmP4EbuM6+H63uAbLi8GRgOly8AxggmiEsQTM3w60AGeBI4O9xuWbjfrcCfh+u6gGHgxFltHAIemrVuZfizG3gIWBU+d+B3w+WjHfOLwO9VbdMNnBZ+7nS4/u+A9wKDBFNWn1h93KrPevNc/9Z66JGa598CkaXwM+DzZnY9cKO77wqL72pp4CozOxMoASdXvfYLd98FEPaTDxEE/m53vxvAw6mDzewtwCvN7PLwvQMEfyx+VaONHzGz3w6Xjw/fszdsy3fD9acc5Zj/Avzn8EYWN7r742b2RuA1wN3hZ+0mmOP9POAAP6R4AAABxElEQVR2d/9VuI9Y3phFoqdwl6Yxs5MIwnAPQeUKgLt/1sx+AFwC/MzM3jrH2z8GvAi8iqBCn656LVe1XOLYv+cG/LG7/2ge7b4AeBNwvrtPmtlPgWz48rS7l471fne/wcy2E9yh6JawK8iAr7r7J2Yd67fqbZdINfW5S1OY2SDwZeAqd/dZr/2auz/o7p8jmC3xVOAg0F+12QBBVVwmmDmy1snLx4D1ZnZ2eIx+M0sRzBb6wXDeeMzsZDPrrbGvAWA0DPZTCarruo8Z/lF70t2/APwf4JXAPwOXm9macNuVZnYCcBfwG2Z2YmV9jbaJAKrcZWl1h90kaYKbX38dmGue9o+a2RsIbs32MHBruFwKT1R+haBP+rtm9l7gh8DEsQ7s7nkzewfwxXDu9CmC6vsagm6be8MTryPA22t8jh8Cf2RmOwgC/K55HvN3gfeYWQF4Afiv7r7PzP4c+HE4PLQAfMjd7wpP2N4Yrt9DMNJI5Jg05a9IDRbcv/Vmd2+pW+CF3UN/4u5va3ZbpPWoW0akthIw0GoXMRF8exltdlukNalyFxGJIVXuIiIxpHAXEYkhhbuISAwp3EVEYkjhLiISQ/8foM4jSr+wMssAAAAASUVORK5CYII=\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "nb_merge_dist_plot(\n", " SkyCoord(master_catalogue['ra'], master_catalogue['dec']),\n", " SkyCoord(las['las_ra'], las['las_dec'])\n", ")" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Given the graph above, we use 0.8 arc-second radius\n", "master_catalogue = merge_catalogues(master_catalogue, las, \"las_ra\", \"las_dec\", radius=0.8*u.arcsec)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Add Legacy Survey" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEKCAYAAADpfBXhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzt3XmUXGd95vHvr5beN0ndstva2jY2jneDMGYZMGbIGMPYyUDAhkDghBEhMAYCZyZkckhgTjLJmRkyIWZCPMBhGUzgYMIoYJJ4ggkOwTJtW5YXYWNko9XqtqTeu7q23/xxb7VK7Za6uvtWV9Wt53NOuW/deuvet2Tpqbff+77vNXdHRETiJVHrCoiISPQU7iIiMaRwFxGJIYW7iEgMKdxFRGJI4S4iEkMKdxGRGFK4i4jEkMJdRCSGUrU6cX9/vw8NDdXq9CIiDemBBx54zt0HlipXs3AfGhpieHi4VqcXEWlIZvaLSsqpW0ZEJIYU7iIiMaRwFxGJIYW7iEgMKdxFRGJI4S4iEkMKdxGRGFoy3M2szczuN7OHzewxM/vEImXeZWajZrY7fLynOtUVEZFKVDKJaQ64zt2nzCwN/LOZfc/d71tQ7uvu/oHoqygiIsu1ZLh7cAftqfBpOnw09F2179i1/3n73vbSrTWoiYhIdVTU525mSTPbDYwAd7v7rkWKvcnM9pjZN81sy2mOs8PMhs1seHR0dBXVFhGRM6ko3N294O5XApuBq83s0gVF/hYYcvfLgbuBL53mOLe7+3Z33z4ws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RGFLLXUQkhhTuIiIxpHAXEYkhhbuISAwp3EVEYuj/A3UUrkyXGBfoAAAAAElFTkSuQmCC\n", "text/plain": [ "
" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "nb_merge_dist_plot(\n", " SkyCoord(master_catalogue['ra'], master_catalogue['dec']),\n", " SkyCoord(legacy['legacy_ra'], legacy['legacy_dec'])\n", ")" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# Given the graph above, we use 0.8 arc-second radius\n", "master_catalogue = merge_catalogues(master_catalogue, legacy, \"legacy_ra\", \"legacy_dec\", radius=0.8*u.arcsec)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Cleaning\n", "\n", "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." ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "collapsed": true }, "outputs": [], "source": [ "for col in master_catalogue.colnames:\n", " if \"m_\" in col or \"merr_\" in col or \"f_\" in col or \"ferr_\" in col or \"stellarity\" in col:\n", " master_catalogue[col].fill_value = np.nan\n", " elif \"flag\" in col:\n", " master_catalogue[col].fill_value = 0\n", " elif \"id\" in col:\n", " master_catalogue[col].fill_value = -1\n", " \n", "master_catalogue = master_catalogue.filled()" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/html": [ "Table length=10\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
idxdecals_idradecf_decam_zferr_decam_zf_ap_decam_zferr_ap_decam_zm_decam_zmerr_decam_zflag_decam_zm_ap_decam_zmerr_ap_decam_zdecals_stellaritydecals_flag_cleaneddecals_flag_gaiaflag_mergedps1_idm_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_gaialas_idm_ukidss_ymerr_ukidss_ym_ap_ukidss_ymerr_ap_ukidss_ym_ukidss_jmerr_ukidss_jm_ap_ukidss_jmerr_ap_ukidss_jm_ap_ukidss_hmerr_ap_ukidss_hm_ukidss_hmerr_ukidss_hm_ap_ukidss_kmerr_ap_ukidss_km_ukidss_kmerr_ukidss_klas_stellarityf_ukidss_yferr_ukidss_yflag_ukidss_yf_ap_ukidss_yferr_ap_ukidss_yf_ukidss_jferr_ukidss_jflag_ukidss_jf_ap_ukidss_jferr_ap_ukidss_jf_ap_ukidss_hferr_ap_ukidss_hf_ukidss_hferr_ukidss_hflag_ukidss_hf_ap_ukidss_kferr_ap_ukidss_kf_ukidss_kferr_ukidss_kflag_ukidss_klas_flag_cleanedlas_flag_gaialegacy_idf_90prime_gferr_90prime_gf_ap_90prime_gferr_ap_90prime_gf_90prime_rferr_90prime_rf_ap_90prime_rferr_ap_90prime_rf_mosaic_zferr_mosaic_zf_ap_mosaic_zferr_ap_mosaic_zlegacy_stellaritym_90prime_gmerr_90prime_gflag_90prime_gm_ap_90prime_gmerr_ap_90prime_gm_90prime_rmerr_90prime_rflag_90prime_rm_ap_90prime_rmerr_ap_90prime_rm_mosaic_zmerr_mosaic_zflag_mosaic_zm_ap_mosaic_zmerr_ap_mosaic_zlegacy_flag_cleanedlegacy_flag_gaia
degdeguJyuJyuJyuJyuJyuJy
046819201918204.2462336469066624.613816564710254373397.5267.8889528302.2580.965067457.29795076.65059e-05False12.7704473.7022088e-050.05False0False-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0
146819201636204.2467513569057224.6107932855607031200680.046.78867328211.620.96506568.7014314.230949e-05False12.773933.714096e-050.05False0False-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0
246687401831203.2014741469061824.3470746248084851879845.8390.564221504.2030.96153198.2146950.00022557685False13.0686914.8547256e-050.05False0False-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0
346687401830203.2005782856319624.3467888851744761396961.5525.320919180.1270.961534748.5370410.00040828608False13.1928715.4429933e-050.05False0False-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0
446948800218200.1649117300576424.64899114443905696066.5161.3139316602.8870.97470439.2933730.00025162016False13.3495416.3740226e-050.05False1False-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0
547077600545194.3666828742376324.95205984077053329692.22103.8886417586.2971.09189810.1047290.00034212408False13.2870646.741119e-050.05False1False-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0
647338802190195.2923035874086425.6213669203056954734.0212.24988912506.6580.793057912.0543590.000242996False13.6571466.884746e-050.05False0False-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0
746024501095197.1823677465005522.971935378933907435286.62127.9952612290.7240.78208429.8030620.00031925878False13.6760566.908765e-050.05False1False-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0
847338802047195.3336691908116325.60112372717672325552.9787.97024512161.9850.793056810.118450.00029338535False13.6874897.079851e-050.05False2False-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0
945890801759194.9641324281416522.77119624983628106064.0916.61106512114.3460.7990473511.3360820.00017004089False13.691757.1613824e-050.05False0False-1nannannannannannannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannannannanFalsenannannannanFalseFalse0-1nannannannannannannannannannannannannannannanFalsenannannannanFalsenannannannanFalsenannanFalse0
\n", "\n" ], "text/plain": [ "" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "master_catalogue[:10].show_in_notebook()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## III - Merging flags and stellarity\n", "\n", "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." ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "collapsed": true }, "outputs": [], "source": [ "flag_cleaned_columns = [column for column in master_catalogue.colnames\n", " if 'flag_cleaned' in column]\n", "\n", "flag_column = np.zeros(len(master_catalogue), dtype=bool)\n", "for column in flag_cleaned_columns:\n", " flag_column |= master_catalogue[column]\n", " \n", "master_catalogue.add_column(Column(data=flag_column, name=\"flag_cleaned\"))\n", "master_catalogue.remove_columns(flag_cleaned_columns)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "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." ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "collapsed": true }, "outputs": [], "source": [ "flag_gaia_columns = [column for column in master_catalogue.colnames\n", " if 'flag_gaia' in column]\n", "\n", "master_catalogue.add_column(Column(\n", " data=np.max([master_catalogue[column] for column in flag_gaia_columns], axis=0),\n", " name=\"flag_gaia\"\n", "))\n", "master_catalogue.remove_columns(flag_gaia_columns)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "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." ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "decals_stellarity, las_stellarity, legacy_stellarity\n" ] } ], "source": [ "stellarity_columns = [column for column in master_catalogue.colnames\n", " if 'stellarity' in column]\n", "\n", "print(\", \".join(stellarity_columns))" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "collapsed": true }, "outputs": [], "source": [ "\n", "# We create an masked array with all the stellarities and get the maximum value, as well as its\n", "# origin. Some sources may not have an associated stellarity.\n", "stellarity_array = np.array([master_catalogue[column] for column in stellarity_columns])\n", "stellarity_array = np.ma.masked_array(stellarity_array, np.isnan(stellarity_array))\n", "\n", "max_stellarity = np.max(stellarity_array, axis=0)\n", "max_stellarity.fill_value = np.nan\n", "\n", "no_stellarity_mask = max_stellarity.mask\n", "\n", "master_catalogue.add_column(Column(data=max_stellarity.filled(), name=\"stellarity\"))\n", "\n", "stellarity_origin = np.full(len(master_catalogue), \"NO_INFORMATION\", dtype=\"S20\")\n", "stellarity_origin[~no_stellarity_mask] = np.array(stellarity_columns)[np.argmax(stellarity_array, axis=0)[~no_stellarity_mask]]\n", "\n", "master_catalogue.add_column(Column(data=stellarity_origin, name=\"stellarity_origin\"))\n", "\n", "master_catalogue.remove_columns(stellarity_columns)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## IV - Adding E(B-V) column" ] }, { "cell_type": "code", "execution_count": 18, "metadata": { "collapsed": true }, "outputs": [], "source": [ "master_catalogue.add_column(\n", " ebv(master_catalogue['ra'], master_catalogue['dec'])\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## V - Adding HELP unique identifiers and field columns" ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "collapsed": true }, "outputs": [], "source": [ "master_catalogue.add_column(Column(gen_help_id(master_catalogue['ra'], master_catalogue['dec']),\n", " name=\"help_id\"))\n", "master_catalogue.add_column(Column(np.full(len(master_catalogue), \"NGP\", dtype='" ] }, "metadata": { "needs_background": "light" }, "output_type": "display_data" } ], "source": [ "nb_merge_dist_plot(\n", " SkyCoord(master_catalogue['ra'], master_catalogue['dec']),\n", " SkyCoord(specz['ra'] * u.deg, specz['dec'] * u.deg)\n", ")" ] }, { "cell_type": "code", "execution_count": 24, "metadata": { "collapsed": true }, "outputs": [], "source": [ "master_catalogue = specz_merge(master_catalogue, specz, radius=1. * u.arcsec)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## VIII.a Wavelength domain coverage\n", "\n", "We add a binary `flag_optnir_obs` indicating that a source was observed in a given wavelength domain:\n", "\n", "- 1 for observation in optical;\n", "- 2 for observation in near-infrared;\n", "- 4 for observation in mid-infrared (IRAC).\n", "\n", "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.\n", "\n", "*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.*\n", "\n", "*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 de different depths in the catalogue we are using.*" ] }, { "cell_type": "code", "execution_count": 25, "metadata": { "collapsed": true }, "outputs": [], "source": [ "decals_moc = MOC(filename=\"../../dmu0/dmu0_DECaLS/data/DECaLS_GAMA-12_MOC.fits\")\n", "ps1_moc = MOC(filename=\"../../dmu0/dmu0_PanSTARRS1-3SS/data/PanSTARRS1-3SS_GAMA-12_MOC.fits\")\n", "las_moc = MOC(filename=\"../../dmu0/dmu0_UKIDSS-LAS/data/UKIDSS-LAS_GAMA-12_MOC.fits\")\n", "legacy_moc = MOC(filename=\"../../dmu0/dmu0_LegacySurvey/data/LegacySurvey-dr4_NGP_MOC.fits\")" ] }, { "cell_type": "code", "execution_count": 26, "metadata": { "collapsed": true }, "outputs": [], "source": [ "was_observed_optical = inMoc(\n", " master_catalogue['ra'], master_catalogue['dec'],\n", " decals_moc + ps1_moc + legacy_moc) \n", "\n", "was_observed_nir = inMoc(\n", " master_catalogue['ra'], master_catalogue['dec'],\n", " las_moc \n", ")\n", "\n", "was_observed_mir = np.zeros(len(master_catalogue), dtype=bool)\n", "\n", "#was_observed_mir = inMoc(\n", "# master_catalogue['ra'], master_catalogue['dec'], \n", "#)" ] }, { "cell_type": "code", "execution_count": 27, "metadata": { "collapsed": true }, "outputs": [], "source": [ "master_catalogue.add_column(\n", " Column(\n", " 1 * was_observed_optical + 2 * was_observed_nir + 4 * was_observed_mir,\n", " name=\"flag_optnir_obs\")\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## VIII.b Wavelength domain detection\n", "\n", "We add a binary `flag_optnir_det` indicating that a source was detected in a given wavelength domain:\n", "\n", "- 1 for detection in optical;\n", "- 2 for detection in near-infrared;\n", "- 4 for detection in mid-infrared (IRAC).\n", "\n", "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.\n", "\n", "*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.*\n", "\n", "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." ] }, { "cell_type": "code", "execution_count": 28, "metadata": { "collapsed": true }, "outputs": [], "source": [ "# SpARCS is a catalogue of sources detected in r (with fluxes measured at \n", "# this prior position in the other bands). Thus, we are only using the r\n", "# CFHT band.\n", "# Check to use catalogue flags from HSC and PanSTARRS.\n", "nb_optical_flux = (\n", " 1 * ~np.isnan(master_catalogue['f_gpc1_g']) +\n", " 1 * ~np.isnan(master_catalogue['f_gpc1_r']) +\n", " 1 * ~np.isnan(master_catalogue['f_gpc1_i']) +\n", " 1 * ~np.isnan(master_catalogue['f_gpc1_z']) +\n", " 1 * ~np.isnan(master_catalogue['f_gpc1_y']) +\n", " 1 * ~np.isnan(master_catalogue['f_90prime_g']) +\n", " 1 * ~np.isnan(master_catalogue['f_90prime_r']) +\n", " 1 * ~np.isnan(master_catalogue['f_mosaic_z']) +\n", " 1 * ~np.isnan(master_catalogue['f_decam_z']) \n", ")\n", "\n", "nb_nir_flux = (\n", " 1 * ~np.isnan(master_catalogue['f_ukidss_y']) +\n", " 1 * ~np.isnan(master_catalogue['f_ukidss_j']) +\n", " 1 * ~np.isnan(master_catalogue['f_ukidss_h']) +\n", " 1 * ~np.isnan(master_catalogue['f_ukidss_k'])\n", ")\n", "\n", "nb_mir_flux = np.zeros(len(master_catalogue), dtype=bool)" ] }, { "cell_type": "code", "execution_count": 29, "metadata": { "collapsed": true }, "outputs": [], "source": [ "has_optical_flux = nb_optical_flux >= 2\n", "has_nir_flux = nb_nir_flux >= 2\n", "has_mir_flux = nb_mir_flux >= 2\n", "\n", "master_catalogue.add_column(\n", " Column(\n", " 1 * has_optical_flux + 2 * has_nir_flux + 4 * has_mir_flux,\n", " name=\"flag_optnir_det\")\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## IX - Cross-identification table\n", "\n", "We are producing a table associating to each HELP identifier, the identifiers of the sources in the pristine catalogue. This can be used to easily get additional information from them." ] }, { "cell_type": "code", "execution_count": 30, "metadata": { "collapsed": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['decals_id', 'ps1_id', 'las_id', 'legacy_id', 'help_id', 'specz_id']\n" ] } ], "source": [ "id_names = []\n", "for col in master_catalogue.colnames:\n", " if '_id' in col:\n", " id_names += [col]\n", " if '_intid' in col:\n", " id_names += [col]\n", " \n", "print(id_names)" ] }, { "cell_type": "code", "execution_count": 31, "metadata": { "collapsed": true }, "outputs": [], "source": [ "master_catalogue[id_names].write(\n", " \"{}/master_list_cross_ident_ngp{}.fits\".format(OUT_DIR, SUFFIX))\n", "id_names.remove('help_id')\n", "master_catalogue.remove_columns(id_names)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## X - Adding HEALPix index\n", "\n", "We are adding a column with a HEALPix index at order 13 associated with each source." ] }, { "cell_type": "code", "execution_count": 32, "metadata": { "collapsed": true }, "outputs": [], "source": [ "master_catalogue.add_column(Column(\n", " data=coords_to_hpidx(master_catalogue['ra'], master_catalogue['dec'], order=13),\n", " name=\"hp_idx\"\n", "))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## XI - Saving the catalogue" ] }, { "cell_type": "code", "execution_count": 33, "metadata": { "collapsed": true }, "outputs": [], "source": [ "columns = [\"help_id\", \"field\", \"ra\", \"dec\", \"hp_idx\"]\n", "\n", "bands = [column[5:] for column in master_catalogue.colnames if 'f_ap' in column]\n", "for band in bands:\n", " columns += [\"f_ap_{}\".format(band), \"ferr_ap_{}\".format(band),\n", " \"m_ap_{}\".format(band), \"merr_ap_{}\".format(band),\n", " \"f_{}\".format(band), \"ferr_{}\".format(band),\n", " \"m_{}\".format(band), \"merr_{}\".format(band),\n", " \"flag_{}\".format(band)] \n", " \n", "columns += [\"stellarity\", \"stellarity_origin\",\"flag_cleaned\", \"flag_merged\", \"flag_gaia\", \n", " \"flag_optnir_obs\", \"flag_optnir_det\", \"ebv\", 'zspec_association_flag', 'zspec_qual', 'zspec' ]" ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Missing columns: set()\n" ] } ], "source": [ "# We check for columns in the master catalogue that we will not save to disk.\n", "print(\"Missing columns: {}\".format(set(master_catalogue.colnames) - set(columns)))" ] }, { "cell_type": "code", "execution_count": 35, "metadata": { "collapsed": true }, "outputs": [], "source": [ "master_catalogue[columns].write(\"{}/master_catalogue_ngp{}.fits\".format(OUT_DIR, SUFFIX))" ] } ], "metadata": { "kernelspec": { "display_name": "Python (herschelhelp_internal)", "language": "python", "name": "helpint" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.2" } }, "nbformat": 4, "nbformat_minor": 2 }