{ "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=\"xFLS\"" ] }, { "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 | 261.3827314 | 57.9962425 | 9.589 |
1 | 261.3808219 | 58.000572 | 9.394 |
2 | 261.3761038 | 57.9986263 | 9.286 |
3 | 261.3719769 | 58.0077735 | 9.269 |
4 | 261.3781128 | 58.0123407 | 9.397 |
5 | 261.3707248 | 58.0142632 | 9.138 |
6 | 261.3870745 | 58.0184618 | 9.284 |
7 | 261.3706104 | 58.0221689 | 8.854 |
8 | 261.365538 | 58.0248091 | 9.069 |
9 | 261.5353884 | 58.0677642 | 9.367 |