Downloading data

One of the core features in SMURFS is the downloading of data from MAST directly. To download these light curves, simply instantiate a smurfs object. Lets download the TESS observations for our favourite Delta Scuti pulsator: Beta Pictoris

[1]:
from smurfs import Smurfs
[2]:
star = Smurfs(target_name="Beta Pictoris")
 Searching processed light curves for Beta Pictoris on mission(s) TESS ...  
 Resolving Beta Pictoris to TIC using MAST ... 
 TIC ID for Beta Pictoris: TIC 270577175 
 Short cadence observations available for Beta Pictoris. Downloading ... 
 Found processed light curve for Beta Pictoris! 
 Using TESS observations! Combining sectors ... 
 Total observation length: 105.18 days. 
 Duty cycle for Beta Pictoris: 86.02% 
[3]:
star.plot_lc()
../_images/examples_downloading_data_3_0.png

But using the most common name alone isn’t the only thing we can use here. We can also use the Gaia ID for example:

[4]:
star = Smurfs(target_name="Gaia DR2 4792774797545105664")
 Searching processed light curves for Gaia DR2 4792774797545105664 on mission(s) TESS ...  
 Resolving Gaia DR2 4792774797545105664 to TIC using MAST ... 
 TIC ID for Gaia DR2 4792774797545105664: TIC 270577175 
 Short cadence observations available for Gaia DR2 4792774797545105664. Downloading ... 
 Found processed light curve for Gaia DR2 4792774797545105664! 
 Using TESS observations! Combining sectors ... 
 Total observation length: 105.18 days. 
 Duty cycle for Gaia DR2 4792774797545105664: 86.02% 
[5]:
star.plot_lc()
../_images/examples_downloading_data_6_0.png

As we can see, both stars are the same, as their TIC IDs are the same.

LC data

But downloading SC data from TESS is easy. We can also download LC data for TESS targets. Lets consider the star ET Cha

[6]:
star = Smurfs(target_name='ET Cha')
 Searching processed light curves for ET Cha on mission(s) TESS ...  
 Resolving ET Cha to TIC using MAST ... 
 TIC ID for ET Cha: TIC 323292671 
 No short cadence data available for ET Cha, extracting from FFI ... 
 Extracting light curves from FFIs, this may take a bit ...  
 Found star in Sector(s) 11 12 13 
  
  
  
 Extracted light curve for TIC 323292671! 
 Total observation length: 82.48 days. 
 Duty cycle for ET Cha: 92.88% 
../_images/examples_downloading_data_8_1.png
../_images/examples_downloading_data_8_2.png
../_images/examples_downloading_data_8_3.png
../_images/examples_downloading_data_8_4.png

As you can see above, if you provide a LC target, SMURFS will automatically generate a validation page for its reduction. At the top, you can see the combination of all three sectors, representing the first page in the pdf. The other pages consist of the individual sectors and their reductions. You can see the individual fluxes. By default it always uses the PCA flux. It also shows you the Background flux of the CCD in the plot below that and the aperture as well as the FFI below that.

But which flux is the best? You can pass the pca and psf flag, to show you all the different fluxes available through the Eleanor pipeline.

[7]:
star = Smurfs(target_name='ET Cha',do_pca=True,do_psf=True)
 Searching processed light curves for ET Cha on mission(s) TESS ...  
 Resolving ET Cha to TIC using MAST ... 
 TIC ID for ET Cha: TIC 323292671 
 No short cadence data available for ET Cha, extracting from FFI ... 
 Extracting light curves from FFIs, this may take a bit ...  
 Found star in Sector(s) 11 12 13 
WARNING:tensorflow:From /Users/marco/Documents/Dev/science/smurf/venv/lib/python3.6/site-packages/eleanor_mamu-1.0.2-py3.6.egg/eleanor/targetdata.py:826: The name tf.logging.set_verbosity is deprecated. Please use tf.compat.v1.logging.set_verbosity instead.

WARNING:tensorflow:From /Users/marco/Documents/Dev/science/smurf/venv/lib/python3.6/site-packages/eleanor_mamu-1.0.2-py3.6.egg/eleanor/targetdata.py:826: The name tf.logging.ERROR is deprecated. Please use tf.compat.v1.logging.ERROR instead.

100%|██████████| 1248/1248 [00:12<00:00, 99.27it/s]
  
100%|██████████| 1289/1289 [00:12<00:00, 106.55it/s]
  
100%|██████████| 1320/1320 [00:12<00:00, 102.56it/s]
  
 Extracted light curve for TIC 323292671! 
 Total observation length: 82.48 days. 
 Duty cycle for ET Cha: 92.88% 
../_images/examples_downloading_data_10_7.png
../_images/examples_downloading_data_10_8.png
../_images/examples_downloading_data_10_9.png
../_images/examples_downloading_data_10_10.png

All available fluxes are now visible in the Validation page. The PCA flux seems to be the best for this target, which is the default flux used. If we would want to use any other, we could pass the flux_type parameter.

[8]:
star = Smurfs(target_name='ET Cha', flux_type='SAP')
 Searching processed light curves for ET Cha on mission(s) TESS ...  
 Resolving ET Cha to TIC using MAST ... 
 TIC ID for ET Cha: TIC 323292671 
 No short cadence data available for ET Cha, extracting from FFI ... 
 Extracting light curves from FFIs, this may take a bit ...  
 Found star in Sector(s) 11 12 13 
  
  
  
 Extracted light curve for TIC 323292671! 
 Total observation length: 82.48 days. 
 Duty cycle for ET Cha: 92.80% 
../_images/examples_downloading_data_12_1.png
../_images/examples_downloading_data_12_2.png
../_images/examples_downloading_data_12_3.png
../_images/examples_downloading_data_12_4.png

Other misssions

We can also use other missions if we like. Lets have a look at the Star Kepler-10 from the Kepler mission:

[9]:
star = Smurfs(target_name='Kepler-10', mission='Kepler')
 Searching processed light curves for Kepler-10 on mission(s) Kepler ...  
 Found processed light curve for Kepler-10! 
 Using Kepler observations! Combining sectors ... 
 Total observation length: 1470.46 days. 
 Duty cycle for Kepler-10: 75.40% 
[10]:
star.plot_lc()
../_images/examples_downloading_data_15_0.png

The default is however TESS. So if we don’t provide the mission parameter, SMURFS will download the SC data.

[11]:
star = Smurfs(target_name='Kepler-10')
 Searching processed light curves for Kepler-10 on mission(s) TESS ...  
 Resolving Kepler-10 to TIC using MAST ... 
 TIC ID for Kepler-10: TIC 377780790 
 Short cadence observations available for Kepler-10. Downloading ... 
 Found processed light curve for Kepler-10! 
 Using TESS observations! Combining sectors ... 
 Total observation length: 26.85 days. 
 Duty cycle for Kepler-10: 96.44% 
[12]:
star.plot_lc()
../_images/examples_downloading_data_18_0.png
[ ]: