improvements

This commit is contained in:
Mayeul Aubin 2025-03-06 15:29:15 +01:00
parent 3dc03cec4f
commit e488275523
11 changed files with 640 additions and 125 deletions

View file

@ -10,7 +10,7 @@ def register_arguments_main(parser:ArgumentParser):
parser.add_argument("-wd", "--workdir", type=str, default=None, help="Directory where the work is done (default is -d/work).")
parser.add_argument("-ld", "--logdir", type=str, default=None, help="Directory where the logs are saved (default is -d/logs).")
parser.add_argument("-n", "--simname", type=str, default=None, help="Name of the simulation (for outputs and parameter card).")
parser.add_argument("-M", "--mode", type=str, default="tCOLA", help="Mode of the program: ICs, PM, LPT, tCOLA, sCOLA, pre_sCOLA, post_sCOLA, alltCOLA, allsCOLA.")
parser.add_argument("-M", "--mode", type=str, default="tCOLA", help="Mode of the program: ICs, PM, LPT, tCOLA, sCOLA, pre_sCOLA, post_sCOLA, allPM, alltCOLA, allsCOLA, TS.")
parser.add_argument("-ic","--ICs_gen", type=str, default="ext", help="Initial conditions generator: ext, sbmy, monofonic")
parser.add_argument("-v", "--verbose", type=int, default=1, help="Verbosity level (0: no output, 1: basic output, 2: subprograms output).")
parser.add_argument("--seed", type=int, default=None, help="Seed for the random number generator.")
@ -49,7 +49,7 @@ def parse_arguments_main(parsed_args):
if main_dict["logdir"] is None:
main_dict["logdir"] = main_dict["directory"]+"logs/"
if main_dict["simname"] is None:
main_dict["simname"] = main_dict["mode"]
main_dict["simname"] = "sCOLA" if "sCOLA" in main_dict["mode"] else main_dict["mode"]
if main_dict["seed"] is None:
import numpy as np
main_dict["seed"] = np.random.randint(0, 2**32)