diff --git a/docs/tutorials/Example_searches.ipynb b/docs/tutorials/Example_searches.ipynb index 51ae9ea..4afd90f 100644 --- a/docs/tutorials/Example_searches.ipynb +++ b/docs/tutorials/Example_searches.ipynb @@ -1,13 +1,32 @@ { "cells": [ + { + "cell_type": "markdown", + "id": "c2a7369f", + "metadata": {}, + "source": [ + "# lksearch tutorial" + ] + }, { "cell_type": "code", "execution_count": 1, "id": "9f07ac77", "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/Users/nthom/opt/anaconda3/envs/py3/lib/python3.9/site-packages/pandas/core/computation/expressions.py:21: UserWarning: Pandas requires version '2.8.4' or newer of 'numexpr' (version '2.8.3' currently installed).\n", + " from pandas.core.computation.check import NUMEXPR_INSTALLED\n", + "/Users/nthom/opt/anaconda3/envs/py3/lib/python3.9/site-packages/pandas/core/arrays/masked.py:60: UserWarning: Pandas requires version '1.3.6' or newer of 'bottleneck' (version '1.3.5' currently installed).\n", + " from pandas.core import (\n" + ] + } + ], "source": [ - "from tssc import *" + "from tssc import MASTSearch, KeplerSearch, K2Search, TESSSearch" ] }, { @@ -15,7 +34,7 @@ "id": "5fa70bc4", "metadata": {}, "source": [ - "Welcome to the new search module to peruse available data products for the TESS, Kepler, and K2 missions! This notebook will guide you through several examples of how to use search functions. \n", + "Welcome to the new lksearch module! This package allows users to peruse available data products for the TESS, Kepler, and K2 missions. This notebook will guide you through several examples of how to use search functions. \n", "\n", "The result of the search is a MASTSearch object, which contains among other things a full list of results stored in a pandas dataframe.\n", "\n", @@ -27,9 +46,11 @@ "id": "5b7aff9d", "metadata": {}, "source": [ - "# Basic Searches\n", + "## Basic Searches\n", + "\n", "\n", - "This search package provides a user-friendly wrapper to search the MAST data archive. By default, you are only required to provide a target (either a name, id, or ra/dec coordinate).\n", + "### Data Exploration\n", + "The lksearch package provides a user-friendly wrapper to search the MAST data archive. The most generic search is to use MASTsearch, which checks for mission products from three missions (Kepler, K2, and TESS). This search can be useful for data exploration, but does not have full functionality, as discussed below.\n", "\n", "In addition, you can specify \n", "\n", @@ -45,7 +66,7 @@ " - quarter/month for Kepler\n", " - campaign for K2\n", " \n", - "**NOTE* only a single sequence can be passed. You can modify the table later if you want to limit to a list of sequences using search_result.limit_table()" + "**NOTE* only a single sequence can be passed on initialization. If you want to specify a list of values, you can modify the table after initialization using search_result.limit_table()" ] }, { @@ -57,7 +78,7 @@ { "data": { "text/html": [ - "MASTSearch object containing 102 data products
\n", + "MASTSearch object containing 244 data products
\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", - " \n", - " \n", - " \n", - "
Local PathStatusMessageURL
0/Users/tapritc2/.tssc/cache/mastDownload/TESS/...COMPLETENoneNone
0/Users/tapritc2/.tssc/cache/mastDownload/TESS/...COMPLETENoneNone
\n", - "
" - ], - "text/plain": [ - " Local Path Status Message URL\n", - "0 /Users/tapritc2/.tssc/cache/mastDownload/TESS/... COMPLETE None None\n", - "0 /Users/tapritc2/.tssc/cache/mastDownload/TESS/... COMPLETE None None" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "Kep186_lim.download()" - ] - }, - { - "cell_type": "markdown", - "id": "a0935d18", - "metadata": {}, - "source": [ - "# Kepler Search\n" - ] - }, - { - "cell_type": "markdown", - "id": "feb3dd84", - "metadata": {}, - "source": [ - "The call to KeplerSearch saves all availabe data products for the target as a table. This can be useful for data exploration, but in some cases, the user may only want to access specific data types. Search has several convenient functions to limit the results to timeseries (lighcurve), cubedata (target pixel files and, in the case of TESS, full frame image cutouts), and dvreports (PDF data validation reports generated by the data pipelines). Calling these functions returns a new search object. " - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "id": "ace8aad4", + "execution_count": 11, + "id": "6221e588", "metadata": {}, "outputs": [ { "data": { "text/html": [ - "KeplerSearch object containing 82 data products
\n", + "TESSSearch object containing 127 data products
\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", + " \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", + " \n", " \n", " \n", " \n", "
target_namepipelinemissionsectorexptimedistanceyeardescription
38kplr007419318KeplerKepler171800.0000158324245SPOCTESS14120.00.02013Lightcurve Long Cadence (CLC) - Q172019Light curves
39Gaia DR3 2104847370214740352KBONUS-BKG1158324245TASOCHLSP991765.46414120.00.020092019FITS
\n", - "

40 rows × 8 columns

\n", "
" ], "text/plain": [ - "KeplerSearch object containing 40 data products target_name pipeline mission quarter exptime \\\n", - "0 kplr007419318 Kepler Kepler 0 1800.000 \n", - "1 kplr007419318 Kepler Kepler 1 1800.000 \n", - "2 kplr007419318 Kepler Kepler 2 1800.000 \n", - "3 kplr007419318 Kepler Kepler 3 1800.000 \n", - "4 kplr007419318 Kepler Kepler 4 1800.000 \n", - ".. ... ... ... ... ... \n", - "35 kplr007419318 Kepler Kepler 14 1800.000 \n", - "36 kplr007419318 Kepler Kepler 15 1800.000 \n", - "37 kplr007419318 Kepler Kepler 16 1800.000 \n", - "38 kplr007419318 Kepler Kepler 17 1800.000 \n", - "39 Gaia DR3 2104847370214740352 KBONUS-BKG HLSP 99 1765.464 \n", - "\n", - " distance year description \n", - "0 0.0 2009 Lightcurve Long Cadence (CLC) - Q0 \n", - "1 0.0 2009 Lightcurve Long Cadence (CLC) - Q1 \n", - "2 0.0 2009 Lightcurve Long Cadence (CLC) - Q2 \n", - "3 0.0 2009 Lightcurve Long Cadence (CLC) - Q3 \n", - "4 0.0 2010 Lightcurve Long Cadence (CLC) - Q4 \n", - ".. ... ... ... \n", - "35 0.0 2012 Lightcurve Long Cadence (CLC) - Q14 \n", - "36 0.0 2013 Lightcurve Long Cadence (CLC) - Q15 \n", - "37 0.0 2013 Lightcurve Long Cadence (CLC) - Q16 \n", - "38 0.0 2013 Lightcurve Long Cadence (CLC) - Q17 \n", - "39 0.0 2009 FITS \n", - "\n", - "[40 rows x 8 columns]" + "TESSSearch object containing 2 data products target_name pipeline mission sector exptime distance year description\n", + "0 158324245 SPOC TESS 14 120.0 0.0 2019 Light curves\n", + "1 158324245 TASOC HLSP 14 120.0 0.0 2019 FITS" ] }, - "execution_count": 15, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "kep137_lcs = kep137.timeseries\n", - "kep137_lcs" + "toi_short_lcs = toi.timeseries.filter_table(exptime=120, sector=14)\n", + "toi_short_lcs" + ] + }, + { + "cell_type": "markdown", + "id": "0e5e9e42", + "metadata": {}, + "source": [ + "Once your search result contains the files you want, you can download the files directly to your machine. " ] }, { "cell_type": "code", - "execution_count": 16, - "id": "cbedbf2a", + "execution_count": 14, + "id": "adae2b43", "metadata": {}, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "100%|█████████████████████████████████████████████| 2/2 [00:02<00:00, 1.42s/it]\n" + ] + }, { "data": { "text/html": [ @@ -2007,14 +2189,14 @@ " \n", " \n", " 0\n", - " /Users/tapritc2/.tssc/cache/mastDownload/Keple...\n", + " /Users/nthom/.tssc/cache/mastDownload/TESS/tes...\n", " COMPLETE\n", " None\n", " None\n", " \n", " \n", " 0\n", - " /Users/tapritc2/.tssc/cache/mastDownload/Keple...\n", + " /Users/nthom/.tssc/cache/mastDownload/HLSP/hls...\n", " COMPLETE\n", " None\n", " None\n", @@ -2025,63 +2207,45 @@ ], "text/plain": [ " Local Path Status Message URL\n", - "0 /Users/tapritc2/.tssc/cache/mastDownload/Keple... COMPLETE None None\n", - "0 /Users/tapritc2/.tssc/cache/mastDownload/Keple... COMPLETE None None" + "0 /Users/nthom/.tssc/cache/mastDownload/TESS/tes... COMPLETE None None\n", + "0 /Users/nthom/.tssc/cache/mastDownload/HLSP/hls... COMPLETE None None" ] }, - "execution_count": 16, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "# You can download a subsection of results directly\n", - "kep137[:2].download()" + "toi_short_lcs.download()" ] }, { "cell_type": "markdown", - "id": "3eab9b82", + "id": "a0935d18", "metadata": {}, "source": [ - "Notice that when downloading, a table is printed out showing the status of the download. You can save this table and explore it in more detail, if desired." + "## Kepler Search\n" ] }, { - "cell_type": "code", - "execution_count": 17, - "id": "0890bbc6", + "cell_type": "markdown", + "id": "feb3dd84", "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "array(['/Users/tapritc2/.tssc/cache/mastDownload/Kepler/kplr007419318_lc_Q111111111111111111/kplr007419318-2009131105131_llc.fits',\n", - " '/Users/tapritc2/.tssc/cache/mastDownload/Kepler/kplr007419318_lc_Q111111111111111111/kplr007419318-2009131105131_lpd-targ.fits.gz'],\n", - " dtype=object)" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], "source": [ - "# You can download a subsection of results directly\n", - "manifest = kep137[:2].download()\n", - "manifest['Local Path'].values" + "The call to KeplerSearch saves all availabe data products for the target as a table. Like with the other search objects, there are several convenient functions to limit the results to timeseries (lighcurve), cubedata (target pixel files and, in the case of TESS only, full frame image cutouts), and dvreports (PDF data validation reports generated by the data pipelines). Calling these functions returns a new search object. " ] }, { "cell_type": "code", - "execution_count": 18, - "id": "502fee80", + "execution_count": 30, + "id": "ace8aad4", "metadata": {}, "outputs": [ { "data": { "text/html": [ - "KeplerSearch object containing 10 data products
\n", + "KeplerSearch object containing 82 data products
\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", + " \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", + " \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", + " \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", + " \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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
target_namepipelinemissionquarterexptimedistanceyeardescription
0kplr007419318KeplerKepler01800.0000.02009Lightcurve Long Cadence (CLC) - Q0
1kplr007419318KeplerKepler11800.0000.02009Lightcurve Long Cadence (CLC) - Q1
2kplr007419318KeplerKepler21800.0000.02009Lightcurve Long Cadence (CLC) - Q2
3kplr007419318KeplerKepler31800.0000.02009Lightcurve Long Cadence (CLC) - Q3
4kplr007419318KeplerKepler41800.0000.02010Lightcurve Long Cadence (CLC) - Q4
...........................
35kplr007419318KeplerKepler141800.0000.02012Lightcurve Long Cadence (CLC) - Q14
36kplr007419318KeplerKepler151800.0000.02013Lightcurve Long Cadence (CLC) - Q15
37kplr007419318KeplerKepler161800.0000.02013Lightcurve Long Cadence (CLC) - Q16
38kplr007419318KeplerKepler171800.0000.02013Lightcurve Long Cadence (CLC) - Q17
39Gaia DR3 2104847370214740352KBONUS-BKGHLSP991765.4640.02009FITS
\n", + "

40 rows × 8 columns

\n", + "
" + ], + "text/plain": [ + "KeplerSearch object containing 40 data products target_name pipeline mission quarter exptime \\\n", + "0 kplr007419318 Kepler Kepler 0 1800.000 \n", + "1 kplr007419318 Kepler Kepler 1 1800.000 \n", + "2 kplr007419318 Kepler Kepler 2 1800.000 \n", + "3 kplr007419318 Kepler Kepler 3 1800.000 \n", + "4 kplr007419318 Kepler Kepler 4 1800.000 \n", + ".. ... ... ... ... ... \n", + "35 kplr007419318 Kepler Kepler 14 1800.000 \n", + "36 kplr007419318 Kepler Kepler 15 1800.000 \n", + "37 kplr007419318 Kepler Kepler 16 1800.000 \n", + "38 kplr007419318 Kepler Kepler 17 1800.000 \n", + "39 Gaia DR3 2104847370214740352 KBONUS-BKG HLSP 99 1765.464 \n", + "\n", + " distance year description \n", + "0 0.0 2009 Lightcurve Long Cadence (CLC) - Q0 \n", + "1 0.0 2009 Lightcurve Long Cadence (CLC) - Q1 \n", + "2 0.0 2009 Lightcurve Long Cadence (CLC) - Q2 \n", + "3 0.0 2009 Lightcurve Long Cadence (CLC) - Q3 \n", + "4 0.0 2010 Lightcurve Long Cadence (CLC) - Q4 \n", + ".. ... ... ... \n", + "35 0.0 2012 Lightcurve Long Cadence (CLC) - Q14 \n", + "36 0.0 2013 Lightcurve Long Cadence (CLC) - Q15 \n", + "37 0.0 2013 Lightcurve Long Cadence (CLC) - Q16 \n", + "38 0.0 2013 Lightcurve Long Cadence (CLC) - Q17 \n", + "39 0.0 2009 FITS \n", + "\n", + "[40 rows x 8 columns]" + ] + }, + "execution_count": 31, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "kep_lc = kep.timeseries\n", + "kep_lc" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "id": "cbedbf2a", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\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", + " \n", + " \n", + " \n", + "
Local PathStatusMessageURL
0/Users/nthom/.tssc/cache/mastDownload/Kepler/k...COMPLETENoneNone
0/Users/nthom/.tssc/cache/mastDownload/Kepler/k...COMPLETENoneNone
\n", + "
" + ], + "text/plain": [ + " Local Path Status Message URL\n", + "0 /Users/nthom/.tssc/cache/mastDownload/Kepler/k... COMPLETE None None\n", + "0 /Users/nthom/.tssc/cache/mastDownload/Kepler/k... COMPLETE None None" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# You can download a subsection of results directly\n", + "kep_lc[:2].download()" + ] + }, + { + "cell_type": "markdown", + "id": "3eab9b82", + "metadata": {}, + "source": [ + "Notice that when downloading, a table is printed out showing the status of the download. You can save this table and explore it in more detail, if desired." + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "id": "0890bbc6", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['/Users/nthom/.tssc/cache/mastDownload/Kepler/kplr007419318_lc_Q111111111111111111/kplr007419318-2009131105131_llc.fits'\n", + " '/Users/nthom/.tssc/cache/mastDownload/Kepler/kplr007419318_lc_Q111111111111111111/kplr007419318-2009131105131_lpd-targ.fits.gz']\n" + ] + } + ], + "source": [ + "# You can download a subsection of results directly\n", + "manifest = kep[:2].download()\n", + "print(manifest['Local Path'].values)" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "id": "502fee80", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "KeplerSearch object containing 10 data products
\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", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", " \n", @@ -2250,15 +2920,15 @@ "9 Target Pixel Long Cadence (TPL) - Q17 " ] }, - "execution_count": 18, + "execution_count": 35, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# we can also filter the results by observing quarter\n", - "kep137_quarters = kep137.filter_table(quarter=[7,17])\n", - "kep137_quarters" + "kep_quarters = kep.filter_table(quarter=[7,17])\n", + "kep_quarters" ] }, { @@ -2266,12 +2936,14 @@ "id": "0d4b9e69", "metadata": {}, "source": [ - "# K2 Search" + "## K2 Search\n", + "\n", + "K2Search behaves in much the same way as Kepler. As with Kepler, both mission products and HLSPs are returned by default. Note that instead of quarters, the K2 mission was separated by campaign. " ] }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 36, "id": "a775a2f7", "metadata": {}, "outputs": [ @@ -2370,267 +3042,51 @@ " \n", " \n", " \n", - " \n", - " \n", - " \n", - " \n", - "
target_namepipelinemissionquarterexptimedistanceyeardescription
0kplr007419318KeplerKepler760.00.02010Lightcurve Short Cadence (CSC) - Q7
1kplr007419318KeplerKepler760.00.02010Lightcurve Short Cadence (CSC) - Q7
2kplr007419318KeplerKepler760.00.02010Lightcurve Short Cadence (CSC) - Q711800.00.02014FITS
\n", - "
" - ], - "text/plain": [ - "K2Search object containing 6 data products target_name pipeline mission campaign exptime distance year \\\n", - "0 ktwo201912552 K2 K2 1 1800.0 0.0 2014 \n", - "1 ktwo201912552 K2 K2 1 1800.0 0.0 2014 \n", - "2 ktwo201912552 EVEREST HLSP 1 1800.0 0.0 2014 \n", - "3 ktwo201912552 EVEREST HLSP 1 1800.0 0.0 2014 \n", - "4 ktwo201912552 K2SFF HLSP 1 1800.0 0.0 2014 \n", - "5 ktwo201912552 K2VARCAT HLSP 1 1800.0 0.0 2014 \n", - "\n", - " description \n", - "0 Lightcurve Long Cadence (KLC) - C01 \n", - "1 Target Pixel Long Cadence (KTL) - C01 \n", - "2 PDF \n", - "3 FITS \n", - "4 FITS \n", - "5 FITS " - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "K2_18 = K2Search(\"K2-18\")\n", - "K2_18" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "id": "d2cfa795", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "11\n", - "3\n" - ] - }, - { - "data": { - "text/html": [ - "
\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", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
Local PathStatusMessageURL
0/Users/tapritc2/.tssc/cache/mastDownload/TESS/...COMPLETENoneNone
1/Users/tapritc2/.tssc/cache/mastDownload/HLSP/...COMPLETENoneNone
2/Users/tapritc2/.tssc/cache/mastDownload/TESSC...COMPLETENaNNaN
\n", - "
" - ], - "text/plain": [ - " Local Path Status Message URL\n", - "0 /Users/tapritc2/.tssc/cache/mastDownload/TESS/... COMPLETE None None\n", - "1 /Users/tapritc2/.tssc/cache/mastDownload/HLSP/... COMPLETE None None\n", - "2 /Users/tapritc2/.tssc/cache/mastDownload/TESSC... COMPLETE NaN NaN" - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "\"\"\"Can we find and download TESS tesscut tpfs\"\"\"\n", - "results = TESSSearch(\"Kepler 16b\", hlsp=False, sector=14)\n", - "print(len(results)) # == 11\n", - "print(len(results.cubedata)) # 3\n", - "manifest = results.cubedata.download()\n", - "manifest" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "id": "8b10d4f6", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "TESSSearch object containing 3 data products
\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", - " \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", + " \n", " \n", " \n", "
target_namepipelinemissionsectorexptimedistanceyeardescription
0299096355SPOCTESS14120.00.02019Target pixel files
1299096355TESS-SPOCHLSP141800.00.02019FITS
2Kepler 16bTESScutTESS Sector 14141800.00.02019TESS FFI Cutout (sector 14)2014FITS
\n", "
" ], "text/plain": [ - "TESSSearch object containing 3 data products target_name pipeline mission sector exptime distance year \\\n", - "0 299096355 SPOC TESS 14 120.0 0.0 2019 \n", - "1 299096355 TESS-SPOC HLSP 14 1800.0 0.0 2019 \n", - "2 Kepler 16b TESScut TESS Sector 14 14 1800.0 0.0 2019 \n", + "K2Search object containing 6 data products target_name pipeline mission campaign exptime distance year \\\n", + "0 ktwo201912552 K2 K2 1 1800.0 0.0 2014 \n", + "1 ktwo201912552 K2 K2 1 1800.0 0.0 2014 \n", + "2 ktwo201912552 EVEREST HLSP 1 1800.0 0.0 2014 \n", + "3 ktwo201912552 EVEREST HLSP 1 1800.0 0.0 2014 \n", + "4 ktwo201912552 K2SFF HLSP 1 1800.0 0.0 2014 \n", + "5 ktwo201912552 K2VARCAT HLSP 1 1800.0 0.0 2014 \n", "\n", - " description \n", - "0 Target pixel files \n", - "1 FITS \n", - "2 TESS FFI Cutout (sector 14) " - ] - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "results.cubedata" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "id": "21eedb6d", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0 SPOC\n", - "1 SPOC\n", - "2 SPOC\n", - "3 SPOC\n", - "4 SPOC\n", - " ... \n", - "6 SPOC\n", - "7 SPOC\n", - "8 TESS-SPOC\n", - "9 TESS-SPOC\n", - "10 TESScut\n", - "Name: provenance_name, Length: 11, dtype: object" + " description \n", + "0 Lightcurve Long Cadence (KLC) - C01 \n", + "1 Target Pixel Long Cadence (KTL) - C01 \n", + "2 PDF \n", + "3 FITS \n", + "4 FITS \n", + "5 FITS " ] }, - "execution_count": 22, + "execution_count": 36, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "results.table.provenance_name" + "K2 = K2Search(\"K2-18\")\n", + "K2" ] }, { "cell_type": "code", - "execution_count": 23, - "id": "da99acf3", + "execution_count": 46, + "id": "086291ee", "metadata": {}, "outputs": [ { "data": { "text/html": [ - "TESSSearch object containing 2 data products
\n", + "K2Search object containing 4 data products
\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", - " \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", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
target_namepipelinemissionsectorexptimedistanceyeardescription
0268159861SPOCTESS41120.00.02021Light curves
1268159861SPOCTESS41120.00.02021Target pixel files
2268159861SPOCTESS54120.00.02022Light curves
3268159861SPOCTESS54120.00.02022Target pixel files
4268159861SPOCTESS55120.00.02022Light curves
\n", - "
" - ], - "text/plain": [ - "TESSSearch object containing 5 data products target_name pipeline mission sector exptime distance year \\\n", - "0 268159861 SPOC TESS 41 120.0 0.0 2021 \n", - "1 268159861 SPOC TESS 41 120.0 0.0 2021 \n", - "2 268159861 SPOC TESS 54 120.0 0.0 2022 \n", - "3 268159861 SPOC TESS 54 120.0 0.0 2022 \n", - "4 268159861 SPOC TESS 55 120.0 0.0 2022 \n", - "\n", - " description \n", - "0 Light curves \n", - "1 Target pixel files \n", - "2 Light curves \n", - "3 Target pixel files \n", - "4 Light curves " - ] - }, - "execution_count": 30, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# we can take slices\n", - "Kep186[0:5]" - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "id": "582f5783-e0d2-4de7-ac43-5de142e47835", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "TESSSearch object containing 2 data products
\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", + " \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", " \n", - " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", " \n", " \n", "
target_namepipelinemissionsectorexptimedistanceyeardescription
0268159861SPOCTESS41120.0154299096355CDIPSHLSP551800.00.02021Target pixel files2022FITS
1268159861SPOCTESS155299096355QLPHLSP55120.0600.00.02022Light curvesFITS
156299096355QLPHLSP56200.00.02022FITS
\n", + "

157 rows × 8 columns

\n", "
" ], "text/plain": [ - "TESSSearch object containing 2 data products target_name pipeline mission sector exptime distance year \\\n", - "0 268159861 SPOC TESS 41 120.0 0.0 2021 \n", - "1 268159861 SPOC TESS 55 120.0 0.0 2022 \n", - "\n", - " description \n", - "0 Target pixel files \n", - "1 Light curves " + "TESSSearch object containing 157 data products target_name pipeline mission sector exptime distance year \\\n", + "0 299096355 SPOC TESS 14 120.0 0.0 2019 \n", + "1 299096355 SPOC TESS 14 120.0 0.0 2019 \n", + "2 299096355 SPOC TESS 14 120.0 0.0 2019 \n", + "3 299096355 SPOC TESS 14 120.0 0.0 2019 \n", + "4 299096355 SPOC TESS 14 120.0 0.0 2019 \n", + ".. ... ... ... ... ... ... ... \n", + "152 299096355 CDIPS HLSP 54 1800.0 0.0 2022 \n", + "153 299096355 QLP HLSP 54 600.0 0.0 2022 \n", + "154 299096355 CDIPS HLSP 55 1800.0 0.0 2022 \n", + "155 299096355 QLP HLSP 55 600.0 0.0 2022 \n", + "156 299096355 QLP HLSP 56 200.0 0.0 2022 \n", + "\n", + " description \n", + "0 full data validation report \n", + "1 full data validation report \n", + "2 Data validation mini report \n", + "3 Data validation mini report \n", + "4 TCE summary report \n", + ".. ... \n", + "152 FITS \n", + "153 FITS \n", + "154 FITS \n", + "155 FITS \n", + "156 FITS \n", + "\n", + "[157 rows x 8 columns]" ] }, - "execution_count": 31, + "execution_count": 57, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "# We can take boolean arrays\n", - "import numpy as np\n", - "mask = np.zeros(len(Kep186)).astype(bool)\n", - "mask[1]=True\n", - "mask[4]=True\n", - "Kep186[mask]\n", - "# This resets the index, unlike pandas" + "search_result = TESSSearch(\"Kepler 16b\")\n", + "search_result" ] }, { "cell_type": "code", - "execution_count": 32, - "id": "87b1da09-6113-4945-904e-8c2b84fa2b56", + "execution_count": 58, + "id": "a41178f6-2d5b-4e7c-808e-21d19eb7ff79", "metadata": {}, "outputs": [ { "data": { "text/html": [ - "TESSSearch object containing 2 data products
\n", + "TESSSearch object containing 1241 data products
\n", "