identify_unknown_sptypes: add colorcoding to the output
This commit is contained in:
@@ -1,6 +1,16 @@
|
|||||||
from astroquery.simbad import Simbad
|
from astroquery.simbad import Simbad
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
|
class bcolors:
|
||||||
|
HEADER = '\033[95m'
|
||||||
|
OKBLUE = '\033[94m'
|
||||||
|
OKGREEN = '\033[92m'
|
||||||
|
WARNING = '\033[93m'
|
||||||
|
FAIL = '\033[91m'
|
||||||
|
ENDC = '\033[0m'
|
||||||
|
BOLD = '\033[1m'
|
||||||
|
UNDERLINE = '\033[4m'
|
||||||
|
|
||||||
simbad = Simbad()
|
simbad = Simbad()
|
||||||
|
|
||||||
bvStars = ["1RXS J064643.6-770027", "BD-08 995", "CPD-19 878", "PM J07058-5848", "TYC 1360-957-1", "TYC 4595-107-1"]
|
bvStars = ["1RXS J064643.6-770027", "BD-08 995", "CPD-19 878", "PM J07058-5848", "TYC 1360-957-1", "TYC 4595-107-1"]
|
||||||
@@ -69,13 +79,13 @@ for star in bvStars:
|
|||||||
bestMatchIndexUBVonlyWeighted = distancesUBVonlyWeighted.idxmin()
|
bestMatchIndexUBVonlyWeighted = distancesUBVonlyWeighted.idxmin()
|
||||||
bestMatchNameUBVonlyWeighted = spTypeTable.iloc[bestMatchIndexUBVonlyWeighted, 0]
|
bestMatchNameUBVonlyWeighted = spTypeTable.iloc[bestMatchIndexUBVonlyWeighted, 0]
|
||||||
|
|
||||||
print(f"--- {star['MAIN_ID'].value[0]} ---")
|
print(f"--- {bcolors.BOLD}{bcolors.OKGREEN}{star['MAIN_ID'].value[0]}{bcolors.ENDC} ---")
|
||||||
print("Table entry: ")
|
print(f"Best no weights match: {bcolors.FAIL}{bestMatchNameUBV}{bcolors.ENDC}")
|
||||||
print(spTypeTable.iloc[bestMatchIndexUBVIJHK:bestMatchIndexUBVIJHK+1])
|
print(spTypeTable.iloc[bestMatchIndexUBVIJHK:bestMatchIndexUBVIJHK+1])
|
||||||
print("Weighted Table entry:")
|
print(f"Best weights match: {bcolors.FAIL}{bestMatchNameUBVweighted}{bcolors.ENDC}")
|
||||||
print(spTypeTable.iloc[bestMatchIndexUBVIJHKweighted:bestMatchIndexUBVIJHKweighted+1])
|
print(spTypeTable.iloc[bestMatchIndexUBVIJHKweighted:bestMatchIndexUBVIJHKweighted+1])
|
||||||
print("UBV Table entry:")
|
print(f"Best UBV match: {bcolors.FAIL}{bestMatchNameUBVonlyWeighted}{bcolors.ENDC}")
|
||||||
print(spTypeTable.iloc[bestMatchIndexUBVonlyWeighted:bestMatchIndexUBVonlyWeighted+1])
|
print(spTypeTable.iloc[bestMatchIndexUBVonlyWeighted:bestMatchIndexUBVonlyWeighted+1])
|
||||||
print("Star: ")
|
print(f"Star: ")
|
||||||
print(fluxDiff)
|
print(fluxDiff)
|
||||||
print("-------------------------------------------------------------------------------------")
|
print("-------------------------------------------------------------------------------------")
|
||||||
Reference in New Issue
Block a user