-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
48 lines (43 loc) · 1.24 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#Example Star
#name=KIC 8462852 quarter=16
#####################################
import lightkurve as lk
import matplotlib.pyplot as plt
import numpy as np
star = input('Type Name Of Star: ')
print('\n')
search_result = lk.search_lightcurve(str(star))
print(search_result)
print('\n')
quarter_num = input('Type Number Of Quarter: ')
print(search_result[int(quarter_num)])
print('\n')
lcf = lk.search_lightcurve(str(star), quarter=quarter_num).download()
#####################################
object_name = lcf.object
origin_data = lcf.origin
telescope = lcf.telescop
instrument = lcf.instrume
date = lcf.date
raobj = lcf.ra_obj
decobj = lcf.dec_obj
equinox_data = lcf.equinox
exposure_Data = str(lcf.exposure)
#####################################
print('Name: ' + object_name)
print('Origin: ' + origin_data)
print('Telescope: ' + telescope)
print('Instrument: ' + instrument)
print('Date: ' + date)
print('Exposure: ' + exposure_Data)
print('CDPP: ' + str(lcf.estimate_cdpp()))
print('\n')
#####################################
lc = lcf.PDCSAP_FLUX.normalize()
pg = lc.to_periodogram(method="bls")
fold = lc.fold(period=pg.period_at_max_power)
print('Period at max power: {:.3f}'.format(pg.period_at_max_power))
pg.plot()
lc.plot()
fold.plot()
plt.show()