Skip to content

Commit

Permalink
HDF-N column renames and filter checking
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelshirley committed Feb 19, 2018
1 parent c78fe5b commit 552ed69
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 31 deletions.
32 changes: 19 additions & 13 deletions dmu1/dmu1_ml_HDF-N/1.3_Hawaii-HDFN.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%matplotlib inline\n",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -412,7 +416,9 @@
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# Adding flux and band-flag columns\n",
Expand Down Expand Up @@ -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",
Expand Down
30 changes: 17 additions & 13 deletions dmu1/dmu1_ml_HDF-N/1.6_CANDELS-GOODS-N.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%matplotlib inline\n",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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)"
Expand Down
15 changes: 14 additions & 1 deletion dmu1/dmu1_ml_HDF-N/2_Merging.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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,
Expand Down
10 changes: 6 additions & 4 deletions dmu1/dmu1_ml_HDF-N/3_Checks_and_diagnostics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%matplotlib inline\n",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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)\"))"
]
},
Expand Down Expand Up @@ -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",
")"
Expand Down

0 comments on commit 552ed69

Please sign in to comment.