{ "cells": [ { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "# xFLS master catalogue\n", "## Checks and diagnostics\n", "\n", "These revealed a number of issues to be corrected. There was a unit issue with the BASS Legacy Survey magnitudes and fluxes which needs to be corrected across all the fields. The UHS magnitudes are Vega and needed to be corrected." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "This notebook was run with herschelhelp_internal version: \n", "0246c5d (Thu Jan 25 17:01:47 2018 +0000) [with local modifications]\n", "This notebook was executed on: \n", "2018-02-21 12:50:45.256741\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": [], "source": [ "%matplotlib inline\n", "#%config InlineBackend.figure_format = 'svg'\n", "\n", "import matplotlib.pyplot as plt\n", "plt.rc('figure', figsize=(10, 6))\n", "plt.style.use('ggplot')\n", "\n", "import locale\n", "locale.setlocale(locale.LC_ALL, 'en_GB')\n", "\n", "import os\n", "import time\n", "import itertools\n", "\n", "from astropy.coordinates import SkyCoord\n", "from astropy.table import Table\n", "from astropy import units as u\n", "from astropy import visualization as vis\n", "import numpy as np\n", "from matplotlib_venn import venn3\n", "\n", "from herschelhelp_internal.masterlist import (nb_compare_mags, nb_ccplots, nb_histograms, find_last_ml_suffix, \n", " quick_checks)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Diagnostics done using: master_catalogue_xfls_20180221.fits\n" ] } ], "source": [ "OUT_DIR = os.environ.get('OUT_DIR', \"./data\")\n", "SUFFIX = find_last_ml_suffix()\n", "#SUFFIX = \"20171016\"\n", "\n", "master_catalogue_filename = \"master_catalogue_xfls_{}.fits\".format(SUFFIX)\n", "master_catalogue = Table.read(\"{}/{}\".format(OUT_DIR, master_catalogue_filename))\n", "\n", "print(\"Diagnostics done using: {}\".format(master_catalogue_filename))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 0 - Quick checks" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/opt/anaconda3/envs/herschelhelp_internal/lib/python3.6/site-packages/numpy/core/numeric.py:301: FutureWarning: in the future, full(152, False) will return an array of dtype('bool')\n", " format(shape, fill_value, array(fill_value).dtype), FutureWarning)\n", "/opt/anaconda3/envs/herschelhelp_internal/lib/python3.6/site-packages/numpy/core/numeric.py:301: FutureWarning: in the future, full(152, 0) will return an array of dtype('int64')\n", " format(shape, fill_value, array(fill_value).dtype), FutureWarning)\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "Table shows only problematic columns.\n" ] }, { "data": { "text/html": [ "<Table length=44>\n", "
idx | Column | All nan | #Measurements | #Zeros | #Negative | Minimum value |
---|---|---|---|---|---|---|
0 | ferr_ap_gpc1_g | False | 157851 | 46 | 0 | 0.0 |
1 | merr_ap_gpc1_g | False | 157851 | 46 | 0 | 0.0 |
2 | ferr_gpc1_g | False | 157766 | 207 | 0 | 0.0 |
3 | merr_gpc1_g | False | 157766 | 207 | 0 | 0.0 |
4 | ferr_ap_gpc1_r | False | 165222 | 100 | 0 | 0.0 |
5 | merr_ap_gpc1_r | False | 165222 | 100 | 0 | 0.0 |
6 | ferr_gpc1_r | False | 165331 | 62 | 0 | 0.0 |
7 | merr_gpc1_r | False | 165331 | 62 | 0 | 0.0 |
8 | ferr_ap_gpc1_i | False | 166567 | 29 | 0 | 0.0 |
9 | merr_ap_gpc1_i | False | 166567 | 29 | 0 | 0.0 |
10 | ferr_gpc1_i | False | 166634 | 23 | 0 | 0.0 |
11 | merr_gpc1_i | False | 166634 | 23 | 0 | 0.0 |
12 | ferr_ap_gpc1_z | False | 165165 | 62 | 0 | 0.0 |
13 | merr_ap_gpc1_z | False | 165165 | 62 | 0 | 0.0 |
14 | ferr_gpc1_z | False | 165238 | 28 | 0 | 0.0 |
15 | merr_gpc1_z | False | 165238 | 28 | 0 | 0.0 |
16 | ferr_ap_gpc1_y | False | 163036 | 154 | 0 | 0.0 |
17 | merr_ap_gpc1_y | False | 163036 | 154 | 0 | 0.0 |
18 | ferr_gpc1_y | False | 161592 | 63 | 0 | 0.0 |
19 | merr_gpc1_y | False | 161592 | 63 | 0 | 0.0 |
20 | merr_ap_90prime_g | False | 179368 | 0 | 3613 | -2939.3527832 |
21 | f_90prime_g | False | 179896 | 147 | 2645 | -5084714.5 |
22 | merr_90prime_g | False | 179749 | 0 | 2645 | -2872.12011719 |
23 | merr_ap_90prime_r | False | 70297 | 0 | 1371 | -284.999450684 |
24 | f_90prime_r | False | 179896 | 109296 | 888 | -3.14594065121e+13 |
25 | m_90prime_r | False | 69712 | 0 | 3 | -7.63986968994 |
26 | merr_90prime_r | False | 70600 | 0 | 888 | -413.789611816 |
27 | merr_ap_mosaic_z | False | 103512 | 0 | 2845 | -121594.460938 |
28 | f_mosaic_z | False | 179896 | 75945 | 1687 | -2719352.0 |
29 | merr_mosaic_z | False | 103951 | 0 | 1687 | -2262.61791992 |
30 | ferr_ap_mosaic_r | False | 670828 | 32476 | 0 | 0.0 |
31 | merr_ap_mosaic_r | False | 670828 | 32476 | 0 | 0.0 |
32 | ferr_mosaic_r | False | 670833 | 22859 | 0 | 0.0 |
33 | merr_mosaic_r | False | 670833 | 22859 | 0 | 0.0 |
34 | f_ap_irac_i1 | False | 181526 | 0 | 1 | -17.4093936921 |
35 | merr_ap_irac_i1 | False | 181526 | 0 | 1 | -0.385237663172 |
36 | f_irac_i1 | False | 181526 | 0 | 180 | -448.43377704 |
37 | merr_irac_i1 | False | 181526 | 0 | 180 | -304.480823173 |
38 | f_irac_i2 | False | 164049 | 0 | 262 | -45.291295668 |
39 | merr_irac_i2 | False | 164049 | 0 | 262 | -24020.9043017 |
40 | f_irac_i3 | False | 44921 | 0 | 43 | -644.1452259 |
41 | merr_irac_i3 | False | 44921 | 0 | 43 | -139.830892425 |
42 | f_irac_i4 | False | 39826 | 0 | 42 | -46.998690984 |
43 | merr_irac_i4 | False | 39826 | 0 | 42 | -160.241761788 |