changed all __main__ scripts to console_main() functions to be used as entry points

This commit is contained in:
Mayeul Aubin 2025-05-27 14:46:17 +02:00
parent f487691e03
commit 00124bbdcc
8 changed files with 45 additions and 18 deletions

View file

@ -36,8 +36,7 @@ def convert_snapshot_to_density(snapshot_path, output_path, N=None, corner=(0.0,
print("Done.")
if __name__ == "__main__":
def console_main():
parser = argparse.ArgumentParser(description="Convert snapshot to density.")
parser.add_argument(
"-S",
@ -76,4 +75,8 @@ if __name__ == "__main__":
output_path=args.output,
N=args.N,
corner=args.corner,
)
)
if __name__ == "__main__":
console_main()