{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# Discovery of brown dwarfs mining the 2MASS and SDSS databases\n", "\n", "F. Jiménez-Esteban¹, K. A. Lutz², E. Solano¹\n", "\n", "1. Spanish Virtual Observatory\n", "2. Université de Strasbourg, CNRS, Observatoire Astronomique de Strasbourg, UMR 7550, F-67000, Strasbourg, France\n", "\n", "This tutorial is based on the EURO-VO tutorial of the same name: http://www.euro-vo.org/sites/default/files/documents/tutorial-brown-dwarfs_2019Apr.pdf .\n", "\n", "***\n", "\n", "## Introduction \n", "\n", "Brown dwarfs are objects occupying the gap between the least massive stars and the most massive planets. They are intrinsically faint objects. Hence, heir detection is not straightforward and, in fact, was almost impossible until the advent of global surveys at deep optical and near-infrared bands like SDSS, 2MASS or DENIS. We propose here to mine the 2MASS point source catalogue (2MASS-PSC) and SDSS-DR9 databases to identify T-type brown dwarfs through an appropriate combination of colors in the optical and the infrared, an approach that perfectly fits into the Virtual Observatory.\n", "\n", "In this use case, we explore different ways to do the same tasks with different VO tools. These tasks\n", "include:\n", " 1. obtaining data from the SDSS and 2MASS catalogues in a given sky region,\n", " 2. crossmatching the results of these searches,\n", " 3. filtering the resulting table for brown dwarfs, and\n", " 4. verifying our sample of brown dwarfs.\n", "\n", "Software packages needed for this tutorial are Aladin, TOPCAT, STILTS and Python (or you may just use the Binder in your web browser)." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "# Standard Library\n", "from pathlib import Path\n", "\n", "# Astronomy tools\n", "from astropy import units as u\n", "from astropy.coordinates import SkyCoord\n", "\n", "# Access astronomical databases\n", "import pyvo\n", "from astroquery.simbad import Simbad\n", "from astroquery.vizier import Vizier\n", "from astroquery.xmatch import XMatch\n", "\n", "# Sky visualization\n", "from ipyaladin import Aladin" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Step #1: Discovery\n", "\n", "[![Vizier](https://custom-icon-badges.demolab.com/badge/Vizier-gray.svg?logo=vizier&logoColor=orange&logoWidth=20)](https://vizier.cds.unistra.fr/viz-bin/VizieR \"https://vizier.cds.unistra.fr/viz-bin/VizieR\")\n", "\n", "We start by searching for the 2MASS point source catalogue (2MASS-PSC) and the SDSS data release 9 catalogue (SDSS DR9). To find and query catalogues, there are two packages we can use: pyVO and astroquery. We will show pyVO for searching the 2MASS-PSC and astroquery for SDSS DR9. \n", "\n", "With the pyVo package we are using the TAP service of VizieR. TAP is a Virtual Observatory protocol to query databases of tables. The language we use to compile the query is called ADQL and is similar to SQL. For more details on ADQL see also the dedicated VO tutorial (http://docs.g-vo.org/adql-gaia/html/). " ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "scrolled": true, "tags": [ "output_scroll" ] }, "outputs": [ { "data": { "text/html": [ "
Table length=13\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
table_namedescription
objectobject
J/ApJ/569/23/table1Optical polarimetry of 2MASS Red QSOs ( Smith P.S., Schmidt G.D., Hines D.C., Cutri R.M., Nelson B.O.)
J/ApJ/780/92/2mass2MASS JHKs photometry (table5) ( Szabo R., Ivezic Z., Kiss L.L., Kollath Z., Jones L., Sesar B., Becker A.C., Davenport J.R.A., Cutri R.M.)
II/281/2mass6x2MASS-6X catalog ( Cutri R.M., Skrutskie M.F., Van Dyk S., et al.)
J/ApJ/564/421/table32MASS IDR2 Sources Unconfirmed in Second Epoch Imaging ( Burgasser A.J., Kirkpatrick J.D., Brown M.E., Reid I.N., Burrows A., Liebert J., Matthews K., Gizis J.E., Dahn C.C., Monet D.G., Cutri R.M., Skrutskie M.F.)
II/246/out2MASS Point Source Catalogue, output (on a total of 470,992,970 sources) ( Cutri R.M., Skrutskie M.F., Van Dyk S., et al.)
VII/233/xsc*The 2MASS Extended Catalog (2MASX) ( Skrutskie M.F., Cutri R.M., Stiening R., et al.)
II/241/out2MASS Point Source Catalogue, 2MASS 2000 Second Incremental Release ( Skrutskie M.F., Schneider S.E., Stiening R., Strom S.E., Weinberg M.D., Beichman C., Chester T., Cutri R., Lonsdale C., Elias J., Elston R., Capps R., Carpenter J., Huchra J., Liebert J., Monet D., Price S., Seitzer P.)
J/ApJ/569/23/table3Galactic interstellar polarization detected in the fields of 2MASS AGNs ( Smith P.S., Schmidt G.D., Hines D.C., Cutri R.M., Nelson B.O.)
J/ApJ/569/23/table2Optical polarimetry of other AGN found by 2MASS ( Smith P.S., Schmidt G.D., Hines D.C., Cutri R.M., Nelson B.O.)
J/AJ/126/63/table12MASS sample and measurements ( Hutchings J.B., Maddox N., Cutri R.M., Nelson B.O.)
J/ApJS/190/100/table1List of 2MASS proper motion candidates ( Kirkpatrick J.D., Looper D.L., Burgasser A.J., Schurr S.D., Cutri R.M., Cushing M.C., Cruz K.L., Sweet A.C., Knapp G.R., Barman T.S., Bochanski J.J., Roellig T.L., McLean I.S., McGovern M.R., Rice E.L.)
J/ApJ/564/421/table5Comparison of NIRC Spectrophotometric colors to 2MASS photometry ( Burgasser A.J., Kirkpatrick J.D., Brown M.E., Reid I.N., Burrows A., Liebert J., Matthews K., Gizis J.E., Dahn C.C., Monet D.G., Cutri R.M., Skrutskie M.F.)
J/ApJ/564/421/table6New T Dwarfs Identified in the 2MASS Catalog ( Burgasser A.J., Kirkpatrick J.D., Brown M.E., Reid I.N., Burrows A., Liebert J., Matthews K., Gizis J.E., Dahn C.C., Monet D.G., Cutri R.M., Skrutskie M.F.)
" ], "text/plain": [ "\n", " table_name ...\n", " object ...\n", "--------------------- ...\n", " J/ApJ/569/23/table1 ...\n", " J/ApJ/780/92/2mass ...\n", " II/281/2mass6x ...\n", " J/ApJ/564/421/table3 ...\n", " II/246/out ...\n", " VII/233/xsc ...\n", " II/241/out ...\n", " J/ApJ/569/23/table3 ...\n", " J/ApJ/569/23/table2 ...\n", " J/AJ/126/63/table1 ...\n", "J/ApJS/190/100/table1 ...\n", " J/ApJ/564/421/table5 ...\n", " J/ApJ/564/421/table6 ..." ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tap_vizier = pyvo.dal.TAPService(\"https://tapvizier.cds.unistra.fr/TAPVizieR/tap\")\n", "\n", "query = \"\"\"\n", "SELECT * \n", "FROM tables\n", "WHERE description LIKE '%2MASS%Cutri%'\n", "\"\"\"\n", "\n", "mass_psc_set = tap_vizier.search(query).to_table()\n", "mass_psc_set[\"table_name\", \"description\"]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As mentioned above we are interested in the 2MASS-pSC, which has the table_name `II/246/out` in VizieR. Before we move on to construct a more complicated query, we have a quick look at the 2MASS-PSC table and all the available columns. We do so by downloading the first 5 rows:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "scrolled": true, "tags": [ "output_scroll" ] }, "outputs": [ { "data": { "text/html": [ "
Table length=5\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
RAJ2000DEJ2000errMajerrMinerrPA2MASSJmagJcmsige_JmagJsnrHmagHcmsige_HmagHsnrKmagKcmsige_KmagKsnrQflgRflgBflgCflgNdetproxpxPApxCntrXflgAflgCntrHemisDateScanGLONGLATXscanJDJpsfchiHpsfchiKpsfchiJstdape_JstdapHstdape_HstdapKstdape_KstdapedgeNSedgeEWedgedupuseoptDoptPAoptBmagRmagNoptextKeyscanKeycoaddKeycoadd
degdegarcsecarcsecdegmagmagmagmagmagmagmagmagmagarcsecdegdegdegarcsecdmagmagmagmagmagmagarcsecarcsecarcsecdegmagmag
float64float64float32float32int16objectfloat32float32float32float64float32float32float32float64float32float32float32float64objectobjectobjectobjectobjectfloat32int16int64int16int16int64str1objectint16float32float32float32float64float32float32float32float32float32float32float32float32float32int32int16objectint16int16str1float32int16float32float32int16int32int32int32int16
44.9960550.0055650.170.167602595905+000020016.3760.0970.09711.315.770.1390.148.215.2580.1410.1417.6ABB22211100006060644.52301290669337001290669325s1998-09-28112176.951-48.902-138.92451084.80620.751.211.1316.6510.22115.4340.13415.4780.434521114ne11U0.715617.916.91--6934715949599
45.0048570.0198060.060.069003000116+000111312.5290.0210.024389.811.9540.0290.03273.711.8740.0270.029172.5AAA2221110006666664.83301290669298001290669300s1998-09-28112176.945-48.885-170.62451084.80621.151.311.9712.5080.01911.910.02511.8520.00846982ne11U1.57215.013.81--6934715949599
45.0041930.0209560.060.069003000100+000115414.8450.0550.05646.214.2230.0770.07733.914.0160.0550.05524.0AAA222111ccc6666664.81501290669300001290669298s1998-09-28112176.943-48.885-168.22451084.80620.860.891.1113.8890.10113.0350.12612.970.04346584ne110--------0--6934715949599
44.9950740.0382040.380.31002595881+000217516.7460.1330.1348.015.8140.1390.147.816.1250.3240.3243.4BBD22211100006060670.21521290669298001290669276s1998-09-28112176.914-48.88-135.42451084.80621.220.840.6917.0470.41415.50.22917.5131.964403117ne010--------0--6934715949599
44.9638510.0435870.220.179502595132+000236916.4760.1120.11310.316.0570.1750.1756.315.564------BCU22011000006060089.42071290669295001290669271s1998-09-28112176.875-48.898-23.02451084.80621.131.07--17.1130.3418.7393.527----384229ne11U0.416118.717.71--6934715949599
" ], "text/plain": [ "\n", " RAJ2000 DEJ2000 errMaj errMin errPA ... Nopt extKey scanKey coaddKey coadd\n", " deg deg arcsec arcsec deg ... \n", " float64 float64 float32 float32 int16 ... int16 int32 int32 int32 int16\n", "--------- -------- ------- ------- ----- ... ----- ------ ------- -------- -----\n", "44.996055 0.005565 0.17 0.16 76 ... 1 -- 69347 1594959 9\n", "45.004857 0.019806 0.06 0.06 90 ... 1 -- 69347 1594959 9\n", "45.004193 0.020956 0.06 0.06 90 ... 0 -- 69347 1594959 9\n", "44.995074 0.038204 0.38 0.31 0 ... 0 -- 69347 1594959 9\n", "44.963851 0.043587 0.22 0.17 95 ... 1 -- 69347 1594959 9" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "query = 'SELECT TOP 5 * FROM \"II/246/out\" '\n", "mass_psc_head = tap_vizier.search(query).to_table()\n", "mass_psc_head" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As in the original tutorial, we only want to get data within a 14arcmin radius of RA=08h30m00s, Dec=01d30m00s. ADQL has a function, which allows to run an astronomical cone search query. From the quick inital inspection of the table we now know that we will need the columns `RAJ2000` and `DEJ2000` to only get sources at a certain location. Since we want to get colours for our Brown Dwarf candidates, we will also want to get the `Jmag`, `Hmag` and `Kmag` columns. For a different analysis you might want to choose other columns. " ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "scrolled": true, "tags": [ "output_scroll" ] }, "outputs": [ { "data": { "text/html": [ "
Table length=683\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
RAJ2000DEJ2000errMajerrMinerrPA2MASSJmagJcmsige_JmagJsnrHmagHcmsige_HmagHsnrKmagKcmsige_KmagKsnrQflgRflgBflgCflgNdetproxpxPApxCntrXflgAflgCntrHemisDateScanGLONGLATXscanJDJpsfchiHpsfchiKpsfchiJstdape_JstdapHstdape_HstdapKstdape_KstdapedgeNSedgeEWedgedupuseoptDoptPAoptBmagRmagNoptextKeyscanKeycoaddKeycoadd
degdegarcsecarcsecdegmagmagmagmagmagmagmagmagmagarcsecdegdegdegarcsecdmagmagmagmagmagmagarcsecarcsecarcsecdegmagmag
float64float64float32float32int16objectfloat32float32float32float64float32float32float32float64float32float32float32float64objectobjectobjectobjectobjectfloat32int16int64int16int16int64str1objectint16float32float32float32float64float32float32float32float32float32float32float32float32float32int32int16objectint16int16str1float32int16float32float32int16int32int32int32int16
127.5091541.2691730.20.158708300219+011609015.9630.0950.09612.515.5460.1210.1229.014.930.1440.1448.1ABB22211100016060614.234080404058900804040599s2000-01-3058223.55422.408178.52451573.68150.891.010.9215.9390.23515.8990.31914.690.124458974sw010--------0--439561010984221
127.5077791.2728750.120.118608300186+011622315.5940.0830.08417.615.5630.1170.1178.915.2720.1810.1825.9ABC22211100036060614.216080404059900804040589s2000-01-3058223.5522.408183.42451573.68141.640.821.4715.4320.15315.810.42414.9920.114460269sw01U0.227017.116.51--439561010984221
127.5141671.2774950.230.215108300340+011638916.5530.170.1717.316.1790.1940.1945.015.894------CCU22011000006060028.423480404058900804040577s2000-01-3058223.54922.416160.42451573.68140.691.58--16.3350.13918.0143.36----461992sw01U0.01318.017.31--439561010984221
127.4632511.2719030.070.07008295118+011618815.8440.0760.07714.015.110.0950.09613.515.0290.1380.1387.4AAB22211100026060641.016080401955900804019587s2000-01-3057223.52822.369-87.92451573.67391.780.81.1415.9350.23815.0770.16415.1970.4384593164se01U1.028120.018.41--43955101094756
127.4630231.28640.060.06008295112+011711014.0930.0290.03270.013.6520.0330.03551.713.5530.0420.04328.9AAA22211100066663552.217980401958700804019616s2000-01-3057223.51422.376-87.02451573.6740.750.970.9114.0770.02313.5760.0513.6920.144646165se01U0.416016.314.61--43955101094756
127.484651.2711920.060.06008295631+011616213.8480.0260.02987.813.1770.020.02280.012.9320.0230.02451.1AAA22211100066665515.71280401960000804019585s2000-01-3057223.5422.387-164.92451573.67390.880.870.9513.8130.04213.1430.05113.0090.056459187se01U0.224418.816.71--43955101094756
127.4855651.2754560.20.17408295653+011631616.260.1120.1129.515.9080.1720.1726.515.2640.1840.1846.0BCC22211100016060615.719280401958500804019600s2000-01-3057223.53622.39-168.22451573.6740.841.30.816.1250.29115.5290.25315.210.246460684se01U0.423218.117.41--43955101094756
127.4943391.2807340.150.1514508295864+011650616.3170.1190.129.015.8180.1410.1417.015.099------BBU22011000006060036.923980401960000804019605s2000-01-3057223.53622.4-199.82451573.6740.961.62--16.2640.08816.2190.553----462552se110--------0--43955101094756
127.4946451.2962040.070.071708295871+011746315.250.050.05124.115.0620.0770.07814.114.870.1140.1148.6AAB22211100066050647.129980401965200804019639s2000-01-3057223.52122.408-200.92451573.6740.980.891.0115.1780.06415.1950.30214.7790.326468151se11U0.418516.816.11--43955101094756
....................................................................................................................................................................................
127.4717491.6999810.150.1514508295321+014159916.2780.120.1219.415.6460.1380.1388.215.792------BBU22011000006060021.511180402053600804020539s2000-01-3057223.12722.583-118.52451573.67430.820.93--16.1580.1215.6660.136----6134134se01U0.517818.217.11--43955101094980
127.4854721.7016310.070.071708295651+014205815.2860.0470.04923.314.8050.0690.06917.914.590.1020.10211.1AAA22211100036150632.424580402053600804020544s2000-01-3057223.13222.596-167.82451573.67431.031.11.0215.410.10714.790.12714.3310.225614084se01U0.522717.916.61--43955101094980
127.502331.7075680.060.069008300055+014227213.4420.0230.026127.512.8370.0240.026109.412.6520.0290.0366.2AAA22211100066665524.117380403960000804039583s2000-01-3058223.13522.614203.02451573.68111.130.791.513.4830.01812.9130.02912.710.045616750sw11U1.126217.215.11--439561010982198
127.4694231.713720.120.1110108295266+014249316.1240.0970.09810.815.4080.1010.10210.315.340.1860.1865.6AAC22211100006060650.217080402053900804020569s2000-01-3057223.11222.588-110.12451573.67430.990.990.9316.2560.26915.9290.34715.5740.3286184142se010--------0--43955101094980
127.4519481.7212050.060.06008294846+014316312.4590.0190.023315.412.0560.0240.026224.711.9690.0230.024124.1AAA22211100066666648.419280402055900804020588s2000-01-3057223.09622.576-47.22451573.67430.740.740.8612.470.01912.0380.04611.9730.0296211205se01U1.317614.813.51--43955101094980
127.3954741.697110.340.328808293491+014149516.5510.1640.1647.315.9070.2070.2076.515.7950.2740.2753.7CED22211100006050653.733880402056600804020535s2000-01-3057223.08922.515156.02451573.67430.8510.930.7216.4610.21616.10.26816.1460.828612597sw010--------0--43955101094980
127.4322921.7171160.070.069608294375+014301614.5690.0320.03545.214.2990.0550.05628.514.2190.0840.08415.6AAA22211100066561422.81480402059300804020581s2000-01-3057223.0922.55723.52451573.67430.91.150.6514.5520.0514.1720.08614.2250.2296197229sw01U0.319816.415.31--43955101094980
127.4338571.7232630.070.071708294412+014323715.6780.080.08116.315.2070.1050.10512.314.9650.1380.1387.9AAB222111ccc6656164.531780402059600804020593s2000-01-3057223.08522.56117.92451573.67431.140.831.2214.5170.09714.0720.11214.1790.1446219235sw01U4.013915.814.41--43955101094980
127.5319021.7297570.060.069008300765+014347114.1550.0330.03666.113.840.0320.03343.413.8060.0480.04922.9AAA22211100066664614.18280403953900804039541s2000-01-3058223.1322.6596.62451573.68111.030.881.0114.1360.05113.9720.04813.850.1186247156sw01U0.223015.815.01--439561010982198
127.535771.7302930.370.354508300858+014349017.0470.2310.2314.616.1230.190.195.315.8720.3020.3033.4DCD22211100006060514.126280403954100804039539s2000-01-3058223.13122.65482.72451573.68110.950.740.9816.5370.39917.5291.51516.040.7056249170sw010--------0--439561010982198
" ], "text/plain": [ "\n", " RAJ2000 DEJ2000 errMaj errMin errPA ... extKey scanKey coaddKey coadd\n", " deg deg arcsec arcsec deg ... \n", " float64 float64 float32 float32 int16 ... int32 int32 int32 int16\n", "---------- -------- ------- ------- ----- ... ------ ------- -------- -----\n", "127.509154 1.269173 0.2 0.15 87 ... -- 43956 1010984 221\n", "127.507779 1.272875 0.12 0.11 86 ... -- 43956 1010984 221\n", "127.514167 1.277495 0.23 0.21 51 ... -- 43956 1010984 221\n", "127.463251 1.271903 0.07 0.07 0 ... -- 43955 1010947 56\n", "127.463023 1.2864 0.06 0.06 0 ... -- 43955 1010947 56\n", " 127.48465 1.271192 0.06 0.06 0 ... -- 43955 1010947 56\n", "127.485565 1.275456 0.2 0.17 4 ... -- 43955 1010947 56\n", "127.494339 1.280734 0.15 0.15 145 ... -- 43955 1010947 56\n", "127.494645 1.296204 0.07 0.07 17 ... -- 43955 1010947 56\n", " ... ... ... ... ... ... ... ... ... ...\n", "127.471749 1.699981 0.15 0.15 145 ... -- 43955 1010949 80\n", "127.485472 1.701631 0.07 0.07 17 ... -- 43955 1010949 80\n", " 127.50233 1.707568 0.06 0.06 90 ... -- 43956 1010982 198\n", "127.469423 1.71372 0.12 0.11 101 ... -- 43955 1010949 80\n", "127.451948 1.721205 0.06 0.06 0 ... -- 43955 1010949 80\n", "127.395474 1.69711 0.34 0.32 88 ... -- 43955 1010949 80\n", "127.432292 1.717116 0.07 0.06 96 ... -- 43955 1010949 80\n", "127.433857 1.723263 0.07 0.07 17 ... -- 43955 1010949 80\n", "127.531902 1.729757 0.06 0.06 90 ... -- 43956 1010982 198\n", " 127.53577 1.730293 0.37 0.35 45 ... -- 43956 1010982 198" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "coord = SkyCoord(ra=\"08:30:00\", dec=\"01:30:00\", unit=(u.hourangle, u.deg))\n", "\n", "query = \"\"\"\n", "SELECT * \n", "FROM \\\"II/246/out\\\" as tm_psc \n", "WHERE 1=CONTAINS(POINT(\\'ICRS\\', tm_psc.RAJ2000, tm_psc.DEJ2000),\n", " CIRCLE(\\'ICRS\\', {:.3f}, {:.3f}, 14/60))\n", "\"\"\".format(\n", " coord.ra.value,\n", " coord.dec.value,\n", ")\n", "\n", "mass_psc = tap_vizier.search(query).to_table()\n", "mass_psc" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now that we have all the data we want from the 2MASS-PSC, we move on to query SDSS DR9 with astroquery. First we want to find out which tables are available:" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "V/139 : The SDSS Photometric Catalog, Release 9 (Adelman-McCarthy+, 2012)\n", "J/A+A/547/L1 : SDSS-III DR9 DLA catalogue (Noterdaeme+, 2012)\n", "J/A+A/598/A92 : New ultracool subdwarfs (Lodieu+, 2017)\n", "J/A+A/616/A97 : SDSS QSO DR7 and DR9 (D'Isanto+, 2018)\n", "J/MNRAS/444/2456 : Spectral galaxy pairs from SDSS DR9 (Yang+, 2014)\n", "J/MNRAS/445/1331 : White-dwarf + main-sequence binaries in SDSS DR9 (Li+, 2014)\n", "J/MNRAS/450/905 : New SNe in SDSS DR9 (Graur+, 2015)\n", "J/MNRAS/458/3808 : DR9-12 SDSS WDMS binaries (Rebassa-Mansergas+, 2016)\n", "J/other/NewA/58.61 : SDSS DR9 galaxy clusters optical catalog (Banerjee+, 2018)\n", "J/other/RAA/17.62 : Candidate members of 4 stellar streams (Li+, 2017)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ "WARNING: UnitsWarning: Unit 'Sun' not supported by the VOUnit standard. Did you mean uN? [astropy.units.format.vounit]\n" ] } ], "source": [ "catalog_list_sdss = Vizier.find_catalogs(\"SDSS DR9\")\n", "for catalog_ID, catalog in catalog_list_sdss.items():\n", " print(catalog_ID, \": \", catalog.description)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We want to get data from the catalogue called `V/139`. As before let's have a look at a few rows (per default `Vizier.get_catalogs` gives you 50 rows) of the code to figure out, which ones are most interesting for us." ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "scrolled": true, "tags": [ "output_scroll" ] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "TableList with 1 tables:\n", "\t'0:V/139/sdss9' with 21 column(s) and 50 row(s) \n" ] }, { "data": { "text/html": [ "
Table length=50\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
modeq_modeclSDSS9m_SDSS9ImRA_ICRSDE_ICRSObsDateQumage_umaggmage_gmagrmage_rmagimage_imagzmage_zmagzsp
degdegyrmagmagmagmagmagmagmagmagmagmag
uint8str1uint8str19str1str2float64float64float64uint8float32float32float32float32float32float32float32float32float32float32float64
26J025955.29+000252.0*Im44.9803860.0477792003.8093323.4500.58022.3450.10121.9480.10422.0440.16321.4740.404--
23J025956.07+000300.0*Im44.9836490.0500161998.8264324.4321.37424.2660.62722.8590.31421.2400.11921.0320.430--
23J025956.06+000259.9*Im44.9836190.0499952002.7581325.9640.60124.0820.48923.2500.41521.6660.14620.3460.189--
23J025956.06+000259.7*Im44.9836180.0499402003.7384325.5930.78324.3450.56722.3580.17421.1240.08420.9420.310--
23J025956.06+000259.9*Im44.9836160.0499762001.7179323.0970.81823.9540.72121.8390.18820.8270.10220.1390.238--
23J025956.06+000259.9*Im44.9836140.0499842007.8858325.5341.70524.4581.28223.1560.45121.5220.11920.8110.229--
23J025956.06+000259.9*Im44.9836070.0499852002.8508324.4031.15223.3700.27322.7220.26121.4450.14820.5300.285--
23J025956.06+000259.9*Im44.9836060.0499811998.7254323.4210.46224.4300.47222.8500.20621.5120.09121.0220.241--
26J025956.06+000300.0*Im44.9835960.0500262003.9076325.9920.68624.3750.76222.5270.22521.5200.12020.6650.249--
...............................................................
23J025953.59+000242.0Im44.9733160.0450012008.0006325.3460.92924.3080.65822.1730.15521.5770.14520.7210.197--
23J025953.59+000241.9*Im44.9733040.0449762002.8318325.5380.71323.7130.31422.1730.12821.5000.10421.0930.306--
23J025953.60+000242.0Im44.9733500.0450042007.8858322.1520.53223.8010.93922.1740.22021.5270.13521.1100.331--
23J025953.59+000241.9*Im44.9732940.0449972003.9076325.2011.36422.8890.28221.8430.15121.1680.10821.2480.493--
23J025953.59+000241.9*Im44.9732910.0449811998.8837322.8880.40023.1200.24021.7580.12421.3150.13621.4430.637--
23J025953.58+000241.8*Im44.9732860.0449462001.7179323.6540.89223.5920.38922.2940.20121.4240.12122.1250.781--
1+3J025953.58+000241.9Im44.9732840.0449732003.8857323.5190.52923.6500.29822.1820.12321.5910.11221.8920.522--
23J025953.58+000241.9*Im44.9732740.0449922003.8093322.8610.44523.3910.29121.8860.12821.5640.13821.3150.452--
23J025953.58+000241.9*Im44.9732740.0449862001.8653324.4421.26323.4050.30721.9290.13721.1420.10021.1220.373--
23J025952.90+000248.4Im44.9704150.0467852002.8318326.3850.52224.0030.53822.3350.22122.7230.44421.6060.667--
" ], "text/plain": [ "\n", " mode q_mode cl SDSS9 ... e_imag zmag e_zmag zsp \n", " ... mag mag mag \n", "uint8 str1 uint8 str19 ... float32 float32 float32 float64\n", "----- ------ ----- ------------------- ... ------- ------- ------- -------\n", " 2 6 J025955.29+000252.0 ... 0.163 21.474 0.404 --\n", " 2 3 J025956.07+000300.0 ... 0.119 21.032 0.430 --\n", " 2 3 J025956.06+000259.9 ... 0.146 20.346 0.189 --\n", " 2 3 J025956.06+000259.7 ... 0.084 20.942 0.310 --\n", " 2 3 J025956.06+000259.9 ... 0.102 20.139 0.238 --\n", " 2 3 J025956.06+000259.9 ... 0.119 20.811 0.229 --\n", " 2 3 J025956.06+000259.9 ... 0.148 20.530 0.285 --\n", " 2 3 J025956.06+000259.9 ... 0.091 21.022 0.241 --\n", " 2 6 J025956.06+000300.0 ... 0.120 20.665 0.249 --\n", " ... ... ... ... ... ... ... ... ...\n", " 2 3 J025953.59+000242.0 ... 0.145 20.721 0.197 --\n", " 2 3 J025953.59+000241.9 ... 0.104 21.093 0.306 --\n", " 2 3 J025953.60+000242.0 ... 0.135 21.110 0.331 --\n", " 2 3 J025953.59+000241.9 ... 0.108 21.248 0.493 --\n", " 2 3 J025953.59+000241.9 ... 0.136 21.443 0.637 --\n", " 2 3 J025953.58+000241.8 ... 0.121 22.125 0.781 --\n", " 1 + 3 J025953.58+000241.9 ... 0.112 21.892 0.522 --\n", " 2 3 J025953.58+000241.9 ... 0.138 21.315 0.452 --\n", " 2 3 J025953.58+000241.9 ... 0.100 21.122 0.373 --\n", " 2 3 J025952.90+000248.4 ... 0.444 21.606 0.667 --" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "test_sdss = Vizier.get_catalogs(\"V/139\")\n", "print(test_sdss)\n", "test_sdss[0]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Again we want to get the coordinates of the source as well as magnitudes at all five SDSS bands (u, g, r, i and z), and a classification (cl). Do restrict the query to returning these columns and to get more than 50 rows returned, we create a custom `Vizier` object and then use this object to again query within 14arcmin of RA=08h30m00s, Dec=01d30m00s." ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "TableList with 1 tables:\n", "\t'0:V/139/sdss9' with 8 column(s) and 12405 row(s) " ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "custom_vizier = Vizier(\n", " row_limit=-1,\n", " columns=[\"RA_ICRS\", \"DE_ICRS\", \"umag\", \"gmag\", \"rmag\", \"imag\", \"zmag\", \"cl\"],\n", ")\n", "coord = SkyCoord(ra=\"08:30:00\", dec=\"01:30:00\", unit=(u.hourangle, u.deg))\n", "sdss_results = custom_vizier.query_region(coord, radius=14 * u.arcmin, catalog=\"V/139\")\n", "sdss_results" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "So we have one table in the resulting lists of tables. It is called `V/139/sdss9`. Let's have a look at it:" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "scrolled": true, "tags": [ "output_scroll" ] }, "outputs": [ { "data": { "text/html": [ "
Table length=12405\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
RA_ICRSDE_ICRSumaggmagrmagimagzmagcl
degdegmagmagmagmagmag
float64float64float32float32float32float32float32uint8
127.2673661.51293021.85319.73218.87018.56418.3796
127.2673721.51292822.25019.69718.85518.56818.3066
127.2673721.51292822.04719.75118.87918.54918.3836
127.2677271.49587322.87922.22321.49221.12220.8723
127.2677541.49593322.97222.43121.46521.16221.0093
127.2678311.50000523.81624.46222.47020.75420.0336
127.2678361.49594722.63822.05121.04520.62720.7853
127.2678531.49996124.52724.69022.38120.67020.0166
127.2679551.49993224.33224.99623.05620.64919.9766
........................
127.7210861.45495225.20622.51821.18020.00319.2206
127.7210921.45494224.14122.40221.29919.98619.3886
127.7211061.45491525.32122.68821.17920.00119.1856
127.7211351.43342124.96523.10221.84821.40820.7906
127.7212941.42870423.00822.73122.15521.61022.7933
127.7217701.43171724.91422.57521.11320.43820.0196
127.7218571.45146922.93322.36521.47221.92320.8953
127.7225341.45552423.44223.37822.51822.91821.8663
127.7226351.43361224.81323.99422.45321.17320.7983
127.7226721.45576522.96125.75222.95022.00323.0706
" ], "text/plain": [ "\n", " RA_ICRS DE_ICRS umag gmag rmag imag zmag cl \n", " deg deg mag mag mag mag mag \n", " float64 float64 float32 float32 float32 float32 float32 uint8\n", "---------- ---------- ------- ------- ------- ------- ------- -----\n", "127.267366 1.512930 21.853 19.732 18.870 18.564 18.379 6\n", "127.267372 1.512928 22.250 19.697 18.855 18.568 18.306 6\n", "127.267372 1.512928 22.047 19.751 18.879 18.549 18.383 6\n", "127.267727 1.495873 22.879 22.223 21.492 21.122 20.872 3\n", "127.267754 1.495933 22.972 22.431 21.465 21.162 21.009 3\n", "127.267831 1.500005 23.816 24.462 22.470 20.754 20.033 6\n", "127.267836 1.495947 22.638 22.051 21.045 20.627 20.785 3\n", "127.267853 1.499961 24.527 24.690 22.381 20.670 20.016 6\n", "127.267955 1.499932 24.332 24.996 23.056 20.649 19.976 6\n", " ... ... ... ... ... ... ... ...\n", "127.721086 1.454952 25.206 22.518 21.180 20.003 19.220 6\n", "127.721092 1.454942 24.141 22.402 21.299 19.986 19.388 6\n", "127.721106 1.454915 25.321 22.688 21.179 20.001 19.185 6\n", "127.721135 1.433421 24.965 23.102 21.848 21.408 20.790 6\n", "127.721294 1.428704 23.008 22.731 22.155 21.610 22.793 3\n", "127.721770 1.431717 24.914 22.575 21.113 20.438 20.019 6\n", "127.721857 1.451469 22.933 22.365 21.472 21.923 20.895 3\n", "127.722534 1.455524 23.442 23.378 22.518 22.918 21.866 3\n", "127.722635 1.433612 24.813 23.994 22.453 21.173 20.798 3\n", "127.722672 1.455765 22.961 25.752 22.950 22.003 23.070 6" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sdss_results[0]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Step #2: Cross-matching\n", "\n", "\n", "[![Xmatch](https://custom-icon-badges.demolab.com/badge/Xmatch-gray.svg?logo=xmatch&logoColor=blue&logoWidth=20)](http://cdsxmatch.u-strasbg.fr/ \"http://cdsxmatch.u-strasbg.fr/\")\n", "\n", "In this next step, we find common sources in the 2MASS-PSC and SDSS-DR9 catalogues. One simple way to do this using the CDS XMatch service, which can also be reached with `astroquery`. The most reliable way to quuery XMatch is by uploading one of the tables (which will also make sure we stay in our region of interest) and crossmatching it to a table available in VizieR. " ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [], "source": [ "mass_psc.write(\"Data/2MASS_PSC.vot\", format=\"votable\", overwrite=True)\n", "sdss_results[0].write(\"Data/SDSS_DR9.vot\", format=\"votable\", overwrite=True)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "scrolled": true, "tags": [ "output_scroll" ] }, "outputs": [ { "data": { "text/html": [ "
Table length=717\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
angDistRAJ2000DEJ2000errMajerrMinerrPA2MASSJmagJcmsige_JmagJsnrHmagHcmsige_HmagHsnrKmagKcmsige_KmagKsnrQflgRflgBflgCflgNdetproxpxPApxCntrXflgAflgCntrHemisDateScanGLONGLATXscanJDJpsfchiHpsfchiKpsfchiJstdape_JstdapHstdape_HstdapKstdape_KstdapedgeNSedgeEWedgedupuseoptDoptPAoptBmagRmagNoptextKeyscanKeycoaddKeycoaddSDSS9RAdegDEdegerrHalfMajerrHalfMinerrPosAngumaggmagrmagimagzmage_umage_gmage_rmage_image_zmagobjIDclq_modeflagsQObsDatepmRAe_pmRApmDEe_pmDESpObjIDzspe_zspf_zspspTypespClsubClass
float64float64float64float64float64int64str16float64float64float64float64float64float64float64float64float64float64float64float64str3int64int64str3int64float64int64int64int64int64int64str1str10int64float64float64float64float64float64float64float64float64float64float64float64float64float64int64int64str2int64int64str1float64int64float64float64int64int64int64int64int64str19float64float64float64float64int64float64float64float64float64float64float64float64float64float64float64int64int64int64str16int64float64int64int64int64int64int64int64int64int64int64int64int64
0.352101127.5091541.2691730.20.158708300219+011609015.9630.0950.09612.515.5460.1210.1229.014.930.1440.1448.1ABB22211100016060614.234080404058900804040599s2000-01-3058223.55422.408178.52451573.68150.891.010.9215.9390.23515.8990.31914.690.124458974sw010--------0--439561010984221J083002.21+011608.9127.5092481.2691460.010.0099023.71220.87619.40218.06817.3380.670.0340.0150.0090.015123765366471216390861000020101000011032000.9155-535-4350------------
0.152435127.5077791.2728750.120.118608300186+011622315.5940.0830.08417.615.5630.1170.1178.915.2720.1810.1825.9ABC22211100036060614.216080404059900804040589s2000-01-3058223.5522.408183.42451573.68141.640.821.4715.4320.15315.810.42414.9920.114460269sw01U0.227017.116.51--439561010984221J083001.86+011622.2127.5077491.2728450.0020.0029018.39417.21316.80616.67416.6230.0140.0040.0040.0050.01123765366471216335861000000101000000032000.9155-33230------------
0.217574127.5141671.2774950.230.215108300340+011638916.5530.170.1717.316.1790.1940.1945.015.894------CCU2201100006060028.423480404058900804040577s2000-01-3058223.54922.416160.42451573.68140.691.58--16.3350.13918.0143.36----461992sw01U0.01318.017.31--439561010984221J083003.39+011638.8127.5141291.2774480.0030.0039019.51318.18917.71417.55917.4850.0280.0060.0060.0070.016123765366471216374161000000101000000032000.915523130------------
0.048922127.4632511.2719030.070.07008295118+011618815.8440.0760.07714.015.110.0950.09613.515.0290.1380.1387.4AAB22211100026060641.016080401955900804019587s2000-01-3057223.52822.369-87.92451573.67391.780.81.1415.9350.23815.0770.16415.1970.4384593164se01U1.028120.018.41--43955101094756J082951.17+011618.8127.4632381.2719070.0050.0059021.97619.79418.38617.5417.0480.1760.0160.0080.0070.012123765366471209829061000000101000000032000.9155-194840------------
0.023156127.4630231.28640.060.06008295112+011711014.0930.0290.03270.013.6520.0330.03551.713.5530.0420.04328.9AAA22211100066663552.217980401958700804019616s2000-01-3057223.51422.376-87.02451573.6740.750.970.9114.0770.02313.5760.0513.6920.144646165se01U0.416016.314.61--43955101094756J082951.12+011711.0127.4630181.2863960.0010.0019017.22315.79615.25915.07414.9930.0080.0030.0030.0030.005123765366471209801561000020109002001032000.915553-530------------
0.102852127.484651.2711920.060.06008295631+011616213.8480.0260.02987.813.1770.020.02280.012.9320.0230.02451.1AAA22211100066665515.71280401960000804019585s2000-01-3057223.5422.387-164.92451573.67390.880.870.9513.8130.04213.1430.05113.0090.056459187se01U0.224418.816.71--43955101094756J082956.31+011616.3127.4846251.2712060.0020.0029021.01118.35916.95915.81415.1690.0810.0070.0040.0040.005123765366471209832461000000101000000032000.9155-33430------------
0.385255127.4855651.2754560.20.17408295653+011631616.260.1120.1129.515.9080.1720.1726.515.2640.1840.1846.0BCC22211100016060615.719280401958500804019600s2000-01-3057223.53622.39-168.22451573.6740.841.30.816.1250.29115.5290.25315.210.246460684se01U0.423218.117.41--43955101094756J082956.55+011631.7127.4856641.2754970.0030.0039020.24518.3417.58417.34317.1850.0460.0070.0050.0060.013123765366471209832861000000101000000032000.915553230------------
0.18744127.4943391.2807340.150.1514508295864+011650616.3170.1190.129.015.8180.1410.1417.015.099------BBU2201100006060036.923980401960000804019605s2000-01-3057223.53622.4-199.82451573.6740.961.62--16.2640.08816.2190.553----462552se110--------0--43955101094756J082958.64+011650.4127.4943411.2806820.0090.0089022.54520.67319.20218.18417.5860.2750.0290.0130.0090.017123765366471209841161000090101002000032000.915575-650------------
0.038231127.4946451.2962040.070.071708295871+011746315.250.050.05124.115.0620.0770.07814.114.870.1140.1148.6AAB22211100066050647.129980401965200804019639s2000-01-3057223.52122.408-200.92451573.6740.980.891.0115.1780.06415.1950.30214.7790.326468151se11U0.418516.816.11--43955101094756J082958.71+011746.3127.4946381.2962120.0020.0019017.96816.73716.30416.18216.1070.0120.0040.0040.0040.007123765366471209807561000020101002101032000.915513-630------------
0.125123127.4832471.3026280.060.06008295597+011809413.4840.0250.027122.712.8620.020.022106.912.8070.0330.03457.4AAA22211100066555527.931480401966700804019652s2000-01-3057223.50922.401-159.82451573.6741.060.71.113.4570.02712.8750.0612.7770.069470492se01U2.019516.314.51--43955101094756J082955.98+011809.3127.4832541.3025940.0010.0019017.95615.89615.03514.72714.5110.0120.0030.0030.0030.004123765366471209803661000020109002001032000.9155-93-4130------------
..........................................................................................................................................................................................................................................................................................
0.231895127.4717491.6999810.150.1514508295321+014159916.2780.120.1219.415.6460.1380.1388.215.792------BBU2201100006060021.511180402053600804020539s2000-01-3057223.12722.583-118.52451573.67430.820.93--16.1580.1215.6660.136----6134134se01U0.517818.217.11--43955101094980J082953.20+014159.8127.4716861.6999680.0030.0039019.80118.2517.64817.44517.2920.0340.0060.0060.0060.015123765366524896917261000000101000000032000.915503-630------------
0.108018127.4854721.7016310.070.071708295651+014205815.2860.0470.04923.314.8050.0690.06917.914.590.1020.10211.1AAA22211100036150632.424580402053600804020544s2000-01-3057223.13222.596-167.82451573.67431.031.11.0215.410.10714.790.12714.3310.225614084se01U0.522717.916.61--43955101094980J082956.51+014205.7127.4854831.7016030.0020.0029019.85617.7316.8616.54116.350.0360.0050.0040.0040.009123765366524903455861000000101002000032000.9155-43-430------------
0.033205127.502331.7075680.060.069008300055+014227213.4420.0230.026127.512.8370.0240.026109.412.6520.0290.0366.2AAA22211100066665524.117380403960000804039583s2000-01-3058223.13522.614203.02451573.68111.130.791.513.4830.01812.9130.02912.710.045616750sw11U1.126217.215.11--439561010982198J083000.56+014227.2127.5023321.7075590.0010.0019019.46116.82915.52414.97614.6920.0270.0040.0040.0030.005123765366524903458661000020101002001032000.9155-223130------------
0.127126127.4694231.713720.120.1110108295266+014249316.1240.0970.09810.815.4080.1010.10210.315.340.1860.1865.6AAC2221110006060650.217080402053900804020569s2000-01-3057223.11222.588-110.12451573.67430.990.990.9316.2560.26915.9290.34715.5740.3286184142se010--------0--43955101094980J082952.66+014249.2127.4694181.7136850.0090.0089023.47220.75519.28318.18117.5030.5940.0290.0140.0090.017123765366524896926361000000101000010032000.9155-135350------------
0.029366127.4519481.7212050.060.06008294846+014316312.4590.0190.023315.412.0560.0240.026224.711.9690.0230.024124.1AAA22211100066666648.419280402055900804020588s2000-01-3057223.09622.576-47.22451573.67430.740.740.8612.470.01912.0380.04611.9730.0296211205se01U1.317614.813.51--43955101094980J082948.46+014316.3127.4519551.7212010.0470.0429016.12514.4713.78513.75513.4930.0060.0030.0060.0020.0041237653665248968970600000B8109206101032000.915523-2430------------
0.475815127.3954741.697110.340.328808293491+014149516.5510.1640.1647.315.9070.2070.2076.515.7950.2740.2753.7CED2221110006050653.733880402056600804020535s2000-01-3057223.08922.515156.02451573.67430.8510.930.7216.4610.21616.10.26816.1460.828612597sw010--------0--43955101094980J082934.93+014149.9127.3955661.6972050.0170.0169023.31621.50620.04118.67617.9020.5570.0540.0240.0130.0231237653665248969283610100F0101002101032000.9155--------0------------
0.063468127.4322921.7171160.070.069608294375+014301614.5690.0320.03545.214.2990.0550.05628.514.2190.0840.08415.6AAA22211100066561422.81480402059300804020581s2000-01-3057223.0922.55723.52451573.67430.91.150.6514.5520.0514.1720.08614.2250.2296197229sw01U0.319816.415.31--43955101094980J082943.75+014301.6127.4323091.7171210.0010.0019017.45316.13715.68315.53215.4690.0090.0030.0040.0040.006123765366524896892461000000101002020032000.915513-130------------
0.078846127.4338571.7232630.070.071708294412+014323715.6780.080.08116.315.2070.1050.10512.314.9650.1380.1387.9AAB222111ccc6656164.531780402059600804020593s2000-01-3057223.08522.56117.92451573.67431.140.831.2214.5170.09714.0720.11214.1790.1446219235sw01U4.013915.814.41--43955101094980J082944.13+014323.7127.4338771.7232720.0070.0079023.80220.41119.03917.72817.0180.7430.0240.0120.0070.0131237653665248968930610000B0181202101032000.9155--------0------------
0.036173127.5319021.7297570.060.069008300765+014347114.1550.0330.03666.113.840.0320.03343.413.8060.0480.04922.9AAA22211100066664614.18280403953900804039541s2000-01-3058223.1322.6596.62451573.68111.030.881.0114.1360.05113.9720.04813.850.1186247156sw01U0.223015.815.01--439561010982198J083007.65+014347.1127.5319081.7297490.0010.0019017.14515.74115.24615.07915.0390.0080.0030.0030.0030.005123765366524903433261000000101002000032000.9155-33130------------
0.676936127.535771.7302930.370.354508300858+014349017.0470.2310.2314.616.1230.190.195.315.8720.3020.3033.4DCD2221110006060514.126280403954100804039539s2000-01-3058223.13122.65482.72451573.68110.950.740.9816.5370.39917.5291.51516.040.7056249170sw010--------0--439561010982198J083008.62+014348.6127.5359211.7301810.0230.029023.84721.89520.46219.03418.3550.7560.0750.0320.0170.032123765366524903508361000000101000010032000.9155--------0------------
" ], "text/plain": [ "\n", "angDist RAJ2000 DEJ2000 errMaj errMin ... f_zsp spType spCl subClass\n", "float64 float64 float64 float64 float64 ... int64 int64 int64 int64 \n", "-------- ---------- -------- ------- ------- ... ----- ------ ----- --------\n", "0.352101 127.509154 1.269173 0.2 0.15 ... -- -- -- --\n", "0.152435 127.507779 1.272875 0.12 0.11 ... -- -- -- --\n", "0.217574 127.514167 1.277495 0.23 0.21 ... -- -- -- --\n", "0.048922 127.463251 1.271903 0.07 0.07 ... -- -- -- --\n", "0.023156 127.463023 1.2864 0.06 0.06 ... -- -- -- --\n", "0.102852 127.48465 1.271192 0.06 0.06 ... -- -- -- --\n", "0.385255 127.485565 1.275456 0.2 0.17 ... -- -- -- --\n", " 0.18744 127.494339 1.280734 0.15 0.15 ... -- -- -- --\n", "0.038231 127.494645 1.296204 0.07 0.07 ... -- -- -- --\n", "0.125123 127.483247 1.302628 0.06 0.06 ... -- -- -- --\n", " ... ... ... ... ... ... ... ... ... ...\n", "0.231895 127.471749 1.699981 0.15 0.15 ... -- -- -- --\n", "0.108018 127.485472 1.701631 0.07 0.07 ... -- -- -- --\n", "0.033205 127.50233 1.707568 0.06 0.06 ... -- -- -- --\n", "0.127126 127.469423 1.71372 0.12 0.11 ... -- -- -- --\n", "0.029366 127.451948 1.721205 0.06 0.06 ... -- -- -- --\n", "0.475815 127.395474 1.69711 0.34 0.32 ... -- -- -- --\n", "0.063468 127.432292 1.717116 0.07 0.06 ... -- -- -- --\n", "0.078846 127.433857 1.723263 0.07 0.07 ... -- -- -- --\n", "0.036173 127.531902 1.729757 0.06 0.06 ... -- -- -- --\n", "0.676936 127.53577 1.730293 0.37 0.35 ... -- -- -- --" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "sdss_mass = XMatch.query(\n", " cat1=Path(\"Data/2MASS_PSC.vot\").open(),\n", " cat2=\"vizier:V/139/sdss9\",\n", " max_distance=4 * u.arcsec,\n", " colRA1=\"RAJ2000\",\n", " colDec1=\"DEJ2000\",\n", ")\n", "sdss_mass" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For the SDSS DR9 table this action has given us all the columns. So before we move on, we restrict the table to the columns, we are actually interested in. " ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "We are currently working with 717 sources\n" ] } ], "source": [ "sdss_mass = sdss_mass[\n", " \"2MASS\",\n", " \"RAJ2000\",\n", " \"DEJ2000\",\n", " \"Jmag\",\n", " \"Hmag\",\n", " \"Kmag\",\n", " \"SDSS9\",\n", " \"RAdeg\",\n", " \"DEdeg\",\n", " \"umag\",\n", " \"gmag\",\n", " \"rmag\",\n", " \"imag\",\n", " \"zmag\",\n", " \"cl\",\n", "]\n", "\n", "print(f\"We are currently working with {len(sdss_mass)} sources\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Step #3: Filtering\n", "In this step we select all those sources from our cross-matched catalogue that have colours and fluxes as expected for brown dwarfs. \n", "\n", "The selection cirteria for Brown Dwarfs are:\n", " - `umag > 22.0` --> magnitude in u-band fainter than 22.0mag\n", " - `gmag > 22.2` --> magnitude in g-band fainter than 22.2mag\n", " - `Jmag - Hmag < 0.3` --> J-H band colour smaller than 0.3mag\n", " - `Hmag - Kmag < 0.3` --> H-K band colour smaller than 0.3mag\n", "\n", "We now apply these selection criteria to our table of point sources. " ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "We have 2 candidates for Brown Dwarfs\n" ] } ], "source": [ "# Add columsn with J-H and H-K colour\n", "sdss_mass[\"J-H\"] = sdss_mass[\"Jmag\"] - sdss_mass[\"Hmag\"]\n", "sdss_mass[\"H-K\"] = sdss_mass[\"Hmag\"] - sdss_mass[\"Kmag\"]\n", "# Limit sources to those that fulfil the selection criteria\n", "index_bd = (\n", " (sdss_mass[\"umag\"] > 22.0)\n", " & (sdss_mass[\"gmag\"] > 22.2)\n", " & (sdss_mass[\"J-H\"] < 0.3)\n", " & (sdss_mass[\"H-K\"] < 0.3)\n", ")\n", "candidates = sdss_mass[index_bd]\n", "print(f\"We have {len(candidates)} candidates for Brown Dwarfs\")" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "tags": [ "output_scroll" ] }, "outputs": [ { "data": { "text/html": [ "
Table length=2\n", "
\n", "\n", "\n", "\n", "\n", "
2MASSRAJ2000DEJ2000JmagHmagKmagSDSS9RAdegDEdegumaggmagrmagimagzmagclJ-HH-K
str16float64float64float64float64float64str19float64float64float64float64float64float64float64int64float64float64
08304878+0128311127.7032651.4753216.28916.1416.358J083048.81+012831.0127.7033771.47529325.32224.51425.49225.87819.40130.1490000000000009-0.21799999999999997
08304512+0134404127.6880071.57790116.1816.02115.769J083045.23+013443.5127.6884911.57875924.00422.29921.0320.47820.5360.158999999999998920.25200000000000067
" ], "text/plain": [ "\n", " 2MASS RAJ2000 ... J-H H-K \n", " str16 float64 ... float64 float64 \n", "---------------- ---------- ... ------------------- --------------------\n", "08304878+0128311 127.703265 ... 0.1490000000000009 -0.21799999999999997\n", "08304512+0134404 127.688007 ... 0.15899999999999892 0.25200000000000067" ] }, "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ "candidates" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Note that we are using slightly different selection criteria here in the notebook than in the original tutorial. The reason is the following. The CDS XMatch service uses VizieR tables with their default filtering. For the SDSS DR 9 table, VizieR will filter to only use primary sources and disregard secondary sources, which is not the case when downloading the VizieR table with e.g. TOPCAT. Now the primary SDSS source for this brown dwarf is classified as an extended source by the automated SDSS pipeline, probably because it is hardly detected and very faint. So if we remove all extended sources we also throw away the target of our studies. Hence, the filtering in this notebook is less strict to allow \n", "\n", "## Step #4: Verification of the Brown Dwarf candidates\n", "\n", "### Visualization\n", "\n", "[![Aladin](https://custom-icon-badges.demolab.com/badge/Aladin-gray.svg?logo=aladin&logoColor=purple&logoWidth=20)](https://aladin.cds.unistra.fr/aladin.gml \"https://aladin.cds.unistra.fr/aladin.gml\")\n", "\n", "The ipyaladin package allows to run an instance of Aladin Lite in your Jupyter notebook. " ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "d517cd3f0b6b46838a030036c4fa0802", "version_major": 2, "version_minor": 0 }, "text/plain": [ "Aladin(fov=0.03, options=['allow_full_zoomout', 'coo_frame', 'fov', 'full_screen', 'log', 'overlay_survey', 'o…" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "aladin1 = Aladin(\n", " survey=\"P/SDSS9/color\",\n", " fov=0.03,\n", " target=\"{:.4f} {:.4f}\".format(candidates[\"RAJ2000\"][0], candidates[\"DEJ2000\"][0]),\n", ")\n", "aladin1" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As with any instance of Aladin Lite you can zoom in and out by scrolling your mouse. In the top left corner of the widget, you may chose which survey to look at, add layers, search for sources, ... \n", "\n", "You can also add tables to the widget by:" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [], "source": [ "aladin1.add_table(candidates)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If you now click on the small square indicating the location of the source, the widget will show the corresponding table values in the lower part of the widget. \n", "\n", "As you can see at one of the locations hardly anything is visible and at the location of the other brown dwarf candidate, there is a bright star. To further investigate these two sources, we now query Simbad for them. \n", "\n", "### Check in Simbad\n", "\n", "[![Simbad](https://custom-icon-badges.demolab.com/badge/Simbad-gray.svg?logo=simbad&logoColor=lightblue&logoWidth=20)](https://simbad.u-strasbg.fr/simbad/ \"https://simbad.u-strasbg.fr/simbad/\")\n", "\n", "In the Simbad database, an object type is assigned to every entry. So if this Brown Dwarf candidate is in the Simbad database, we might learn more about the object type:" ] }, { "cell_type": "code", "execution_count": 17, "metadata": { "tags": [ "output_scroll" ] }, "outputs": [ { "data": { "text/html": [ "
Table length=1\n", "
\n", "\n", "\n", "\n", "\n", "
MAIN_IDRA_2_A_ICRS_J2000_2000DEC_2_D_ICRS_J2000_2000OTYPESCRIPT_NUMBER_ID
"h:m:s""d:m:s"
objectstr13str13objectint32
2MASS J08304878+012831108 30 48.7836+01 28 31.152BrownD*1
" ], "text/plain": [ "\n", " MAIN_ID RA_2_A_ICRS_J2000_2000 ... OTYPE SCRIPT_NUMBER_ID\n", " \"h:m:s\" ... \n", " object str13 ... object int32 \n", "----------------------- ---------------------- ... ------- ----------------\n", "2MASS J08304878+0128311 08 30 48.7836 ... BrownD* 1" ] }, "execution_count": 17, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# First candidate has an index 0\n", "customSimbad = Simbad()\n", "customSimbad.remove_votable_fields(\"coordinates\")\n", "customSimbad.add_votable_fields(\n", " \"ra(2;A;ICRS;J2000;2000)\",\n", " \"dec(2;D;ICRS;J2000;2000)\",\n", " \"otype\",\n", ")\n", "candidate_coord = SkyCoord(\n", " ra=candidates[\"RAJ2000\"][0],\n", " dec=candidates[\"DEJ2000\"][0],\n", " unit=u.deg,\n", ")\n", "candidate_simbad = customSimbad.query_region(candidate_coord, radius=10 * u.arcsec)\n", "candidate_simbad" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "/home/manon.marchand/miniconda3/envs/cds-tutos/lib/python3.10/site-packages/astroquery/simbad/core.py:135: UserWarning: Warning: The script line number 3 raised an error (recorded in the `errors` attribute of the result table): '8:30:45.12168 +1:34:40.4436': No astronomical object found :\n", " warnings.warn(\"Warning: The script line number %i raised \"\n" ] } ], "source": [ "# First candidate has an index 1\n", "customSimbad = Simbad()\n", "customSimbad.remove_votable_fields(\"coordinates\")\n", "customSimbad.add_votable_fields(\n", " \"ra(2;A;ICRS;J2000;2000)\",\n", " \"dec(2;D;ICRS;J2000;2000)\",\n", " \"otype\",\n", ")\n", "candidate_coord = SkyCoord(\n", " ra=candidates[\"RAJ2000\"][1],\n", " dec=candidates[\"DEJ2000\"][1],\n", " unit=u.deg,\n", ")\n", "candidate_simbad = customSimbad.query_region(candidate_coord, radius=1 * u.arcmin)\n", "candidate_simbad" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Indeed the first candidate is classified as a brown dwarf. Within 10arcsec of the second source, no entry is found in Simbad although this is the brighter star. The reason for this might be the following: sources in Simbad are sources that have individually been discussed in the literature. If no papers have been published specifcially about this object, it will not appear in Simbad. However, as the object was included in the SDSS tables it is included in VizieR through the table it belongs to. \n", "\n", "If we now want to see, in which papers the Brown Dwarf 2MASS J08304878+0128311 was included, we may use the following query in Simbad." ] }, { "cell_type": "code", "execution_count": 19, "metadata": { "scrolled": true, "tags": [ "output_scroll" ] }, "outputs": [ { "data": { "text/html": [ "
Table length=20\n", "
\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "\n", "
bibcodejournaltitleyearvolumePagesdoi
objectobjectobjectint16int32objectobject
2020AJ....159..257BAJThe Hawaii infrared parallax program. IV. A comprehensive parallax survey of L0-T8 dwarfs with UKIRT.2020159257-25710.3847/1538-3881/ab84f4
2016ApJ...827...25BApJThe orbit of the L dwarf + T dwarf spectral binary SDSS J080531.84+481233.0.201682725-2510.3847/0004-637X/827/1/25
2016A&A...589A..49SA&APhotometric brown-dwarf classification. II. A homogeneous sample of 1361 L and T dwarfs brighter than J = 17.5 with accurate spectral types.201658949-4910.1051/0004-6361/201527359
2016ApJ...817..112SApJA proper motion survey using the first sky pass of NEOWISE-reactivation data.201681710.3847/0004-637X/817/2/112
2015ApJ...810..158FApJFundamental parameters and spectral energy distributions of young and field age objects with masses spanning the stellar to planetary regime.201581010.1088/0004-637X/810/2/158
2014ApJ...793...75RApJStrong brightness variations signal cloudy-to-clear transition of brown dwarfs.201479310.1088/0004-637X/793/2/75
2013MNRAS.433.2054SMNRASNPARSEC: NTT Parallaxes of Southern Extremely Cool objects. Goals, targets, procedures and first results.20134332054-206310.1093/mnras/stt876
2013MNRAS.433..457BMNRAS76 T dwarfs from the UKIDSS LAS: benchmarks, kinematics and an updated space density.2013433457-49710.1093/mnras/stt740
2012ApJ...752...56FApJThe Brown Dwarf Kinematics Project (BDKP). III. Parallaxes for 70 ultracool dwarfs.201275210.1088/0004-637X/752/1/56
2012ApJ...748...74LApJThe properties of the 500 K dwarf UGPS J072227.51-054031.2 and a study of the far-red flux of cold brown dwarfs.201274810.1088/0004-637X/748/2/74
2012ApJ...757..110BApJDiscovery of a very low mass triple with late-M and T dwarf components: LP 704-48/SDSS J0006-0852AB.201275710.1088/0004-637X/757/2/110
2011ApJS..197...19KApJSThe first hundred brown dwarfs discovered by the Wide-field Infrared Survey Explorer (WISE).201119710.1088/0067-0049/197/2/19
2010A&A...515A..92SA&AHip 63510C, Hip 73786B, and nine new isolated high proper motion T dwarf candidates from UKIDSS DR6 and SDSS DR7.201051592-9210.1051/0004-6361/201014264
2010ApJ...710.1142BApJSpeX spectroscopy of unresolved very low mass binaries. I. Identification of 17 candidate binaries straddling the L dwarf/T dwarf transition.20107101142-116910.1088/0004-637X/710/2/1142
2009yCat....1.2023SyCatCatalogue of stellar spectral classifications.20091
2009AJ....137....1FAJThe brown dwarf kinematics project I. Proper motions and tangential velocities for a large sample of late-type M, L, and T dwarfs.20091371-1810.1088/0004-6256/137/1/1
2008ApJ...676.1281MApJA cross-match of 2MASS and SDSS: newly found L and T dwarfs and an estimate of the space density of T dwarfs.20086761281-130610.1086/524721
2008MNRAS.390.1517CMNRASProper motions of field L and T dwarfs - II.20083901517-152610.1111/j.1365-2966.2008.13855.x
2006ApJ...637.1067BApJA unified near-infrared spectral classification scheme for T dwarfs.20066371067-109310.1086/498563
2004AJ....127.3553KAJNear-infrared photometry and spectroscopy of L and T dwarfs: the effects of temperature, clouds, and gravity.20041273553-357810.1086/420707
" ], "text/plain": [ "\n", " bibcode journal ... Pages doi \n", " object object ... object object \n", "------------------- ------- ... --------- --------------------------------\n", "2020AJ....159..257B AJ ... 257-257 10.3847/1538-3881/ab84f4\n", "2016ApJ...827...25B ApJ ... 25-25 10.3847/0004-637X/827/1/25\n", "2016A&A...589A..49S A&A ... 49-49 10.1051/0004-6361/201527359\n", "2016ApJ...817..112S ApJ ... 10.3847/0004-637X/817/2/112\n", "2015ApJ...810..158F ApJ ... 10.1088/0004-637X/810/2/158\n", "2014ApJ...793...75R ApJ ... 10.1088/0004-637X/793/2/75\n", "2013MNRAS.433.2054S MNRAS ... 2054-2063 10.1093/mnras/stt876\n", "2013MNRAS.433..457B MNRAS ... 457-497 10.1093/mnras/stt740\n", "2012ApJ...752...56F ApJ ... 10.1088/0004-637X/752/1/56\n", "2012ApJ...748...74L ApJ ... 10.1088/0004-637X/748/2/74\n", "2012ApJ...757..110B ApJ ... 10.1088/0004-637X/757/2/110\n", "2011ApJS..197...19K ApJS ... 10.1088/0067-0049/197/2/19\n", "2010A&A...515A..92S A&A ... 92-92 10.1051/0004-6361/201014264\n", "2010ApJ...710.1142B ApJ ... 1142-1169 10.1088/0004-637X/710/2/1142\n", "2009yCat....1.2023S yCat ... \n", "2009AJ....137....1F AJ ... 1-18 10.1088/0004-6256/137/1/1\n", "2008ApJ...676.1281M ApJ ... 1281-1306 10.1086/524721\n", "2008MNRAS.390.1517C MNRAS ... 1517-1526 10.1111/j.1365-2966.2008.13855.x\n", "2006ApJ...637.1067B ApJ ... 1067-1093 10.1086/498563\n", "2004AJ....127.3553K AJ ... 3553-3578 10.1086/420707" ] }, "execution_count": 19, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tap_simbad = pyvo.dal.TAPService(\"https://simbad.cds.unistra.fr/simbad/sim-tap\")\n", "\n", "query = \"\"\"\n", "SELECT BIBCode, Journal, Title, \"year\", Volume,\n", " Page || '-' || Last_Page AS \"Pages\", DOI \n", "FROM ref JOIN has_ref ON oidbibref = oidbib \n", " JOIN ident ON has_ref.oidref = ident.oidref \n", "WHERE id = '2MASS J08304878+0128311'\n", "ORDER BY \"year\" DESC; \n", "\"\"\"\n", "\n", "result = tap_simbad.search(query).to_table()\n", "result" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "For further reading you could now go to [ADS](https://ui.adsabs.harvard.edu/ \"https://ui.adsabs.harvard.edu/\") and search for the publications via their bibcode (enter in the search field `bibcode:...`) or their doi (`doi:...`).\n", "\n", "To design similar queries for your own research, have a look at [Simbad database schema](https://simbad.cds.unistra.fr/simbad/tap/tapsearch.html \"https://simbad.cds.unistra.fr/simbad/tap/tapsearch.html\")." ] } ], "metadata": { "kernelspec": { "display_name": "cds-tutos", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.8" }, "vscode": { "interpreter": { "hash": "18fabf4b7284864439f771ae90661426265feb3ce932d65d859d3ebdb8aac045" } } }, "nbformat": 4, "nbformat_minor": 4 }