{ "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=\"AKARI-SEP\"\n", "field=\"AKARI-NEP\"\n", "field='Herschel-Stripe-82' \n", "\n", "field='HDF-N' \n", "field='XMM-LSS' \n", "field='AKARI-NEP' \n", "field='AKARI-SEP' \n", "field='Bootes' \n", "field='CDFS-SWIRE' \n", "field='COSMOS' \n", "field='EGS' \n", "field='ELAIS-N1' \n", "field='ELAIS-N2' \n", "field='ELAIS-S1' \n", "field='GAMA-09' \n", "field='GAMA-12' \n", "field='GAMA-15' \n", "field='NGP' \n", "field='SGP' \n", "field='Lockman-SWIRE' \n", "field='SA13' \n", "field='SPIRE-NEP' \n", "field='SSDF' \n", "field='xFLS' \n", "field='XMM-13hr' \n" ] }, { "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 | 203.4147077 | 37.4250645 | 9.378 |
1 | 203.2962176 | 37.4727302 | 9.044 |
2 | 203.296906 | 37.4777635 | 9.444 |
3 | 203.3143497 | 37.4686183 | 9.464 |
4 | 203.3123273 | 37.4762516 | 9.059 |
5 | 203.3177577 | 37.4771595 | 9.533 |
6 | 203.3318084 | 37.4661865 | 9.343 |
7 | 203.3342913 | 37.4731416 | 8.726 |
8 | 203.3454295 | 37.4668158 | 9.445 |
9 | 203.2970083 | 37.4879948 | 9.164 |