-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
58 lines (53 loc) · 1.88 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
49
50
51
52
53
54
55
56
57
58
# Import utils
from src.downloader import downloader
from src.converter import converter
from src.obstructionDetector import obstructionDetector
from src.view import View
from src.sort import Sort
from colorama import Fore
class umdInfo:
def getQuery(self):
response = input(Fore.MAGENTA +
"""
[!] Select What you would like to do
1) Download FITS images
2) Analyze FITS Images
3) Export Results
4) View FITS
5) Close Tool
=> """
)
# Handle input
match response:
case "1":
print(Fore.CYAN + "[*] You selected: Download FITS images")
handler = downloader.downloadFits()
print(Fore.CYAN + '\n[!] Sorting files')
print(Fore.GREEN + "[!] Finished downloading FITS files")
return self.getQuery()
case "2":
print(Fore.CYAN + "[*] You selected: Analyze FITS Images")
a = Sort()
a.organize()
handler = obstructionDetector.obstructionDetector()
print(Fore.GREEN + "[!] Finished analyzing FITS files")
return self.getQuery()
case "3":
print(Fore.CYAN + "[*] You selected: Export Results")
a = Sort()
a.csvGen()
a.getData()
print(Fore.GREEN + '[!] Finished Exporting results as "data.csv"')
return self.getQuery()
case "4":
print(Fore.CYAN + "[*] You selected: View FITS")
View.view_multiple()
return self.getQuery()
case "5":
print(Fore.GREEN + '[!] Thank you! Have a good day.')
quit()
case _:
print("[!] Please enter one of the options!")
return self.getQuery()
instance = umdInfo()
instance.getQuery()