From 9f12bd210cd9fd3041365890c00b22caccb6fcf5 Mon Sep 17 00:00:00 2001 From: tylerapritchard Date: Mon, 22 Jul 2024 10:02:05 -0400 Subject: [PATCH] =?UTF-8?q?Updated=20tutorial=20notebook=20with=20discussi?= =?UTF-8?q?on=20of=20configuration=20parameters=E2=80=A6=20(#20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Closes #18 * Updated tutorial notebook with discussion of configuration parameters and a new sub-section discussing lksearch cloud configuration * spelling fixes --- docs/tutorials/Example_searches.ipynb | 395 +++++++++++++++++--------- 1 file changed, 262 insertions(+), 133 deletions(-) diff --git a/docs/tutorials/Example_searches.ipynb b/docs/tutorials/Example_searches.ipynb index c5d1fd3..6b0686a 100644 --- a/docs/tutorials/Example_searches.ipynb +++ b/docs/tutorials/Example_searches.ipynb @@ -116,7 +116,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " full data validation report\n", + " Light curves\n", " \n", " \n", " 2\n", @@ -126,7 +126,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " Data validation mini report\n", + " TCE summary report\n", " \n", " \n", " 3\n", @@ -146,7 +146,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " TCE summary report\n", + " Target pixel files\n", " \n", " \n", " ...\n", @@ -165,8 +165,8 @@ " Kepler\n", " 60.0\n", " 0.0\n", - " 2013\n", - " Target Pixel Short Cadence (TPS) - Q16\n", + " 2012\n", + " Lightcurve Short Cadence (CSC) - Q14\n", " \n", " \n", " 240\n", @@ -175,8 +175,8 @@ " Kepler\n", " 60.0\n", " 0.0\n", - " 2013\n", - " Target Pixel Short Cadence (TPS) - Q16\n", + " 2012\n", + " Target Pixel Short Cadence (TPS) - Q14\n", " \n", " \n", " 241\n", @@ -186,7 +186,7 @@ " 60.0\n", " 0.0\n", " 2013\n", - " Target Pixel Short Cadence (TPS) - Q16\n", + " Lightcurve Short Cadence (CSC) - Q17\n", " \n", " \n", " 242\n", @@ -195,8 +195,8 @@ " Kepler\n", " 60.0\n", " 0.0\n", - " 2013\n", - " Target Pixel Short Cadence (TPS) - Q17\n", + " 2011\n", + " Target Pixel Short Cadence (TPS) - Q11\n", " \n", " \n", " 243\n", @@ -205,8 +205,8 @@ " Kepler\n", " 60.0\n", " 0.0\n", - " 2013\n", - " Target Pixel Short Cadence (TPS) - Q17\n", + " 2009\n", + " Target Pixel Short Cadence (TPS) - Q2\n", " \n", " \n", "\n", @@ -222,24 +222,24 @@ "3 158324245 SPOC TESS 120.0 0.0 2019 \n", "4 158324245 SPOC TESS 120.0 0.0 2019 \n", ".. ... ... ... ... ... ... \n", - "239 kplr009941662 Kepler Kepler 60.0 0.0 2013 \n", - "240 kplr009941662 Kepler Kepler 60.0 0.0 2013 \n", + "239 kplr009941662 Kepler Kepler 60.0 0.0 2012 \n", + "240 kplr009941662 Kepler Kepler 60.0 0.0 2012 \n", "241 kplr009941662 Kepler Kepler 60.0 0.0 2013 \n", - "242 kplr009941662 Kepler Kepler 60.0 0.0 2013 \n", - "243 kplr009941662 Kepler Kepler 60.0 0.0 2013 \n", + "242 kplr009941662 Kepler Kepler 60.0 0.0 2011 \n", + "243 kplr009941662 Kepler Kepler 60.0 0.0 2009 \n", "\n", " description \n", "0 full data validation report \n", - "1 full data validation report \n", - "2 Data validation mini report \n", + "1 Light curves \n", + "2 TCE summary report \n", "3 Data validation mini report \n", - "4 TCE summary report \n", + "4 Target pixel files \n", ".. ... \n", - "239 Target Pixel Short Cadence (TPS) - Q16 \n", - "240 Target Pixel Short Cadence (TPS) - Q16 \n", - "241 Target Pixel Short Cadence (TPS) - Q16 \n", - "242 Target Pixel Short Cadence (TPS) - Q17 \n", - "243 Target Pixel Short Cadence (TPS) - Q17 \n", + "239 Lightcurve Short Cadence (CSC) - Q14 \n", + "240 Target Pixel Short Cadence (TPS) - Q14 \n", + "241 Lightcurve Short Cadence (CSC) - Q17 \n", + "242 Target Pixel Short Cadence (TPS) - Q11 \n", + "243 Target Pixel Short Cadence (TPS) - Q2 \n", "\n", "[244 rows x 7 columns]" ] @@ -445,7 +445,7 @@ " NaN\n", " tess2019198215352-s0014-0000000158324245-0150-s\n", " ...\n", - " 16337553\n", + " 1964160\n", " 27448285\n", " PUBLIC\n", " 3\n", @@ -469,7 +469,7 @@ " NaN\n", " tess2019198215352-s0014-0000000158324245-0150-s\n", " ...\n", - " 5571090\n", + " 1322689\n", " 27448285\n", " PUBLIC\n", " 3\n", @@ -517,10 +517,10 @@ " NaN\n", " tess2019198215352-s0014-0000000158324245-0150-s\n", " ...\n", - " 1322689\n", + " 47376000\n", " 27448285\n", " PUBLIC\n", - " 3\n", + " 2\n", " TESS\n", " SPOC\n", " TESS\n", @@ -565,14 +565,14 @@ " NaN\n", " kplr009941662_sc_Q003300033333333332\n", " ...\n", - " 15570968\n", + " 5045760\n", " 599738\n", " PUBLIC\n", " 2\n", " KEPLER\n", " Kepler\n", " Kepler\n", - " 2013\n", + " 2012\n", " 2009-05-02 00:54:00.000\n", " 2013-05-11 12:15:00.000\n", " \n", @@ -589,14 +589,14 @@ " NaN\n", " kplr009941662_sc_Q003300033333333332\n", " ...\n", - " 107558363\n", + " 76302956\n", " 599738\n", " PUBLIC\n", " 2\n", " KEPLER\n", " Kepler\n", " Kepler\n", - " 2013\n", + " 2012\n", " 2009-05-02 00:54:00.000\n", " 2013-05-11 12:15:00.000\n", " \n", @@ -613,7 +613,7 @@ " NaN\n", " kplr009941662_sc_Q003300033333333332\n", " ...\n", - " 94369677\n", + " 648000\n", " 599738\n", " PUBLIC\n", " 2\n", @@ -637,14 +637,14 @@ " NaN\n", " kplr009941662_sc_Q003300033333333332\n", " ...\n", - " 92737715\n", + " 130764115\n", " 599738\n", " PUBLIC\n", " 2\n", " KEPLER\n", " Kepler\n", " Kepler\n", - " 2013\n", + " 2011\n", " 2009-05-02 00:54:00.000\n", " 2013-05-11 12:15:00.000\n", " \n", @@ -661,14 +661,14 @@ " NaN\n", " kplr009941662_sc_Q003300033333333332\n", " ...\n", - " 17482211\n", + " 64708791\n", " 599738\n", " PUBLIC\n", " 2\n", " KEPLER\n", " Kepler\n", " Kepler\n", - " 2013\n", + " 2009\n", " 2009-05-02 00:54:00.000\n", " 2013-05-11 12:15:00.000\n", " \n", @@ -706,23 +706,23 @@ "\n", " obs_id ... size \\\n", "0 tess2019198215352-s0014-0000000158324245-0150-s ... 16426251 \n", - "1 tess2019198215352-s0014-0000000158324245-0150-s ... 16337553 \n", - "2 tess2019198215352-s0014-0000000158324245-0150-s ... 5571090 \n", + "1 tess2019198215352-s0014-0000000158324245-0150-s ... 1964160 \n", + "2 tess2019198215352-s0014-0000000158324245-0150-s ... 1322689 \n", "3 tess2019198215352-s0014-0000000158324245-0150-s ... 5082604 \n", - "4 tess2019198215352-s0014-0000000158324245-0150-s ... 1322689 \n", + "4 tess2019198215352-s0014-0000000158324245-0150-s ... 47376000 \n", ".. ... ... ... \n", - "239 kplr009941662_sc_Q003300033333333332 ... 15570968 \n", - "240 kplr009941662_sc_Q003300033333333332 ... 107558363 \n", - "241 kplr009941662_sc_Q003300033333333332 ... 94369677 \n", - "242 kplr009941662_sc_Q003300033333333332 ... 92737715 \n", - "243 kplr009941662_sc_Q003300033333333332 ... 17482211 \n", + "239 kplr009941662_sc_Q003300033333333332 ... 5045760 \n", + "240 kplr009941662_sc_Q003300033333333332 ... 76302956 \n", + "241 kplr009941662_sc_Q003300033333333332 ... 648000 \n", + "242 kplr009941662_sc_Q003300033333333332 ... 130764115 \n", + "243 kplr009941662_sc_Q003300033333333332 ... 64708791 \n", "\n", " parent_obsid dataRights calib_level_prod filters_prod pipeline \\\n", "0 27448285 PUBLIC 3 TESS SPOC \n", "1 27448285 PUBLIC 3 TESS SPOC \n", "2 27448285 PUBLIC 3 TESS SPOC \n", "3 27448285 PUBLIC 3 TESS SPOC \n", - "4 27448285 PUBLIC 3 TESS SPOC \n", + "4 27448285 PUBLIC 2 TESS SPOC \n", ".. ... ... ... ... ... \n", "239 599738 PUBLIC 2 KEPLER Kepler \n", "240 599738 PUBLIC 2 KEPLER Kepler \n", @@ -737,11 +737,11 @@ "3 TESS 2019 2019-07-18 20:30:33.624 2019-08-14 16:56:23.634 \n", "4 TESS 2019 2019-07-18 20:30:33.624 2019-08-14 16:56:23.634 \n", ".. ... ... ... ... \n", - "239 Kepler 2013 2009-05-02 00:54:00.000 2013-05-11 12:15:00.000 \n", - "240 Kepler 2013 2009-05-02 00:54:00.000 2013-05-11 12:15:00.000 \n", + "239 Kepler 2012 2009-05-02 00:54:00.000 2013-05-11 12:15:00.000 \n", + "240 Kepler 2012 2009-05-02 00:54:00.000 2013-05-11 12:15:00.000 \n", "241 Kepler 2013 2009-05-02 00:54:00.000 2013-05-11 12:15:00.000 \n", - "242 Kepler 2013 2009-05-02 00:54:00.000 2013-05-11 12:15:00.000 \n", - "243 Kepler 2013 2009-05-02 00:54:00.000 2013-05-11 12:15:00.000 \n", + "242 Kepler 2011 2009-05-02 00:54:00.000 2013-05-11 12:15:00.000 \n", + "243 Kepler 2009 2009-05-02 00:54:00.000 2013-05-11 12:15:00.000 \n", "\n", "[244 rows x 59 columns]" ] @@ -820,7 +820,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " full data validation report\n", + " Target pixel files\n", " \n", " \n", " 1\n", @@ -853,7 +853,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " Data validation mini report\n", + " TCE summary report\n", " \n", " \n", " 4\n", @@ -864,7 +864,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " TCE summary report\n", + " Light curves\n", " \n", " \n", " ...\n", @@ -953,11 +953,11 @@ "235 1717079071 QLP HLSP 74 200.0 0.0 2024 \n", "\n", " description \n", - "0 full data validation report \n", + "0 Target pixel files \n", "1 full data validation report \n", "2 Data validation mini report \n", - "3 Data validation mini report \n", - "4 TCE summary report \n", + "3 TCE summary report \n", + "4 Light curves \n", ".. ... \n", "231 FITS \n", "232 FITS \n", @@ -1450,7 +1450,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " full data validation report\n", + " Data validation mini report\n", " \n", " \n", " 2\n", @@ -1461,7 +1461,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " Data validation mini report\n", + " TCE summary report\n", " \n", " \n", " 3\n", @@ -1472,7 +1472,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " Data validation mini report\n", + " full data validation report\n", " \n", " \n", " 4\n", @@ -1516,7 +1516,7 @@ " 600.0\n", " 0.0\n", " 2022\n", - " PDF\n", + " Informational PDF\n", " \n", " \n", " 101\n", @@ -1527,7 +1527,7 @@ " 600.0\n", " 0.0\n", " 2022\n", - " Informational PDF\n", + " PDF\n", " \n", " \n", " 102\n", @@ -1573,14 +1573,14 @@ "\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", + "1 Data validation mini report \n", + "2 TCE summary report \n", + "3 full data validation report \n", "4 TCE summary report \n", ".. ... \n", "99 Informational PDF \n", - "100 PDF \n", - "101 Informational PDF \n", + "100 Informational PDF \n", + "101 PDF \n", "102 PDF \n", "103 Informational PDF \n", "\n", @@ -1853,7 +1853,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " full data validation report\n", + " Target pixel files\n", " \n", " \n", " 1\n", @@ -1886,7 +1886,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " Data validation mini report\n", + " TCE summary report\n", " \n", " \n", " 4\n", @@ -1897,7 +1897,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " TCE summary report\n", + " Light curves\n", " \n", " \n", " ...\n", @@ -1919,7 +1919,7 @@ " 120.0\n", " 0.0\n", " 2024\n", - " full data validation report\n", + " TCE summary report\n", " \n", " \n", " 124\n", @@ -1941,7 +1941,7 @@ " 120.0\n", " 0.0\n", " 2024\n", - " TCE summary report\n", + " full data validation report\n", " \n", " \n", " 126\n", @@ -1986,15 +1986,15 @@ "127 158324245 SPOC TESS 75 120.0 0.0 2024 \n", "\n", " description \n", - "0 full data validation report \n", + "0 Target pixel files \n", "1 full data validation report \n", "2 Data validation mini report \n", - "3 Data validation mini report \n", - "4 TCE summary report \n", + "3 TCE summary report \n", + "4 Light curves \n", ".. ... \n", - "123 full data validation report \n", + "123 TCE summary report \n", "124 Data validation mini report \n", - "125 TCE summary report \n", + "125 full data validation report \n", "126 Light curves \n", "127 Target pixel files \n", "\n", @@ -2073,7 +2073,7 @@ " 20.0\n", " 0.0\n", " 2024\n", - " Light curves\n", + " Target pixel files\n", " \n", " \n", " 1\n", @@ -2084,7 +2084,7 @@ " 20.0\n", " 0.0\n", " 2024\n", - " Target pixel files\n", + " Light curves\n", " \n", " \n", " 2\n", @@ -2139,7 +2139,7 @@ " 20.0\n", " 0.0\n", " 2024\n", - " Light curves\n", + " Target pixel files\n", " \n", " \n", " 7\n", @@ -2150,7 +2150,7 @@ " 20.0\n", " 0.0\n", " 2024\n", - " Target pixel files\n", + " Light curves\n", " \n", " \n", "\n", @@ -2169,14 +2169,14 @@ "7 158324245 SPOC TESS 75 20.0 0.0 2024 \n", "\n", " description \n", - "0 Light curves \n", - "1 Target pixel files \n", + "0 Target pixel files \n", + "1 Light curves \n", "2 Light curves \n", "3 Target pixel files \n", "4 Light curves \n", "5 Target pixel files \n", - "6 Light curves \n", - "7 Target pixel files " + "6 Target pixel files \n", + "7 Light curves " ] }, "execution_count": 12, @@ -2239,7 +2239,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " full data validation report\n", + " Target pixel files\n", " \n", " \n", " 1\n", @@ -2272,7 +2272,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " Data validation mini report\n", + " TCE summary report\n", " \n", " \n", " 4\n", @@ -2283,7 +2283,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " TCE summary report\n", + " Light curves\n", " \n", " \n", " ...\n", @@ -2372,11 +2372,11 @@ "127 1717079071 QLP HLSP 74 200.0 0.0 2024 \n", "\n", " description \n", - "0 full data validation report \n", + "0 Target pixel files \n", "1 full data validation report \n", "2 Data validation mini report \n", - "3 Data validation mini report \n", - "4 TCE summary report \n", + "3 TCE summary report \n", + "4 Light curves \n", ".. ... \n", "123 FITS \n", "124 FITS \n", @@ -2446,7 +2446,7 @@ " 120.0\n", " 0.0\n", " 2019\n", - " full data validation report\n", + " Target pixel files\n", " \n", " \n", " 1\n", @@ -2470,7 +2470,7 @@ "1 158324245 SPOC TESS 14 120.0 0.0 2019 \n", "\n", " description \n", - "0 full data validation report \n", + "0 Target pixel files \n", "1 full data validation report " ] }, @@ -2592,7 +2592,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "pipeline products: 100%|████████████████████████████████████████████| 2/2 [00:00<00:00, 4.35it/s]\n" + "pipeline products: 100%|████████████████████████████████████████████| 2/2 [00:00<00:00, 4.27it/s]\n" ] }, { @@ -2925,7 +2925,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "TESScut : 100%|████████████████████████████████████████████| 1/1 [00:02<00:00, 2.88s/it]\n" + "TESScut : 100%|████████████████████████████████████████████| 1/1 [00:08<00:00, 8.03s/it]\n" ] }, { @@ -3420,7 +3420,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "pipeline products: 100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 1.55it/s]\n" + "pipeline products: 100%|████████████████████████████████████████████| 1/1 [00:00<00:00, 2.76it/s]\n" ] }, { @@ -3606,7 +3606,7 @@ " 1800.000\n", " 0.0\n", " 2013\n", - " Lightcurve Long Cadence (CLC) - Q17\n", + " Target Pixel Long Cadence (TPL) - Q17\n", " \n", " \n", " 78\n", @@ -3672,18 +3672,18 @@ "80 kplr007419318 Kepler Kepler 99 1800.000 \n", "81 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 Target Pixel Long Cadence (TPL) - Q0 \n", - "2 0.0 2009 Lightcurve Long Cadence (CLC) - Q1 \n", - "3 0.0 2009 Target Pixel Long Cadence (TPL) - Q1 \n", - "4 0.0 2009 Lightcurve Long Cadence (CLC) - Q2 \n", - ".. ... ... ... \n", - "77 0.0 2013 Lightcurve Long Cadence (CLC) - Q17 \n", - "78 0.0 2009 Data Validation full report \n", - "79 0.0 2009 Data Validation summary report \n", - "80 0.0 2009 Data Validation summary report \n", - "81 0.0 2009 FITS \n", + " distance year description \n", + "0 0.0 2009 Lightcurve Long Cadence (CLC) - Q0 \n", + "1 0.0 2009 Target Pixel Long Cadence (TPL) - Q0 \n", + "2 0.0 2009 Lightcurve Long Cadence (CLC) - Q1 \n", + "3 0.0 2009 Target Pixel Long Cadence (TPL) - Q1 \n", + "4 0.0 2009 Lightcurve Long Cadence (CLC) - Q2 \n", + ".. ... ... ... \n", + "77 0.0 2013 Target Pixel Long Cadence (TPL) - Q17 \n", + "78 0.0 2009 Data Validation full report \n", + "79 0.0 2009 Data Validation summary report \n", + "80 0.0 2009 Data Validation summary report \n", + "81 0.0 2009 FITS \n", "\n", "[82 rows x 8 columns]" ] @@ -3915,7 +3915,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "pipeline products: 100%|████████████████████████████████████████████| 2/2 [00:00<00:00, 4.38it/s]\n" + "pipeline products: 100%|████████████████████████████████████████████| 2/2 [00:00<00:00, 3.32it/s]\n" ] }, { @@ -3998,7 +3998,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "pipeline products: 100%|████████████████████████████████████████████| 2/2 [00:00<00:00, 3.54it/s]" + "pipeline products: 100%|████████████████████████████████████████████| 2/2 [00:00<00:00, 3.98it/s]" ] }, { @@ -4115,7 +4115,7 @@ " 60.0\n", " 0.0\n", " 2010\n", - " Lightcurve Short Cadence (CSC) - Q7\n", + " Target Pixel Short Cadence (TPS) - Q7\n", " \n", " \n", " 5\n", @@ -4126,7 +4126,7 @@ " 60.0\n", " 0.0\n", " 2010\n", - " Target Pixel Short Cadence (TPS) - Q7\n", + " Lightcurve Short Cadence (CSC) - Q7\n", " \n", " \n", " 6\n", @@ -4159,7 +4159,7 @@ " 1800.0\n", " 0.0\n", " 2013\n", - " Target Pixel Long Cadence (TPL) - Q17\n", + " Lightcurve Long Cadence (CLC) - Q17\n", " \n", " \n", " 9\n", @@ -4170,7 +4170,7 @@ " 1800.0\n", " 0.0\n", " 2013\n", - " Lightcurve Long Cadence (CLC) - Q17\n", + " Target Pixel Long Cadence (TPL) - Q17\n", " \n", " \n", "\n", @@ -4195,12 +4195,12 @@ "1 Lightcurve Short Cadence (CSC) - Q7 \n", "2 Target Pixel Short Cadence (TPS) - Q7 \n", "3 Target Pixel Short Cadence (TPS) - Q7 \n", - "4 Lightcurve Short Cadence (CSC) - Q7 \n", - "5 Target Pixel Short Cadence (TPS) - Q7 \n", + "4 Target Pixel Short Cadence (TPS) - Q7 \n", + "5 Lightcurve Short Cadence (CSC) - Q7 \n", "6 Target Pixel Long Cadence (TPL) - Q7 \n", "7 Lightcurve Long Cadence (CLC) - Q7 \n", - "8 Target Pixel Long Cadence (TPL) - Q17 \n", - "9 Lightcurve Long Cadence (CLC) - Q17 " + "8 Lightcurve Long Cadence (CLC) - Q17 \n", + "9 Target Pixel Long Cadence (TPL) - Q17 " ] }, "execution_count": 27, @@ -4272,7 +4272,7 @@ " 1800.0\n", " 0.0\n", " 2014\n", - " Lightcurve Long Cadence (KLC) - C01\n", + " Target Pixel Long Cadence (KTL) - C01\n", " \n", " \n", " 1\n", @@ -4283,7 +4283,7 @@ " 1800.0\n", " 0.0\n", " 2014\n", - " Target Pixel Long Cadence (KTL) - C01\n", + " Lightcurve Long Cadence (KLC) - C01\n", " \n", " \n", " 2\n", @@ -4294,7 +4294,7 @@ " 1800.0\n", " 0.0\n", " 2014\n", - " PDF\n", + " FITS\n", " \n", " \n", " 3\n", @@ -4305,7 +4305,7 @@ " 1800.0\n", " 0.0\n", " 2014\n", - " FITS\n", + " PDF\n", " \n", " \n", " 4\n", @@ -4344,10 +4344,10 @@ "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", + "0 Target Pixel Long Cadence (KTL) - C01 \n", + "1 Lightcurve Long Cadence (KLC) - C01 \n", + "2 FITS \n", + "3 PDF \n", "4 FITS \n", "5 FITS " ] @@ -4410,7 +4410,7 @@ " 1800.0\n", " 0.0\n", " 2014\n", - " PDF\n", + " FITS\n", " \n", " \n", " 1\n", @@ -4421,7 +4421,7 @@ " 1800.0\n", " 0.0\n", " 2014\n", - " FITS\n", + " PDF\n", " \n", " \n", " 2\n", @@ -4458,8 +4458,8 @@ "3 ktwo201912552 K2VARCAT HLSP 1 1800.0 0.0 2014 \n", "\n", " description \n", - "0 PDF \n", - "1 FITS \n", + "0 FITS \n", + "1 PDF \n", "2 FITS \n", "3 FITS " ] @@ -4485,7 +4485,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "pipeline products: 100%|████████████████████████████████████████████| 3/3 [00:00<00:00, 3.22it/s]\n" + "pipeline products: 100%|████████████████████████████████████████████| 3/3 [00:01<00:00, 2.02it/s]\n" ] }, { @@ -4672,8 +4672,8 @@ "id": "9adc419e-91b3-41bc-bc40-d37b5c628ebe", "metadata": {}, "source": [ - "### lksearch Configuration file\n", - "lksearch also has an optional configuration file that is built on-top of `~astropy.config` using `~astropy.config.ConfigNamespace`. This file does not exist by default, but a default version can be created using the `config.create_config_file` helper function. " + "### lksearch Configuration and Configuration File\n", + "lksearch has a number of configuration parameters, these are contained in the `~lksearch.Conf` [class](https://lightkurve.github.io/lksearch/apidoc.html#lksearch.Conf). One can modify these parameters for a given python session by updating the values in the Conf class. To modify these configuration parameters default values, lksearch also has an optional configuration file that is built on-top of `~astropy.config` using `~astropy.config.ConfigNamespace`. This file does not exist by default, but a default version can be created using the `config.create_config_file` helper function. Modifications to the values in this file will then update the default `~lksearch.Conf` values. " ] }, { @@ -4735,6 +4735,135 @@ "source": [ "lkconfig.get_config_file()" ] + }, + { + "cell_type": "markdown", + "id": "edd120c1-cb63-462a-b997-f83f3da3c3ea", + "metadata": {}, + "source": [ + "#### lksearch Cloud Configuration\n", + "lksearch has three configuration parameters that are particularly relevant to cloud-based science platforms. These are:\n", + " - CLOUD_ONLY: Only Download cloud based data. If False, will download all data. If True, will only download data located on a cloud (Amazon S3) bucket\n", + " - PREFER_CLOUD: Prefer Cloud-based data product retrieval where available\n", + " - DDOWNLOAD_CLOUD: Download cloud based data.If False, download() will return a pointer to the cloud based datainstead of downloading it - intended usage for cloud-based science platforms (e.g. TIKE)\n", + "\n", + "CLOUD_ONLY governs whether or not non-cloud based data will be possible to be downloaded. Many science files have both a cloud-based location (typically on Amazon S3) and a MAST archive location. By default this is False, and all products will be downloaded regardless of whether the file is available via cloud-hosting or MAST archive hosting. If CLOUD_ONLY is True, only files available for download on a cloud-based platform will be retrieved. This configuration parameter is passed through to the `~astroquery.mast` parameter of the same name. \n", + "\n", + "PREFER_CLOUD governs the default download behaviour in the event that a data product is available from both a cloud-based location and a MAST-hosted archive location. If True (default), then lksearch will preferentially download files from the cloud-host rather than the MAST-hosted Archive. This configuration parameter is passed through to the `~astroquery.mast` parameter of the same name. \n", + "\n", + "DOWNLOAD_CLOUD governs whether files that are hosted on the cloud are downloaded locally. If this value is True (default), cloud-hosted files are downloaded normally. If False, then files hosted on a cloud based platform are not downloaded, and a URI containing the path to the desired file on the cloud-host is returned instead of the local path to the file. This path can then be used to read the file remotely (see `~astropy.io.fits` [working with remote and cloud hosted files](https://docs.astropy.org/en/stable/io/fits/#working-with-remote-and-cloud-hosted-files:~:text=with%20large%20files-,Working%20with%20remote%20and%20cloud%2Dhosted%20files,-Unsigned%20integers) for more information). This ability may be most relevant when using lksearch on a cloud-based science platform where the remote read is very rapid and short-term local storage comparatively expensive. \n", + "\n", + "Using this DOWNLOAD_CLOUD functionality, we can find a cloud-hosted file and read it directly into memory like so:" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "id": "745b341d-2c8a-4de4-8050-02c039f4e1ee", + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "pipeline products: 100%|███████████████████████████████████████████| 1/1 [00:00<00:00, 395.88it/s]\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", + "
Local PathStatusMessageURL
0s3://stpubdata/tess/public/tid/s0014/0000/0001...COMPLETELink to S3 bucket for remote readNone
\n", + "
" + ], + "text/plain": [ + " Local Path Status \\\n", + "0 s3://stpubdata/tess/public/tid/s0014/0000/0001... COMPLETE \n", + "\n", + " Message URL \n", + "0 Link to S3 bucket for remote read None " + ] + }, + "execution_count": 37, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "#First, lets update our configuration to not download a cloud-hosted file\n", + "from lksearch import Conf\n", + "Conf.DOWNLOAD_CLOUD=False\n", + "\n", + "# Now, lets find some data. We use this target earlier in the tutorial. \n", + "toi = TESSSearch('TOI 1161')\n", + "\n", + "#What happens when we try to download it in our updated configuration? \n", + "cloud_result = toi.timeseries.mission_products[0].download()\n", + "cloud_result" + ] + }, + { + "cell_type": "markdown", + "id": "7027025a-7883-4c05-9659-ceda59ed79b4", + "metadata": {}, + "source": [ + "As we can see above, instead of downloading the above file we have instead returned an amazon S3 URI for its cloud hosted location. If we want to access the file, we can do it using the remote-read capabilities of `~astropy.io.fits`. " + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "id": "244ccba1-3d75-427d-ae06-93abbbb5c12d", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'file': >, 'filemode': 'readonly', 'hdrLoc': 0, 'datLoc': 5760, 'datSpan': 0}\n", + "{'file': >, 'filemode': 'readonly', 'hdrLoc': 5760, 'datLoc': 20160, 'datSpan': 1935360}\n", + "{'file': >, 'filemode': 'readonly', 'hdrLoc': 1955520, 'datLoc': 1961280, 'datSpan': 2880}\n" + ] + } + ], + "source": [ + "import astropy.io.fits as fits\n", + "with fits.open(cloud_result[\"Local Path\"].values[0], use_fsspec=True, fsspec_kwargs={\"anon\": True}) as hdu:\n", + " for item in hdu:\n", + " print(item.fileinfo())" + ] } ], "metadata": {