{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Puts ALL WISE Astrometry reference catalogues into GAIA reference frame\n", "\n", "\n", "\n", "The WISE catalogues were produced by ../dmu16_allwise/make_wise_samples_for_stacking.csh\n", "\n", "In the catalogue, we keep:\n", "\n", "- The position;\n", "- The chi^2\n", "\n", "This astrometric correction is adapted from master list code (dmu1_ml_XMM-LSS/1.8_SERVS.ipynb) written by Yannick Rohlly and Raphael Shirley\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "field=\"CDFS-SWIRE\"" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "This notebook was run with herschelhelp_internal version: \n", "0aab440 (Thu Mar 22 09:41:13 2018 +0000)\n" ] } ], "source": [ "from herschelhelp_internal import git_version\n", "print(\"This notebook was run with herschelhelp_internal version: \\n{}\".format(git_version()))" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/Users/sjo/anaconda3/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.\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", "from collections import OrderedDict\n", "import os\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", "\n", "from herschelhelp_internal.flagging import gaia_flag_column\n", "from herschelhelp_internal.masterlist import nb_astcor_diag_plot, remove_duplicates\n", "from herschelhelp_internal.utils import astrometric_correction, flux_to_mag" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "OUT_DIR = os.environ.get('TMP_DIR', \"../dmu16_allwise/data/\")\n", "try:\n", " os.makedirs(OUT_DIR)\n", "except FileExistsError:\n", " pass\n", "\n", "RA_COL = \"servs_ra\"\n", "DEC_COL = \"servs_dec\"" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "## I - Reading in WISE astrometric catalogue" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/html": [ "Table length=10\n", "
idx | ra | dec | w4mag |
---|---|---|---|
deg | deg | mag | |
0 | 50.9798869 | -29.7762175 | 9.588 |
1 | 50.9982355 | -29.792392 | 9.109 |
2 | 50.9913861 | -29.7848561 | 9.042 |
3 | 50.9921972 | -29.7819764 | 9.139 |
4 | 50.9973099 | -29.7792946 | 9.188 |
5 | 51.0119911 | -29.810914 | 9.55 |
6 | 51.0228367 | -29.8184199 | 9.653 |
7 | 51.0151049 | -29.80248 | 9.476 |
8 | 51.0198647 | -29.8035684 | 9.658 |
9 | 51.0297995 | -29.8159817 | 9.331 |