Created
May 27, 2023 15:26
-
-
Save sumanchapai/7aef20f080451b241796cbb4fa0cd555 to your computer and use it in GitHub Desktop.
Luther Astrophysics. Step analysis on m23
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(".") | |
import argparse | |
import warnings | |
from trout.vis import print_step_info | |
def main(): | |
parser = argparse.ArgumentParser( | |
""" | |
This step analyzer prints the ordered list of step from `from_year` to `to_year` | |
for `first_star` <= stars `last_star` such that the star is present in both the | |
years | |
""" | |
) | |
parser.add_argument( | |
"first_star", | |
type=int, | |
) | |
parser.add_argument( | |
"last_star", | |
type=int, | |
) | |
parser.add_argument("from_year", type=int, help="year to compare against") | |
parser.add_argument("to_year", type=int, help="year to comapre") | |
args = parser.parse_args() | |
print_step_info(args.first_star, args.last_star, args.from_year, args.to_year) | |
if __name__ == "__main__": | |
warnings.simplefilter("ignore") | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment