{ "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=\"SA13\"" ] }, { "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 | 197.8837001 | 42.4375128 | 9.051 |
1 | 197.8868206 | 42.4407543 | 8.64 |
2 | 197.8885856 | 42.4330266 | 9.214 |
3 | 197.9100323 | 42.4282292 | 9.13 |
4 | 197.8981235 | 42.4364002 | 9.184 |
5 | 197.8958882 | 42.4402548 | 9.226 |
6 | 197.9248205 | 42.4280219 | 9.091 |
7 | 197.9138139 | 42.4332501 | 8.927 |
8 | 197.9254372 | 42.4326831 | 8.894 |
9 | 197.936428 | 42.431015 | 9.122 |