From 552ed690a5e83aa5191a400cd99ee67cebaea3df Mon Sep 17 00:00:00 2001 From: Raphael Shirley Date: Mon, 19 Feb 2018 12:06:47 +0000 Subject: [PATCH] HDF-N column renames and filter checking #21 --- dmu1/dmu1_ml_HDF-N/1.3_Hawaii-HDFN.ipynb | 32 +++++++++++-------- dmu1/dmu1_ml_HDF-N/1.6_CANDELS-GOODS-N.ipynb | 30 +++++++++-------- dmu1/dmu1_ml_HDF-N/2_Merging.ipynb | 15 ++++++++- .../3_Checks_and_diagnostics.ipynb | 10 +++--- 4 files changed, 56 insertions(+), 31 deletions(-) diff --git a/dmu1/dmu1_ml_HDF-N/1.3_Hawaii-HDFN.ipynb b/dmu1/dmu1_ml_HDF-N/1.3_Hawaii-HDFN.ipynb index 734dd52b..62f2b57e 100644 --- a/dmu1/dmu1_ml_HDF-N/1.3_Hawaii-HDFN.ipynb +++ b/dmu1/dmu1_ml_HDF-N/1.3_Hawaii-HDFN.ipynb @@ -42,7 +42,9 @@ { "cell_type": "code", "execution_count": 2, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "%matplotlib inline\n", @@ -206,14 +208,14 @@ " 'dR': \"merr_ap_suprime_r\",\n", " 'Riso': \"m_suprime_r\",\n", " 'dRiso': \"merr_suprime_r\",\n", - " 'I': \"m_ap_suprime_i\",\n", - " 'dI': \"merr_ap_suprime_i\",\n", - " 'Iiso': \"m_suprime_i\",\n", - " 'dIiso': \"merr_suprime_i\",\n", - " 'Z': \"m_ap_suprime_z\",\n", - " 'dZ': \"merr_ap_suprime_z\",\n", - " 'Ziso': \"m_suprime_z\",\n", - " 'dZiso': \"merr_suprime_z\",\n", + " 'I': \"m_ap_suprime_ip\",\n", + " 'dI': \"merr_ap_suprime_ip\",\n", + " 'Iiso': \"m_suprime_ip\",\n", + " 'dIiso': \"merr_suprime_ip\",\n", + " 'Z': \"m_ap_suprime_zp\",\n", + " 'dZ': \"merr_ap_suprime_zp\",\n", + " 'Ziso': \"m_suprime_zp\",\n", + " 'dZiso': \"merr_suprime_zp\",\n", " 'HK': \"m_ap_quirc_hk\",\n", " 'dHK': \"merr_ap_quirc_hk\",\n", " 'HKiso': \"m_quirc_hk\",\n", @@ -235,7 +237,9 @@ { "cell_type": "code", "execution_count": 6, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "catalogue_z = Table.read(\"../../dmu0/dmu0_Hawaii-HDFN/data/Z.fits\")[list(imported_columns)]\n", @@ -412,7 +416,9 @@ { "cell_type": "code", "execution_count": 11, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "# Adding flux and band-flag columns\n", @@ -530,8 +536,8 @@ " 'merr_suprime_b', \n", " 'merr_suprime_v', \n", " 'merr_suprime_r',\n", - " 'merr_suprime_i',\n", - " 'merr_suprime_z',\n", + " 'merr_suprime_ip',\n", + " 'merr_suprime_zp',\n", " 'merr_quirc_hk']\n", "FLAG_NAME = 'hawaii_flag_cleaned'\n", "\n", diff --git a/dmu1/dmu1_ml_HDF-N/1.6_CANDELS-GOODS-N.ipynb b/dmu1/dmu1_ml_HDF-N/1.6_CANDELS-GOODS-N.ipynb index 9f2b6ea7..6221f5f0 100644 --- a/dmu1/dmu1_ml_HDF-N/1.6_CANDELS-GOODS-N.ipynb +++ b/dmu1/dmu1_ml_HDF-N/1.6_CANDELS-GOODS-N.ipynb @@ -41,7 +41,9 @@ { "cell_type": "code", "execution_count": 2, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "%matplotlib inline\n", @@ -122,15 +124,15 @@ " 'ACS_F850LP_FLUX': \"f_acs_f850lp\", \n", " 'ACS_F850LP_FLUXERR': \"ferr_acs_f850lp\", \n", " \n", - " 'WFC3_F105W_FLUX': \"f_acs_f105w\", \n", - " 'WFC3_F105W_FLUXERR': \"ferr_acs_f105w\", \n", - " 'WFC3_F125W_FLUX': \"f_acs_f125w\", \n", - " 'WFC3_F125W_FLUXERR': \"ferr_acs_f125w\", \n", - " 'WFC3_F140W_FLUX': \"f_acs_f140w\", \n", - " 'WFC3_F140W_FLUXERR': \"ferr_acs_f140w\", \n", - " 'WFC3_F160W_FLUX': \"f_acs_f160w\", \n", - " 'WFC3_F160W_FLUXERR': \"ferr_acs_f160w\", \n", - " #MOIRCS?\n", + " 'WFC3_F105W_FLUX': \"f_wfc3_f105w\", \n", + " 'WFC3_F105W_FLUXERR': \"ferr_wfc3_f105w\", \n", + " 'WFC3_F125W_FLUX': \"f_wfc3_f125w\", \n", + " 'WFC3_F125W_FLUXERR': \"ferr_wfc3_f125w\", \n", + " 'WFC3_F140W_FLUX': \"f_wfc3_f140w\", \n", + " 'WFC3_F140W_FLUXERR': \"ferr_wfc3_f140w\", \n", + " 'WFC3_F160W_FLUX': \"f_wfc3_f160w\", \n", + " 'WFC3_F160W_FLUXERR': \"ferr_wfc3_f160w\", \n", + " #MOIRCS. There is a Ks and K. We believe this to be K.\n", " 'MOIRCS_K_FLUX':\"f_moircs_k\",\n", " 'MOIRCS_K_FLUXERR':\"ferr_moircs_k\",\n", " #CFHT WIRCAM\n", @@ -292,8 +294,8 @@ "source": [ "SORT_COLS = [\"merr_acs_f435w\",\"ferr_acs_f606w\",\n", " \"ferr_acs_f775w\",\"ferr_acs_f814w\",\n", - " \"ferr_acs_f850lp\", \"ferr_acs_f105w\",\n", - " \"ferr_acs_f125w\",\"ferr_acs_f140w\",\"ferr_acs_f160w\"]\n", + " \"ferr_acs_f850lp\", \"ferr_wfc3_f105w\",\n", + " \"ferr_wfc3_f125w\",\"ferr_wfc3_f140w\",\"ferr_wfc3_f160w\"]\n", "FLAG_NAME = 'candels-gn_flag_cleaned'\n", "\n", "nb_orig_sources = len(catalogue)\n", @@ -478,7 +480,9 @@ { "cell_type": "code", "execution_count": 15, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "catalogue.write(\"{}/CANDELS-GOODS-N.fits\".format(OUT_DIR), overwrite=True)" diff --git a/dmu1/dmu1_ml_HDF-N/2_Merging.ipynb b/dmu1/dmu1_ml_HDF-N/2_Merging.ipynb index f461d193..eb117f04 100644 --- a/dmu1/dmu1_ml_HDF-N/2_Merging.ipynb +++ b/dmu1/dmu1_ml_HDF-N/2_Merging.ipynb @@ -1021,7 +1021,9 @@ " 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_suprime_r']) \n", + " 1 * ~np.isnan(master_catalogue['f_suprime_r']) + \n", + " 1 * ~np.isnan(master_catalogue['f_suprime_ip']) +\n", + " 1 * ~np.isnan(master_catalogue['f_suprime_zp'])\n", ")\n", "\n", "nb_nir_flux = (\n", @@ -1178,6 +1180,17 @@ "## XI - Saving the catalogue" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": true + }, + "outputs": [], + "source": [ + "master_catalogue[:10].show_in_notebook()" + ] + }, { "cell_type": "code", "execution_count": 42, diff --git a/dmu1/dmu1_ml_HDF-N/3_Checks_and_diagnostics.ipynb b/dmu1/dmu1_ml_HDF-N/3_Checks_and_diagnostics.ipynb index 184a6696..d22d9c31 100644 --- a/dmu1/dmu1_ml_HDF-N/3_Checks_and_diagnostics.ipynb +++ b/dmu1/dmu1_ml_HDF-N/3_Checks_and_diagnostics.ipynb @@ -32,7 +32,9 @@ { "cell_type": "code", "execution_count": 2, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "%matplotlib inline\n", @@ -330,7 +332,7 @@ "g_bands = [\"GPC1 g\"]\n", "r_bands = [\"GPC1 r\", \"SUPRIME r\"]\n", "i_bands = [\"GPC1 i\" ]\n", - "z_bands = [\"GPC1 z\", \"SUPRIME z\"]\n", + "z_bands = [\"GPC1 z\", \"SUPRIME zp\"]\n", "y_bands = [\"GPC1 y\"]\n", "j_bands = [ ]\n", "h_bands = [ ]\n", @@ -970,7 +972,7 @@ } ], "source": [ - "nb_compare_mags(twomass['kmag'] + k_2mass_to_ab, master_catalogue['m_wircam_k'][ml_twomass_idx],\n", + "nb_compare_mags(twomass['kmag'] + k_2mass_to_ab, master_catalogue['m_wircam_ks'][ml_twomass_idx],\n", " labels=(\"2MASS Ks\", \"WIRCAM Ks (total)\"))" ] }, @@ -1065,7 +1067,7 @@ "source": [ "nb_ccplots(\n", " master_catalogue['m_mosaic_u'] - master_catalogue['m_suprime_b'],\n", - " master_catalogue['m_gpc1_r'] - master_catalogue['m_wircam_k'],\n", + " master_catalogue['m_gpc1_r'] - master_catalogue['m_wircam_ks'],\n", " \"Mosaic u - Suprime B\", \"GPC1 r - Wircam Ks\",\n", " master_catalogue[\"stellarity\"]\n", ")"