<jupyter_start><jupyter_text>Table of Contents* [Standard Package and Notebook Stuff](Standard-Package-and-Notebook-Stuff)* [Enter the TIC ID of your Object](Enter-the-TIC-ID-of-your-Object)* [Making the Light Curve](Making-the-Light-Curve)    * [Download the Light Curve File](Download-the-Light-Curve-File)    * [Plot the Full Light Curve](Plot-the-Full-Light-Curve)        * [Make a Periodogram from the Full Light Curve and Find the Periodicity](Make-a-Periodogram-from-the-Full-Light-Curve-and-Find-the-Periodicity)    * [Plot a Folded Light Curve](Plot-a-Folded-Light-Curve)        * [Bin the Folded Light Curve and Plot the Binned Light Curve](Bin-the-Folded-Light-Curve-and-Plot-the-Binned-Light-Curve)    * [Send the Full Light Curve to a Data Frame](Send-the-Full-Light-Curve-to-a-Data-Frame)        * [Create a .txt File with the Full Light Curve's Values](Create-a-.txt-File-with-the-Full-Light-Curve's-Values)        * [Assign Data Frame Values to Variables for External Analysis](Assign-Data-Frame-Values-to-Variables-for-External-Analysis)            * [Normalize the Full Light Curve's Flux](Normalize-the-Full-Light-Curve's-Flux)              Standard Package and Notebook Stuff<jupyter_code>from lightkurve import search_lightcurvefile
import matplotlib.pyplot as plt
import numpy as np
import scipy.signal
import pandas as pd
%config InlineBackend.figure_format = 'retina'
%matplotlib notebook<jupyter_output><empty_output><jupyter_text>Enter the TIC (TESS Input Catalog) ID of your Object<jupyter_code>TIC_ID = 5051080 #this is a new hot subdwarf system found in TESS by HPU students<jupyter_output><empty_output><jupyter_text>*Making the Light Curve*  Download the Light Curve File<jupyter_code>lcf = search_lightcurvefile(TIC_ID, mission='TESS').download()<jupyter_output><empty_output><jupyter_text>Plot the Full Light Curve<jupyter_code>lc = lcf.PDCSAP_FLUX.remove_nans().remove_outliers()
lc.scatter()<jupyter_output><empty_output><jupyter_text>Make a Periodogram from the Full Light Curve and Find the Periodicity<jupyter_code>pg = lc.to_periodogram()
pg.smooth().plot()
P = np.float64(pg.period_at_max_power)
print('P =', P,'days')
print('P =', P*24,'hours')<jupyter_output><empty_output><jupyter_text>Plot a Folded Light Curve<jupyter_code>folded_lc = lc.fold(P)
folded_lc.scatter()<jupyter_output><empty_output><jupyter_text>Bin the Folded Light Curve and Plot the Binned Light Curve<jupyter_code>binned_lc = folded_lc.bin(binsize=np.sqrt(len(lc.time)))
binned_lc.scatter()
plt.savefig(f'{TIC_ID}_lc.png',dpi=500,bbox_inches='tight')<jupyter_output><empty_output><jupyter_text>Send the Full Light Curve to a Data Frame<jupyter_code>dc = lc.to_table()
dc<jupyter_output><empty_output><jupyter_text>Create a .txt File with the Full Light Curve's Values<jupyter_code>tic_table = pd.DataFrame(data={'Time':dc['time'],'flux':dc['flux'],'flux_err':dc['flux_err']})
tic_table.to_csv(f'{TIC_ID}.txt',sep=' ',index=False)<jupyter_output><empty_output><jupyter_text>Assign Data Frame Values to Variables for External Analysis<jupyter_code>time = dc['time']
flux = dc['flux']<jupyter_output><empty_output><jupyter_text>Normalize the Full Light Curve's FluxFrom here you can continue on with your own analysis of the light curve with full control of the data should you desire to.<jupyter_code>flux = flux/np.median(flux)
flux_err = dc['flux_err']
flux_err = flux_err/np.median(flux_err)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12026790914385556, 'fraction_numerical': 0.004076878276062901, 'mean_word_length': 6.45119305856833, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '11', 'dir': 'jupyter-structured-clean-dedup', 'id': '199989', 'license': 'MIT', 'n_tokens_mistral': 1262, 'n_tokens_neox': 1203, 'n_words': 261, 'path': 'A_Quickstart_Tutorial_to_Making_TESS_Light_Curves_using_Lightkurve.ipynb', 'repo_name': 'kcorcora/TESS_LC_Quickstart_Tutorial', 'size': '3434'}