{
"cells": [
{
"cell_type": "markdown",
"id": "8362de11",
"metadata": {},
"source": [
"# How to Search for Catalog Data and IDs with lksearch"
]
},
{
"cell_type": "markdown",
"id": "7139b45e-0981-48ce-a7c8-f57c27eacddb",
"metadata": {},
"source": [
"`lksearch` enables you to search through the catalogs associated with each mission, and Gaia. You can query:\n",
"\n",
"- The Kepler Input Catalog\n",
"- The Ecliptic Plane Input Catalog\n",
"- The TESS Input Catalog\n",
"- Gaia EDR3.\n",
"\n",
"`lksearch` has three main pieces of functionality - two ways of retrieving data from a catalog, and one for looking up catalog IDs.\n",
"\n",
"These are:\n",
" \n",
"- **A position cone-search** that searches for sources within a given radius from some position using `QueryPosition`\n",
"- **An exact ID lookup**, retrieving catalog rows where the catalog ID matches the search ID using `QueryID`\n",
"- **A way of looking up catalog IDs** given a common name or another catalog ID with `IDLookup`. \n",
"\n",
"`lksearch` also has the ability to crossmatch targets when doing an exact ID lookup between the TIC, KIC, and Gaia EDR3 catalogs because this crossmatch already exists in the TIC. \n",
"\n",
"`lksearch` will propagate the proper motion for you, and can optionally return a SkyCoordinate either directly from the Search or by using the `to_skycoord` property from the results table. \n",
"\n",
"Below are examples of each query."
]
},
{
"cell_type": "markdown",
"id": "b35a1450-2a06-4413-8796-e13fba1e74a8",
"metadata": {},
"source": [
"## Searching by Position"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "9f07ac77",
"metadata": {},
"outputs": [],
"source": [
"from lksearch.catalogsearch import (\n",
" query_region,\n",
" query_id,\n",
" query_names,\n",
" match_names_catalogs,\n",
")\n",
"from astropy.coordinates import SkyCoord\n",
"from astropy.time import Time\n",
"import astropy.units as u"
]
},
{
"cell_type": "markdown",
"id": "889a4743-c6ee-4cea-98ad-012aeaec9975",
"metadata": {},
"source": [
"Before we search we need a sky position to search. `lksearch` catalog queries use `astropy`'s `SkyCoord` as an input. We can either make one ourselves with an RA and Dec, or we can use the built in `from_name` method."
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "f98f6097-1f3e-433b-8337-617978b86b9b",
"metadata": {},
"outputs": [],
"source": [
"c = SkyCoord.from_name(\"Kepler-10\")"
]
},
{
"cell_type": "markdown",
"id": "6a752678-93a8-4848-9365-ff41e54ae094",
"metadata": {},
"source": [
"Now we have a position we want to query, we can query each catalog. For example, here is the query for KIC"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "fd0abec3-8b85-4812-aafb-ca13a94d306c",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" ID | \n",
" RA | \n",
" Dec | \n",
" Separation | \n",
" Relative_Flux | \n",
" pmRA | \n",
" pmDE | \n",
" Kepmag | \n",
" Teff | \n",
" logg | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" KIC 11904151 | \n",
" 285.67938 | \n",
" 50.241299 | \n",
" 0.000000 | \n",
" 1.000000 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 10.961000 | \n",
" 5491 | \n",
" 4.467 | \n",
"
\n",
" \n",
" 1 | \n",
" KIC 11904160 | \n",
" 285.68076 | \n",
" 50.242493 | \n",
" 5.345214 | \n",
" 0.006644 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 16.405001 | \n",
" <NA> | \n",
" NaN | \n",
"
\n",
" \n",
" 2 | \n",
" KIC 11904158 | \n",
" 285.68042 | \n",
" 50.245716 | \n",
" 16.080462 | \n",
" 0.005420 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 16.625999 | \n",
" <NA> | \n",
" NaN | \n",
"
\n",
" \n",
" 3 | \n",
" KIC 11904156 | \n",
" 285.68015 | \n",
" 50.250011 | \n",
" 31.413257 | \n",
" 0.002672 | \n",
" -4.0 | \n",
" 0.0 | \n",
" 17.393999 | \n",
" <NA> | \n",
" NaN | \n",
"
\n",
" \n",
" 4 | \n",
" KIC 11904148 | \n",
" 285.67722 | \n",
" 50.259010 | \n",
" 63.953186 | \n",
" 0.017155 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 15.375000 | \n",
" 5286 | \n",
" 4.640 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" ID RA Dec Separation Relative_Flux pmRA pmDE \\\n",
"0 KIC 11904151 285.67938 50.241299 0.000000 1.000000 0.0 0.0 \n",
"1 KIC 11904160 285.68076 50.242493 5.345214 0.006644 0.0 0.0 \n",
"2 KIC 11904158 285.68042 50.245716 16.080462 0.005420 0.0 0.0 \n",
"3 KIC 11904156 285.68015 50.250011 31.413257 0.002672 -4.0 0.0 \n",
"4 KIC 11904148 285.67722 50.259010 63.953186 0.017155 0.0 0.0 \n",
"\n",
" Kepmag Teff logg \n",
"0 10.961000 5491 4.467 \n",
"1 16.405001 NaN \n",
"2 16.625999 NaN \n",
"3 17.393999 NaN \n",
"4 15.375000 5286 4.640 "
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_region(c, catalog=\"kic\", max_results=5)"
]
},
{
"cell_type": "markdown",
"id": "434ed1c5-979f-4c39-b866-a2c4b961d429",
"metadata": {},
"source": [
"By default, the catalog will query with an epoch of that is the default for the catalog. You can set the `epoch` keyword to a date in order to get `RA` and `Dec` at that date, given the proper motion."
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "e3499cc9-33b4-4d21-b734-ed6398539442",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" ID | \n",
" RA | \n",
" Dec | \n",
" Separation | \n",
" Relative_Flux | \n",
" pmRA | \n",
" pmDE | \n",
" Kepmag | \n",
" Teff | \n",
" logg | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" KIC 11904151 | \n",
" 285.679380 | \n",
" 50.241299 | \n",
" 0.000000 | \n",
" 1.000000 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 10.961000 | \n",
" 5491 | \n",
" 4.467 | \n",
"
\n",
" \n",
" 1 | \n",
" KIC 11904160 | \n",
" 285.680760 | \n",
" 50.242493 | \n",
" 5.345214 | \n",
" 0.006644 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 16.405001 | \n",
" <NA> | \n",
" NaN | \n",
"
\n",
" \n",
" 2 | \n",
" KIC 11904158 | \n",
" 285.680420 | \n",
" 50.245716 | \n",
" 16.080462 | \n",
" 0.005420 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 16.625999 | \n",
" <NA> | \n",
" NaN | \n",
"
\n",
" \n",
" 3 | \n",
" KIC 11904156 | \n",
" 285.680107 | \n",
" 50.250011 | \n",
" 31.407788 | \n",
" 0.002672 | \n",
" -4.0 | \n",
" 0.0 | \n",
" 17.393999 | \n",
" <NA> | \n",
" NaN | \n",
"
\n",
" \n",
" 4 | \n",
" KIC 11904148 | \n",
" 285.677220 | \n",
" 50.259010 | \n",
" 63.953186 | \n",
" 0.017155 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 15.375000 | \n",
" 5286 | \n",
" 4.640 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" ID RA Dec Separation Relative_Flux pmRA pmDE \\\n",
"0 KIC 11904151 285.679380 50.241299 0.000000 1.000000 0.0 0.0 \n",
"1 KIC 11904160 285.680760 50.242493 5.345214 0.006644 0.0 0.0 \n",
"2 KIC 11904158 285.680420 50.245716 16.080462 0.005420 0.0 0.0 \n",
"3 KIC 11904156 285.680107 50.250011 31.407788 0.002672 -4.0 0.0 \n",
"4 KIC 11904148 285.677220 50.259010 63.953186 0.017155 0.0 0.0 \n",
"\n",
" Kepmag Teff logg \n",
"0 10.961000 5491 4.467 \n",
"1 16.405001 NaN \n",
"2 16.625999 NaN \n",
"3 17.393999 NaN \n",
"4 15.375000 5286 4.640 "
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_region(c, output_epoch=Time.now(), catalog=\"kic\", max_results=5)"
]
},
{
"cell_type": "markdown",
"id": "0570848e-1281-4dcc-bc97-aabdef0584a5",
"metadata": {},
"source": [
"You can also pass a radius for your query. If you query each catalog directly you can set your query radius in units of pixels, otherwise you can use arcseconds."
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "37e4bc44-5a6c-4dbd-a4e0-31f0a8c98184",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" ID | \n",
" RA | \n",
" Dec | \n",
" Separation | \n",
" Relative_Flux | \n",
" pmRA | \n",
" pmDE | \n",
" Kepmag | \n",
" Teff | \n",
" logg | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" KIC 11904151 | \n",
" 285.67938 | \n",
" 50.241299 | \n",
" 0.000000 | \n",
" 1.000000 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 10.961000 | \n",
" 5491 | \n",
" 4.467 | \n",
"
\n",
" \n",
" 1 | \n",
" KIC 11904160 | \n",
" 285.68076 | \n",
" 50.242493 | \n",
" 5.345214 | \n",
" 0.006644 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 16.405001 | \n",
" <NA> | \n",
" NaN | \n",
"
\n",
" \n",
" 2 | \n",
" KIC 11904165 | \n",
" 285.68317 | \n",
" 50.241207 | \n",
" 8.732390 | \n",
" 0.002660 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 17.399000 | \n",
" <NA> | \n",
" NaN | \n",
"
\n",
" \n",
" 3 | \n",
" KIC 11904162 | \n",
" 285.68124 | \n",
" 50.243916 | \n",
" 10.348793 | \n",
" 0.001576 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 17.966999 | \n",
" <NA> | \n",
" NaN | \n",
"
\n",
" \n",
" 4 | \n",
" KIC 11904158 | \n",
" 285.68042 | \n",
" 50.245716 | \n",
" 16.080462 | \n",
" 0.005420 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 16.625999 | \n",
" <NA> | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" ID RA Dec Separation Relative_Flux pmRA pmDE \\\n",
"0 KIC 11904151 285.67938 50.241299 0.000000 1.000000 0.0 0.0 \n",
"1 KIC 11904160 285.68076 50.242493 5.345214 0.006644 0.0 0.0 \n",
"2 KIC 11904165 285.68317 50.241207 8.732390 0.002660 0.0 0.0 \n",
"3 KIC 11904162 285.68124 50.243916 10.348793 0.001576 0.0 0.0 \n",
"4 KIC 11904158 285.68042 50.245716 16.080462 0.005420 0.0 0.0 \n",
"\n",
" Kepmag Teff logg \n",
"0 10.961000 5491 4.467 \n",
"1 16.405001 NaN \n",
"2 17.399000 NaN \n",
"3 17.966999 NaN \n",
"4 16.625999 NaN "
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_region(c, output_epoch=Time.now(), radius=30 * u.arcsec, catalog=\"kic\")"
]
},
{
"cell_type": "markdown",
"id": "b1b89482-e501-4f55-b307-888074e1b7cd",
"metadata": {},
"source": [
"You can query TIC"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "631f9a71-b0f2-4cb7-9ef3-565155c0fe16",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" ID | \n",
" RA | \n",
" Dec | \n",
" Separation | \n",
" Relative_Flux | \n",
" pmRA | \n",
" pmDE | \n",
" TESSmag | \n",
" Mass | \n",
" Rad | \n",
" Teff | \n",
" logg | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" TIC 377780790 | \n",
" 285.679223 | \n",
" 50.241593 | \n",
" NaN | \n",
" 915.377136 | \n",
" -18.394 | \n",
" 41.448 | \n",
" 10.477000 | \n",
" 1.017 | \n",
" 1.09 | \n",
" 5706.0 | \n",
" 4.3707 | \n",
"
\n",
" \n",
" 1 | \n",
" TIC 1717218059 | \n",
" NaN | \n",
" NaN | \n",
" NaN | \n",
" 1.000000 | \n",
" -2.227 | \n",
" -1.204 | \n",
" 17.881001 | \n",
" 1.070 | \n",
" 0.81 | \n",
" 5895.0 | \n",
" 4.6506 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" ID RA Dec Separation Relative_Flux pmRA \\\n",
"0 TIC 377780790 285.679223 50.241593 NaN 915.377136 -18.394 \n",
"1 TIC 1717218059 NaN NaN NaN 1.000000 -2.227 \n",
"\n",
" pmDE TESSmag Mass Rad Teff logg \n",
"0 41.448 10.477000 1.017 1.09 5706.0 4.3707 \n",
"1 -1.204 17.881001 1.070 0.81 5895.0 4.6506 "
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_region(c, output_epoch=Time.now(), radius=20 * u.arcsec, catalog=\"tic\")"
]
},
{
"cell_type": "markdown",
"id": "a8e4e95b-5c0f-43bd-84b1-7c427fe482c1",
"metadata": {},
"source": [
"EPIC (Note Kepler-10 isn't inside EPIC, because it's outside the ecliptic plane!)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "e21a83c5-2975-4fde-a1a0-6d5fb031e95d",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" RAJ2000 | \n",
" DEJ2000 | \n",
" pmRA | \n",
" pmDE | \n",
" Plx | \n",
" K2mag | \n",
" logg | \n",
" Teff | \n",
" Rad | \n",
" Mass | \n",
" RA | \n",
" Dec | \n",
" Separation | \n",
" Relative_Flux | \n",
"
\n",
" \n",
" ID | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
" | \n",
"
\n",
" \n",
" \n",
" \n",
"
\n",
"
"
],
"text/plain": [
"Empty DataFrame\n",
"Columns: [RAJ2000, DEJ2000, pmRA, pmDE, Plx, K2mag, logg, Teff, Rad, Mass, RA, Dec, Separation, Relative_Flux]\n",
"Index: []"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_region(c, catalog=\"epic\")"
]
},
{
"cell_type": "markdown",
"id": "62473b20-a001-491a-9a2a-0502540cff42",
"metadata": {},
"source": [
"And Gaia in the same ways"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "2f18882e-a193-4629-9681-b36ea02af6d0",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" ID | \n",
" RA | \n",
" Dec | \n",
" Separation | \n",
" Relative_Flux | \n",
" pmRA | \n",
" pmDE | \n",
" BPmag | \n",
" Gmag | \n",
" RPmag | \n",
" Teff | \n",
" logg | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Gaia DR3 2132155017099178624 | \n",
" 285.679351 | \n",
" 50.241409 | \n",
" 0.000000 | \n",
" 1.000000 | \n",
" -18.483 | \n",
" 41.382 | \n",
" 11.253505 | \n",
" 10.920031 | \n",
" 10.418263 | \n",
" 5595.8 | \n",
" 4.3544 | \n",
"
\n",
" \n",
" 1 | \n",
" Gaia DR3 2132155051458917632 | \n",
" 285.680213 | \n",
" 50.249942 | \n",
" 30.783367 | \n",
" 0.001691 | \n",
" -1.519 | \n",
" -1.203 | \n",
" 18.209782 | \n",
" 17.849485 | \n",
" 17.317846 | \n",
" 5424.7 | \n",
" 4.6774 | \n",
"
\n",
" \n",
" 2 | \n",
" Gaia DR3 2132155051458918144 | \n",
" 285.685923 | \n",
" 50.249919 | \n",
" 34.169635 | \n",
" 0.005578 | \n",
" 9.402 | \n",
" 5.814 | \n",
" 17.213984 | \n",
" 16.553818 | \n",
" 15.778805 | \n",
" NaN | \n",
" NaN | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" ID RA Dec Separation \\\n",
"0 Gaia DR3 2132155017099178624 285.679351 50.241409 0.000000 \n",
"1 Gaia DR3 2132155051458917632 285.680213 50.249942 30.783367 \n",
"2 Gaia DR3 2132155051458918144 285.685923 50.249919 34.169635 \n",
"\n",
" Relative_Flux pmRA pmDE BPmag Gmag RPmag Teff \\\n",
"0 1.000000 -18.483 41.382 11.253505 10.920031 10.418263 5595.8 \n",
"1 0.001691 -1.519 -1.203 18.209782 17.849485 17.317846 5424.7 \n",
"2 0.005578 9.402 5.814 17.213984 16.553818 15.778805 NaN \n",
"\n",
" logg \n",
"0 4.3544 \n",
"1 4.6774 \n",
"2 NaN "
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_region(c, output_epoch=Time.now(), radius=40 * u.arcsecond, catalog=\"gaiadr3\")"
]
},
{
"cell_type": "markdown",
"id": "d20de587-7719-4b39-bc80-ab07a9800c8e",
"metadata": {},
"source": [
"Optionally, you can return the output of the search as an `astropy.coordinates.SkyCoord` object"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "fb7fc90b-87ad-47a7-841f-402b2ff46867",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
""
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_region(\n",
" c,\n",
" output_epoch=Time.now(),\n",
" radius=40 * u.arcsecond,\n",
" catalog=\"gaiadr3\",\n",
" return_skycoord=True,\n",
")"
]
},
{
"cell_type": "markdown",
"id": "6f069335-fb49-4301-85cf-a32172e430fe",
"metadata": {},
"source": [
"## Searching by Catalog ID"
]
},
{
"cell_type": "markdown",
"id": "8a0f27fb-b981-4ca6-b3f1-6ef00a796057",
"metadata": {},
"source": [
"For TIC, KIC, EPIC, and Gaia DR3 - if we know the Catalog ID of a source we can use `QueryID` to return the data from that catalog for that id. For example, Kepler-10 above is also known as TIC 377780790. "
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "8f497117-9e06-471f-9420-2334203f64c3",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" TIC | \n",
" RAJ2000 | \n",
" DEJ2000 | \n",
" HIP | \n",
" TYC | \n",
" UCAC4 | \n",
" _2MASS | \n",
" objID | \n",
" WISEA | \n",
" GAIA | \n",
" ... | \n",
" Clist | \n",
" e_RAJ2000 | \n",
" e_DEJ2000 | \n",
" RAOdeg | \n",
" DEOdeg | \n",
" e_RAOdeg | \n",
" e_DEOdeg | \n",
" RadFl | \n",
" WDFl | \n",
" ID | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 377780790 | \n",
" 285.679422 | \n",
" 50.241306 | \n",
" <NA> | \n",
" | \n",
" 702-062695 | \n",
" 19024305+5014286 | \n",
" <NA> | \n",
" J190243.03+501429.1 | \n",
" 2132155017099178624 | \n",
" ... | \n",
" | \n",
" 0.767293 | \n",
" 0.711508 | \n",
" 285.679298 | \n",
" 50.241484 | \n",
" 0.020474 | \n",
" 0.024043 | \n",
" 1 | \n",
" 0 | \n",
" 237087497 | \n",
"
\n",
" \n",
"
\n",
"
1 rows × 122 columns
\n",
"
"
],
"text/plain": [
" TIC RAJ2000 DEJ2000 HIP TYC UCAC4 _2MASS \\\n",
"0 377780790 285.679422 50.241306 702-062695 19024305+5014286 \n",
"\n",
" objID WISEA GAIA ... Clist e_RAJ2000 \\\n",
"0 J190243.03+501429.1 2132155017099178624 ... 0.767293 \n",
"\n",
" e_DEJ2000 RAOdeg DEOdeg e_RAOdeg e_DEOdeg RadFl WDFl ID \n",
"0 0.711508 285.679298 50.241484 0.020474 0.024043 1 0 237087497 \n",
"\n",
"[1 rows x 122 columns]"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_id(\"TIC 377780790\")"
]
},
{
"cell_type": "markdown",
"id": "d3c8cec5-9925-49e1-bea8-3253bf669013",
"metadata": {},
"source": [
"... and KIC 11904151"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "a48bdf93-3ff3-43d6-befd-62390a536ac2",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" KIC | \n",
" RAJ2000 | \n",
" DEJ2000 | \n",
" pmRA | \n",
" pmDE | \n",
" Plx | \n",
" umag | \n",
" gmag | \n",
" rmag | \n",
" imag | \n",
" ... | \n",
" cq | \n",
" pq | \n",
" aq | \n",
" fv | \n",
" Teff | \n",
" logg | \n",
" __Fe_H_ | \n",
" E_B-V_ | \n",
" Av | \n",
" R_ | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 11904151 | \n",
" 285.67938 | \n",
" 50.241299 | \n",
" 0.0 | \n",
" 0.0 | \n",
" NaN | \n",
" NaN | \n",
" 11.388 | \n",
" 10.92 | \n",
" 10.778 | \n",
" ... | \n",
" SCP | \n",
" 5 | \n",
" 6 | \n",
" 2 | \n",
" 5491 | \n",
" 4.467 | \n",
" -0.812 | \n",
" 0.031 | \n",
" 0.095 | \n",
" 0.98 | \n",
"
\n",
" \n",
"
\n",
"
1 rows × 36 columns
\n",
"
"
],
"text/plain": [
" KIC RAJ2000 DEJ2000 pmRA pmDE Plx umag gmag rmag \\\n",
"0 11904151 285.67938 50.241299 0.0 0.0 NaN NaN 11.388 10.92 \n",
"\n",
" imag ... cq pq aq fv Teff logg __Fe_H_ E_B-V_ Av R_ \n",
"0 10.778 ... SCP 5 6 2 5491 4.467 -0.812 0.031 0.095 0.98 \n",
"\n",
"[1 rows x 36 columns]"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_id(\"KIC 11904151\")"
]
},
{
"cell_type": "markdown",
"id": "582ac919-9e81-489a-86cb-fd841c8bc028",
"metadata": {},
"source": [
"... and Gaia DR3 2132155017099178624"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "6a6968f1-b8e9-400d-a7cf-273b982a6a26",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" DR3Name | \n",
" RA_ICRS | \n",
" DE_ICRS | \n",
" SolID | \n",
" Source | \n",
" RandomI | \n",
" e_RA_ICRS | \n",
" e_DE_ICRS | \n",
" Plx | \n",
" e_Plx | \n",
" ... | \n",
" RAVE6 | \n",
" dRAVE6 | \n",
" f_RAVE6 | \n",
" RAVE6oid | \n",
" nRAVE6 | \n",
" RAJ2000 | \n",
" DEJ2000 | \n",
" e_RAJ2000 | \n",
" e_DEJ2000 | \n",
" RADEcorJ2000 | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Gaia DR3 2132155017099178624 | \n",
" 285.679294 | \n",
" 50.24149 | \n",
" 1636148068921376768 | \n",
" 2132155017099178624 | \n",
" 712720541 | \n",
" 0.0097 | \n",
" 0.0105 | \n",
" 5.3698 | \n",
" 0.0103 | \n",
" ... | \n",
" | \n",
" NaN | \n",
" <NA> | \n",
" NaN | \n",
" <NA> | \n",
" 285.679422 | \n",
" 50.241306 | \n",
" 0.199479 | \n",
" 0.217694 | \n",
" -0.0523 | \n",
"
\n",
" \n",
"
\n",
"
1 rows × 225 columns
\n",
"
"
],
"text/plain": [
" DR3Name RA_ICRS DE_ICRS SolID \\\n",
"0 Gaia DR3 2132155017099178624 285.679294 50.24149 1636148068921376768 \n",
"\n",
" Source RandomI e_RA_ICRS e_DE_ICRS Plx e_Plx ... \\\n",
"0 2132155017099178624 712720541 0.0097 0.0105 5.3698 0.0103 ... \n",
"\n",
" RAVE6 dRAVE6 f_RAVE6 RAVE6oid nRAVE6 RAJ2000 DEJ2000 e_RAJ2000 \\\n",
"0 NaN NaN 285.679422 50.241306 0.199479 \n",
"\n",
" e_DEJ2000 RADEcorJ2000 \n",
"0 0.217694 -0.0523 \n",
"\n",
"[1 rows x 225 columns]"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_id(\"Gaia DR3 2132155017099178624\")"
]
},
{
"cell_type": "markdown",
"id": "da1850e6-7967-4814-92da-2c0927867a7e",
"metadata": {},
"source": [
"The TIC catalog has been cross-matched with the GAIA DR3 and KIC catalogs. `lksearch` can use this cross-matching to retrieve TIC/KIC/GAIA catalog info for any given TIC/KIC/GaiaDR3 source ID. The EPIC catalog is not included in this cross-matching. \n",
"\n",
"For Example, if we want the TIC info for Kepler-10, but only have the GAIA DR3Name above, we can get that like so:"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "068e7e8a-a634-4d19-9c3c-edf2312fd8d5",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" TIC | \n",
" RAJ2000 | \n",
" DEJ2000 | \n",
" HIP | \n",
" TYC | \n",
" UCAC4 | \n",
" _2MASS | \n",
" objID | \n",
" WISEA | \n",
" GAIA | \n",
" ... | \n",
" Clist | \n",
" e_RAJ2000 | \n",
" e_DEJ2000 | \n",
" RAOdeg | \n",
" DEOdeg | \n",
" e_RAOdeg | \n",
" e_DEOdeg | \n",
" RadFl | \n",
" WDFl | \n",
" ID | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 377780790 | \n",
" 285.679422 | \n",
" 50.241306 | \n",
" <NA> | \n",
" | \n",
" 702-062695 | \n",
" 19024305+5014286 | \n",
" <NA> | \n",
" J190243.03+501429.1 | \n",
" 2132155017099178624 | \n",
" ... | \n",
" | \n",
" 0.767293 | \n",
" 0.711508 | \n",
" 285.679298 | \n",
" 50.241484 | \n",
" 0.020474 | \n",
" 0.024043 | \n",
" 1 | \n",
" 0 | \n",
" 237087497 | \n",
"
\n",
" \n",
"
\n",
"
1 rows × 122 columns
\n",
"
"
],
"text/plain": [
" TIC RAJ2000 DEJ2000 HIP TYC UCAC4 _2MASS \\\n",
"0 377780790 285.679422 50.241306 702-062695 19024305+5014286 \n",
"\n",
" objID WISEA GAIA ... Clist e_RAJ2000 \\\n",
"0 J190243.03+501429.1 2132155017099178624 ... 0.767293 \n",
"\n",
" e_DEJ2000 RAOdeg DEOdeg e_RAOdeg e_DEOdeg RadFl WDFl ID \n",
"0 0.711508 285.679298 50.241484 0.020474 0.024043 1 0 237087497 \n",
"\n",
"[1 rows x 122 columns]"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_id(\"Gaia DR3 2132155017099178624\", output_catalog=\"tic\")"
]
},
{
"cell_type": "markdown",
"id": "2d613dbe-1b6a-4ce2-8104-2050e22800eb",
"metadata": {},
"source": [
"We can also supply an integer ID, but if so we MUST specify what catalog to search"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "5c1b473b-cdda-4f4f-8f54-0d3ba79df22a",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" DR3Name | \n",
" RA_ICRS | \n",
" DE_ICRS | \n",
" SolID | \n",
" Source | \n",
" RandomI | \n",
" e_RA_ICRS | \n",
" e_DE_ICRS | \n",
" Plx | \n",
" e_Plx | \n",
" ... | \n",
" RAVE6 | \n",
" dRAVE6 | \n",
" f_RAVE6 | \n",
" RAVE6oid | \n",
" nRAVE6 | \n",
" RAJ2000 | \n",
" DEJ2000 | \n",
" e_RAJ2000 | \n",
" e_DEJ2000 | \n",
" RADEcorJ2000 | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Gaia DR3 2132155017099178624 | \n",
" 285.679294 | \n",
" 50.24149 | \n",
" 1636148068921376768 | \n",
" 2132155017099178624 | \n",
" 712720541 | \n",
" 0.0097 | \n",
" 0.0105 | \n",
" 5.3698 | \n",
" 0.0103 | \n",
" ... | \n",
" | \n",
" NaN | \n",
" <NA> | \n",
" NaN | \n",
" <NA> | \n",
" 285.679422 | \n",
" 50.241306 | \n",
" 0.199479 | \n",
" 0.217694 | \n",
" -0.0523 | \n",
"
\n",
" \n",
"
\n",
"
1 rows × 225 columns
\n",
"
"
],
"text/plain": [
" DR3Name RA_ICRS DE_ICRS SolID \\\n",
"0 Gaia DR3 2132155017099178624 285.679294 50.24149 1636148068921376768 \n",
"\n",
" Source RandomI e_RA_ICRS e_DE_ICRS Plx e_Plx ... \\\n",
"0 2132155017099178624 712720541 0.0097 0.0105 5.3698 0.0103 ... \n",
"\n",
" RAVE6 dRAVE6 f_RAVE6 RAVE6oid nRAVE6 RAJ2000 DEJ2000 e_RAJ2000 \\\n",
"0 NaN NaN 285.679422 50.241306 0.199479 \n",
"\n",
" e_DEJ2000 RADEcorJ2000 \n",
"0 0.217694 -0.0523 \n",
"\n",
"[1 rows x 225 columns]"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_id(\"2132155017099178624\", output_catalog=\"gaiadr3\")"
]
},
{
"cell_type": "markdown",
"id": "6a0f83b9-74ad-424d-8a0e-a412ba5044f1",
"metadata": {},
"source": [
"If we specify an integer and wish to use our limited cross-match, we can do that by specifying both the `input_catalog` and `catalog` parameters"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "d1209696-e696-4162-84e6-d1061f49f152",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" TIC | \n",
" RAJ2000 | \n",
" DEJ2000 | \n",
" HIP | \n",
" TYC | \n",
" UCAC4 | \n",
" _2MASS | \n",
" objID | \n",
" WISEA | \n",
" GAIA | \n",
" ... | \n",
" Clist | \n",
" e_RAJ2000 | \n",
" e_DEJ2000 | \n",
" RAOdeg | \n",
" DEOdeg | \n",
" e_RAOdeg | \n",
" e_DEOdeg | \n",
" RadFl | \n",
" WDFl | \n",
" ID | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 377780790 | \n",
" 285.679422 | \n",
" 50.241306 | \n",
" <NA> | \n",
" | \n",
" 702-062695 | \n",
" 19024305+5014286 | \n",
" <NA> | \n",
" J190243.03+501429.1 | \n",
" 2132155017099178624 | \n",
" ... | \n",
" | \n",
" 0.767293 | \n",
" 0.711508 | \n",
" 285.679298 | \n",
" 50.241484 | \n",
" 0.020474 | \n",
" 0.024043 | \n",
" 1 | \n",
" 0 | \n",
" 237087497 | \n",
"
\n",
" \n",
"
\n",
"
1 rows × 122 columns
\n",
"
"
],
"text/plain": [
" TIC RAJ2000 DEJ2000 HIP TYC UCAC4 _2MASS \\\n",
"0 377780790 285.679422 50.241306 702-062695 19024305+5014286 \n",
"\n",
" objID WISEA GAIA ... Clist e_RAJ2000 \\\n",
"0 J190243.03+501429.1 2132155017099178624 ... 0.767293 \n",
"\n",
" e_DEJ2000 RAOdeg DEOdeg e_RAOdeg e_DEOdeg RadFl WDFl ID \n",
"0 0.711508 285.679298 50.241484 0.020474 0.024043 1 0 237087497 \n",
"\n",
"[1 rows x 122 columns]"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_id(\"2132155017099178624\", output_catalog=\"tic\", input_catalog=\"gaiadr3\")"
]
},
{
"cell_type": "markdown",
"id": "97df2dd7-f970-496a-ad3e-6cc30ca0bd47",
"metadata": {},
"source": [
"We can also search for multiple IDS from a single catalog and get a table of all of the resulting catalog entries"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "5ff097ae-9182-4075-b9d0-1fa500c673f2",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" TIC | \n",
" RAJ2000 | \n",
" DEJ2000 | \n",
" HIP | \n",
" TYC | \n",
" UCAC4 | \n",
" _2MASS | \n",
" objID | \n",
" WISEA | \n",
" GAIA | \n",
" ... | \n",
" Clist | \n",
" e_RAJ2000 | \n",
" e_DEJ2000 | \n",
" RAOdeg | \n",
" DEOdeg | \n",
" e_RAOdeg | \n",
" e_DEOdeg | \n",
" RadFl | \n",
" WDFl | \n",
" ID | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 27916356 | \n",
" 296.837241 | \n",
" 48.239933 | \n",
" <NA> | \n",
" | \n",
" 692-068460 | \n",
" 19472094+4814238 | \n",
" <NA> | \n",
" J194720.94+481423.9 | \n",
" 2086636884980514304 | \n",
" ... | \n",
" | \n",
" 0.431661 | \n",
" 0.401100 | \n",
" 296.837248 | \n",
" 48.239969 | \n",
" 0.011393 | \n",
" 0.014386 | \n",
" 1 | \n",
" 0 | \n",
" 338972619 | \n",
"
\n",
" \n",
" 1 | \n",
" 28230919 | \n",
" 297.709364 | \n",
" 48.080860 | \n",
" 97657 | \n",
" 3561-02092-1 | \n",
" 691-070316 | \n",
" 19505021+4804508 | \n",
" <NA> | \n",
" | \n",
" 2086512227851023872 | \n",
" ... | \n",
" | \n",
" 0.689515 | \n",
" 0.697757 | \n",
" 297.710176 | \n",
" 48.081864 | \n",
" 0.019271 | \n",
" 0.024141 | \n",
" 1 | \n",
" 0 | \n",
" 347873767 | \n",
"
\n",
" \n",
" 2 | \n",
" 120571842 | \n",
" 285.573977 | \n",
" 38.400883 | \n",
" <NA> | \n",
" | \n",
" 643-065464 | \n",
" 19021775+3824032 | \n",
" 1237668734687445760 | \n",
" J190217.77+382402.9 | \n",
" 2099925719951103872 | \n",
" ... | \n",
" | \n",
" 0.460796 | \n",
" 0.495197 | \n",
" 285.573990 | \n",
" 38.400819 | \n",
" 0.013008 | \n",
" 0.016279 | \n",
" 1 | \n",
" 0 | \n",
" 236288245 | \n",
"
\n",
" \n",
" 3 | \n",
" 121660904 | \n",
" 288.581510 | \n",
" 41.089824 | \n",
" <NA> | \n",
" | \n",
" 656-070649 | \n",
" 19141956+4105233 | \n",
" <NA> | \n",
" J191419.55+410523.1 | \n",
" 2102117871259036672 | \n",
" ... | \n",
" | \n",
" 0.830982 | \n",
" 0.646732 | \n",
" 288.581493 | \n",
" 41.089734 | \n",
" 0.021624 | \n",
" 0.020590 | \n",
" 1 | \n",
" 0 | \n",
" 259926978 | \n",
"
\n",
" \n",
" 4 | \n",
" 123233041 | \n",
" 281.288121 | \n",
" 42.451081 | \n",
" <NA> | \n",
" | \n",
" 663-070081 | \n",
" 18450914+4227038 | \n",
" <NA> | \n",
" J184509.14+422703.9 | \n",
" 2116730994965905280 | \n",
" ... | \n",
" | \n",
" 0.388089 | \n",
" 0.420084 | \n",
" 281.288134 | \n",
" 42.451098 | \n",
" 0.011065 | \n",
" 0.014161 | \n",
" 1 | \n",
" 0 | \n",
" 214866427 | \n",
"
\n",
" \n",
" 5 | \n",
" 268823307 | \n",
" 299.407035 | \n",
" 44.035053 | \n",
" <NA> | \n",
" | \n",
" 671-080900 | \n",
" 19573768+4402061 | \n",
" <NA> | \n",
" J195737.69+440206.0 | \n",
" 2079018300195390464 | \n",
" ... | \n",
" | \n",
" 0.605437 | \n",
" 0.487757 | \n",
" 299.407034 | \n",
" 44.035039 | \n",
" 0.018613 | \n",
" 0.016314 | \n",
" 1 | \n",
" 0 | \n",
" 363112972 | \n",
"
\n",
" \n",
" 6 | \n",
" 350814622 | \n",
" 285.615409 | \n",
" 50.135751 | \n",
" <NA> | \n",
" | \n",
" 701-064857 | \n",
" 19022767+5008087 | \n",
" <NA> | \n",
" J190227.69+500808.7 | \n",
" 2132152916856093952 | \n",
" ... | \n",
" | \n",
" 0.670902 | \n",
" 0.662993 | \n",
" 285.615449 | \n",
" 50.135771 | \n",
" 0.019169 | \n",
" 0.024925 | \n",
" 1 | \n",
" 0 | \n",
" 237044605 | \n",
"
\n",
" \n",
" 7 | \n",
" 377780790 | \n",
" 285.679422 | \n",
" 50.241306 | \n",
" <NA> | \n",
" | \n",
" 702-062695 | \n",
" 19024305+5014286 | \n",
" <NA> | \n",
" J190243.03+501429.1 | \n",
" 2132155017099178624 | \n",
" ... | \n",
" | \n",
" 0.767293 | \n",
" 0.711508 | \n",
" 285.679298 | \n",
" 50.241484 | \n",
" 0.020474 | \n",
" 0.024043 | \n",
" 1 | \n",
" 0 | \n",
" 237087497 | \n",
"
\n",
" \n",
" 8 | \n",
" 399860444 | \n",
" 286.808491 | \n",
" 49.316414 | \n",
" <NA> | \n",
" 3549-02811-1 | \n",
" 697-064165 | \n",
" 19071403+4918590 | \n",
" <NA> | \n",
" J190714.04+491859.0 | \n",
" 2131314401800665344 | \n",
" ... | \n",
" | \n",
" 0.734770 | \n",
" 0.672364 | \n",
" 286.808526 | \n",
" 49.316421 | \n",
" 0.019726 | \n",
" 0.022829 | \n",
" 1 | \n",
" 0 | \n",
" 245833148 | \n",
"
\n",
" \n",
" 9 | \n",
" 424865156 | \n",
" 292.247308 | \n",
" 47.969505 | \n",
" <NA> | \n",
" 3547-01402-1 | \n",
" 690-068273 | \n",
" 19285935+4758102 | \n",
" <NA> | \n",
" J192859.33+475810.3 | \n",
" 2129256395211984000 | \n",
" ... | \n",
" | \n",
" 0.645983 | \n",
" 0.573522 | \n",
" 292.247190 | \n",
" 47.969543 | \n",
" 0.017649 | \n",
" 0.019830 | \n",
" 1 | \n",
" 0 | \n",
" 290881018 | \n",
"
\n",
" \n",
"
\n",
"
10 rows × 122 columns
\n",
"
"
],
"text/plain": [
" TIC RAJ2000 DEJ2000 HIP TYC UCAC4 \\\n",
"0 27916356 296.837241 48.239933 692-068460 \n",
"1 28230919 297.709364 48.080860 97657 3561-02092-1 691-070316 \n",
"2 120571842 285.573977 38.400883 643-065464 \n",
"3 121660904 288.581510 41.089824 656-070649 \n",
"4 123233041 281.288121 42.451081 663-070081 \n",
"5 268823307 299.407035 44.035053 671-080900 \n",
"6 350814622 285.615409 50.135751 701-064857 \n",
"7 377780790 285.679422 50.241306 702-062695 \n",
"8 399860444 286.808491 49.316414 3549-02811-1 697-064165 \n",
"9 424865156 292.247308 47.969505 3547-01402-1 690-068273 \n",
"\n",
" _2MASS objID WISEA \\\n",
"0 19472094+4814238 J194720.94+481423.9 \n",
"1 19505021+4804508 \n",
"2 19021775+3824032 1237668734687445760 J190217.77+382402.9 \n",
"3 19141956+4105233 J191419.55+410523.1 \n",
"4 18450914+4227038 J184509.14+422703.9 \n",
"5 19573768+4402061 J195737.69+440206.0 \n",
"6 19022767+5008087 J190227.69+500808.7 \n",
"7 19024305+5014286 J190243.03+501429.1 \n",
"8 19071403+4918590 J190714.04+491859.0 \n",
"9 19285935+4758102 J192859.33+475810.3 \n",
"\n",
" GAIA ... Clist e_RAJ2000 e_DEJ2000 RAOdeg \\\n",
"0 2086636884980514304 ... 0.431661 0.401100 296.837248 \n",
"1 2086512227851023872 ... 0.689515 0.697757 297.710176 \n",
"2 2099925719951103872 ... 0.460796 0.495197 285.573990 \n",
"3 2102117871259036672 ... 0.830982 0.646732 288.581493 \n",
"4 2116730994965905280 ... 0.388089 0.420084 281.288134 \n",
"5 2079018300195390464 ... 0.605437 0.487757 299.407034 \n",
"6 2132152916856093952 ... 0.670902 0.662993 285.615449 \n",
"7 2132155017099178624 ... 0.767293 0.711508 285.679298 \n",
"8 2131314401800665344 ... 0.734770 0.672364 286.808526 \n",
"9 2129256395211984000 ... 0.645983 0.573522 292.247190 \n",
"\n",
" DEOdeg e_RAOdeg e_DEOdeg RadFl WDFl ID \n",
"0 48.239969 0.011393 0.014386 1 0 338972619 \n",
"1 48.081864 0.019271 0.024141 1 0 347873767 \n",
"2 38.400819 0.013008 0.016279 1 0 236288245 \n",
"3 41.089734 0.021624 0.020590 1 0 259926978 \n",
"4 42.451098 0.011065 0.014161 1 0 214866427 \n",
"5 44.035039 0.018613 0.016314 1 0 363112972 \n",
"6 50.135771 0.019169 0.024925 1 0 237044605 \n",
"7 50.241484 0.020474 0.024043 1 0 237087497 \n",
"8 49.316421 0.019726 0.022829 1 0 245833148 \n",
"9 47.969543 0.017649 0.019830 1 0 290881018 \n",
"\n",
"[10 rows x 122 columns]"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Kepler Objects 1-10\n",
"idlist = [\n",
" \"TIC 399860444\",\n",
" \"TIC 424865156\",\n",
" \"TIC 28230919\",\n",
" \"TIC 350814622\",\n",
" \"TIC 268823307\",\n",
" \"TIC 27916356\",\n",
" \"TIC 121660904\",\n",
" \"TIC 123233041\",\n",
" \"TIC 120571842\",\n",
" \"TIC 377780790\",\n",
"]\n",
"query_id(idlist, output_catalog=\"tic\")"
]
},
{
"cell_type": "markdown",
"id": "f9a35a25-cde5-4810-87e9-2c83a7249481",
"metadata": {},
"source": [
"Large queries (over one thousand objects) will be performed asynchronously and may take some time. "
]
},
{
"cell_type": "markdown",
"id": "6cde6883-77d6-4fa4-854f-8bff08743144",
"metadata": {},
"source": [
"Like `QueryPosition`, These results can also be returned as `astropy SkyCoord` objects. "
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "57f90e43-e171-4e32-a2f9-80eac85b0ccd",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
""
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_id(\"TIC 377780790\", return_skycoord=True)"
]
},
{
"cell_type": "markdown",
"id": "b5b2bcc0-a0a7-4167-976c-9ddaf2abfde9",
"metadata": {},
"source": [
"## Looking up Catalog IDs"
]
},
{
"cell_type": "markdown",
"id": "6a171db2-9c22-4e01-bd26-9509c5bb4a1c",
"metadata": {},
"source": [
"We have also included a limited way of looking up catalog IDs using other known IDs. This functionality wraps the `astroquery.simbad.Simbad.query_objectids` functionality. "
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "7299501b-112f-419d-af24-3553a3586365",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" LAMOST J190243.11+501428.7 | \n",
"
\n",
" \n",
" 1 | \n",
" AP J19024305+5014286 | \n",
"
\n",
" \n",
" 2 | \n",
" Gaia DR3 2132155017099178624 | \n",
"
\n",
" \n",
" 3 | \n",
" TIC 377780790 | \n",
"
\n",
" \n",
" 4 | \n",
" SPOCS 4268 | \n",
"
\n",
" \n",
" ... | \n",
" ... | \n",
"
\n",
" \n",
" 9 | \n",
" PPMX J190243.0+501428 | \n",
"
\n",
" \n",
" 10 | \n",
" USNO-B1.0 1402-00324696 | \n",
"
\n",
" \n",
" 11 | \n",
" GSC 03549-00354 | \n",
"
\n",
" \n",
" 12 | \n",
" KOI-72 | \n",
"
\n",
" \n",
" 13 | \n",
" KIC 11904151 | \n",
"
\n",
" \n",
"
\n",
"
14 rows × 1 columns
\n",
"
"
],
"text/plain": [
" id\n",
"0 LAMOST J190243.11+501428.7\n",
"1 AP J19024305+5014286\n",
"2 Gaia DR3 2132155017099178624\n",
"3 TIC 377780790\n",
"4 SPOCS 4268\n",
".. ...\n",
"9 PPMX J190243.0+501428\n",
"10 USNO-B1.0 1402-00324696\n",
"11 GSC 03549-00354\n",
"12 KOI-72\n",
"13 KIC 11904151\n",
"\n",
"[14 rows x 1 columns]"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_names(\"Kepler 10\")"
]
},
{
"cell_type": "markdown",
"id": "600430bf-96d1-4f13-ba4b-6cc17b575f10",
"metadata": {},
"source": [
"It is based off of joining IDs across Simbad tables, and is useful but not comprehensive as it relies upon published works to do the ID crossmatching. That means that you may run into situations where not all assosciations have been made, eg. for this EPIC ID:"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "f8755caf-b19b-4972-ad97-afbe7bb09890",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Gaia DR3 3796414192429498880 | \n",
"
\n",
" \n",
" 1 | \n",
" LBQS 1145+0145 | \n",
"
\n",
" \n",
" 2 | \n",
" WD 1145+017 | \n",
"
\n",
" \n",
" 3 | \n",
" SDSS J114833.62+012859.4 | \n",
"
\n",
" \n",
" 4 | \n",
" EPIC 201563164 | \n",
"
\n",
" \n",
" 5 | \n",
" HE 1145+0145 | \n",
"
\n",
" \n",
" 6 | \n",
" Gaia DR2 3796414192429498880 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id\n",
"0 Gaia DR3 3796414192429498880\n",
"1 LBQS 1145+0145\n",
"2 WD 1145+017\n",
"3 SDSS J114833.62+012859.4\n",
"4 EPIC 201563164\n",
"5 HE 1145+0145\n",
"6 Gaia DR2 3796414192429498880"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_names(\"EPIC 201563164\")"
]
},
{
"cell_type": "markdown",
"id": "8203f0ee-83e3-4781-bd4d-70bbd6806b91",
"metadata": {},
"source": [
"We can see above that this EPIC ID has a Gaia DR3 ID assosciated with it, and we know that GAIA DR3 and TIC are crossmatched, but the TIC ID is not reported. To retrieve the TIC ID we can use the GAIA DR3 ID above and QueryID"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "833a1cd8-4f09-4c59-bca4-fc20e6b3eb5e",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" id | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Gaia DR3 3796414192429498880 | \n",
"
\n",
" \n",
" 1 | \n",
" LBQS 1145+0145 | \n",
"
\n",
" \n",
" 2 | \n",
" WD 1145+017 | \n",
"
\n",
" \n",
" 3 | \n",
" SDSS J114833.62+012859.4 | \n",
"
\n",
" \n",
" 4 | \n",
" EPIC 201563164 | \n",
"
\n",
" \n",
" 5 | \n",
" HE 1145+0145 | \n",
"
\n",
" \n",
" 6 | \n",
" Gaia DR2 3796414192429498880 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" id\n",
"0 Gaia DR3 3796414192429498880\n",
"1 LBQS 1145+0145\n",
"2 WD 1145+017\n",
"3 SDSS J114833.62+012859.4\n",
"4 EPIC 201563164\n",
"5 HE 1145+0145\n",
"6 Gaia DR2 3796414192429498880"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_names(\"Gaia DR3 3796414192429498880\")"
]
},
{
"cell_type": "markdown",
"id": "497d2223-6f8e-477b-b693-a8582c32f41a",
"metadata": {},
"source": [
"`lksearch` also alows you to input a list of strings, which will then perform sequential ID searches for each item in the list and return a list of the resulting tables: "
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "dc0d422f-fa40-4f36-8017-3cbc9bc03f19",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Throttling query limit to Simbad's: max 5/s\n"
]
},
{
"data": {
"text/plain": [
"[ id\n",
" 0 LAMOST J190243.11+501428.7\n",
" 1 AP J19024305+5014286\n",
" 2 Gaia DR3 2132155017099178624\n",
" 3 TIC 377780790\n",
" 4 SPOCS 4268\n",
" .. ...\n",
" 9 PPMX J190243.0+501428\n",
" 10 USNO-B1.0 1402-00324696\n",
" 11 GSC 03549-00354\n",
" 12 KOI-72\n",
" 13 KIC 11904151\n",
" \n",
" [14 rows x 1 columns],\n",
" id\n",
" 0 LAMOST J191618.16+514526.7\n",
" 1 Gaia DR3 2133476355197071616\n",
" 2 TIC 299096355\n",
" 3 Gaia DR2 2133476355197071616\n",
" 4 2MASS J19161817+5145267\n",
" .. ...\n",
" 6 GSC 03554-01147\n",
" 7 KIC 12644769\n",
" 8 Kepler-16\n",
" 9 NAME Kepler-16 (AB)\n",
" 10 KOI-1611\n",
" \n",
" [11 rows x 1 columns]]"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"query_names([\"Kepler 10\", \"Kepler 16\"])"
]
},
{
"cell_type": "markdown",
"id": "99a4d45d-d05e-4497-8e56-e8109f9cb6c2",
"metadata": {},
"source": [
"### Matching ID Results to Catalogs\n",
"`lksearch` has the ability to parse the id lists returned by `QueryID` to look for ids which contain the string contained in the optional parameter `match`. This can be usefull for only returning the catalog results which interest you. \n",
"\n",
"Just like the search input can be a list, so can the match criteria, as so: "
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "b05efbea-5edb-471c-ba7c-96af0a24a78a",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Throttling query limit to Simbad's: max 5/s\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" search | \n",
" tic | \n",
" kic | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" Kepler 10 | \n",
" TIC 377780790 | \n",
" KIC 11904151 | \n",
"
\n",
" \n",
" 1 | \n",
" Kepler 16 | \n",
" TIC 299096355 | \n",
" KIC 12644769 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" search tic kic\n",
"0 Kepler 10 TIC 377780790 KIC 11904151\n",
"1 Kepler 16 TIC 299096355 KIC 12644769"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"match_names_catalogs([\"Kepler 10\", \"Kepler 16\"], match=[\"tic\", \"kic\"])"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.12.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}