Created
May 27, 2023 15:27
-
-
Save sumanchapai/0eec38708d46a49c5f57bcea128bd7b6 to your computer and use it in GitHub Desktop.
Luther Astrophysics. Brightness duplicate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Boilerplate to allow importing `trout` | |
import sys | |
if ".." not in sys.path: | |
sys.path.append("..") | |
if "." not in sys.path: | |
sys.path.append(".") | |
from trout.exceptions import StarNotPresentInReferenceException | |
from trout.stars import Star | |
from trout.stars.utils import STAR_END, STAR_START | |
print(f"{'Star':<10s}{'Duplicate': ^20s}{'Distance':^20s}", flush=True) | |
for s in range(STAR_START, STAR_END): | |
try: | |
d = Star(s).brightest_duplicate() | |
if d: | |
print(f"{s:<10}{d[0]:^20}{d[1]:^20.5f}", flush=True) | |
except StarNotPresentInReferenceException: | |
continue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment