{ "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=\"ELAIS-N1\"" ] }, { "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 | 247.0965569 | 55.1757077 | 9.743 |
1 | 247.0801513 | 55.1796745 | 9.678 |
2 | 247.0547571 | 55.1514605 | 9.277 |
3 | 247.0775547 | 55.1689249 | 9.341 |
4 | 247.0680223 | 55.1583423 | 9.919 |
5 | 247.0693325 | 55.1669344 | 9.772 |
6 | 247.0520037 | 55.1605936 | 9.793 |
7 | 246.9990667 | 55.1136167 | 9.895 |
8 | 247.0488306 | 55.1503219 | 9.308 |
9 | 247.0433661 | 55.1447505 | 9.878 |