You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# we should fix this one day - we should not assume that the COMPAS executable
33
+
# is in the 'src' directory. The standard is to put the object files created
34
+
# by the compile into the 'obj' directory, and the executable files created by
35
+
# the link in the 'bin' directory.
36
+
#
37
+
# for now though, because this is how everybody expects it to be, we'll just check
38
+
# that the path to the root directory (the parent directory of the directory in
39
+
# which we expect the executable to reside - for now, 'src') is set to something.
40
+
41
+
compas_root_dir=os.environ.get('COMPAS_ROOT_DIR')
42
+
assertcompas_root_dirisnotNone, "Unable to locate the COMPAS executable: check that the environment variable COMPAS_ROOT_DIR is set correctly, and the COMPAS executable exists."
43
+
44
+
# construct path to executable
45
+
#
46
+
# ideally we wouldn't have the 'src' directory name (or any other directory name)
47
+
# prepended to the executable name - if we just execute the executable name on its
48
+
# own, as long as the user navigates to the directory in which the executable resides
49
+
# they don't need to set the COMPAS_ROOT_DIR environment variable
# check that a file with the correct name exists where we expect it to
56
+
assertos.path.isfile(compas_executable), "Unable to locate the COMPAS executable: check that the environment variable COMPAS_ROOT_DIR is set correctly, and the COMPAS executable exists."
57
+
58
+
37
59
enable_warnings=False# option to enable/disable warning messages
38
60
39
-
number_of_systems=int(1e2) #number of systems per batch
61
+
number_of_systems=int(1e2) # number of systems per batch
40
62
41
63
populationPrinting=False
42
64
43
65
randomSeedFileName='randomSeed.txt'
44
66
ifos.path.isfile(randomSeedFileName):
45
67
random_seed=int(np.loadtxt(randomSeedFileName))
46
68
else:
47
-
random_seed=0# If you want a random seed, use: np.random.randint(2,2**63-1)
69
+
random_seed=0# If you want a random seed, use: np.random.randint(2,2**63-1)
48
70
49
71
# environment variable COMPAS_LOGS_OUTPUT_DIR_PATH is used primarily for docker runs
50
72
# if COMPAS_LOGS_OUTPUT_DIR_PATH is set (!= None) it is used as the value for the
@@ -55,7 +77,7 @@ class pythonProgramOptions:
55
77
56
78
if (compas_logs_output_overrideisNone):
57
79
output=os.getcwd()
58
-
output_container=None# names the directory to be created and in which log files are created. Default in COMPAS is "COMPAS_Output"
80
+
output_container=None# names the directory to be created and in which log files are created. Default in COMPAS is "COMPAS_Output"
59
81
else:
60
82
output=compas_logs_output_override
61
83
output_container=None
@@ -76,6 +98,9 @@ class pythonProgramOptions:
76
98
hyperparameterList=False
77
99
shareSeeds=False
78
100
101
+
notes_hdrs=None# no annotations header strings (no annotations)
102
+
notes=None# no annotations
103
+
79
104
mode='BSE'# evolving single stars (SSE) or binaries (BSE)?
80
105
81
106
grid_filename=None# grid file name (e.g. 'mygrid.txt')
# we should fix this one day - we should not assume that the COMPAS executable
40
+
# is in the 'src' directory. The standard is to put the object files created
41
+
# by the compile into the 'obj' directory, and the executable files created by
42
+
# the link in the 'bin' directory.
43
+
#
44
+
# for now though, because this is how everybody expects it to be, we'll just check
45
+
# that the path to the root directory (the parent directory of the directory in
46
+
# which we expect the executable to reside - for now, 'src') is set to something.
47
+
48
+
compas_root_dir=os.environ.get('COMPAS_ROOT_DIR')
49
+
assertcompas_root_dirisnotNone, "Unable to locate the COMPAS executable: check that the environment variable COMPAS_ROOT_DIR is set correctly, and the COMPAS executable exists."
50
+
51
+
# construct path to executable
52
+
#
53
+
# ideally we wouldn't have the 'src' directory name (or any other directory name)
54
+
# prepended to the executable name - if we just execute the executable name on its
55
+
# own, as long as the user navigates to the directory in which the executable resides
56
+
# they don't need to set the COMPAS_ROOT_DIR environment variable
# check that a file with the correct name exists where we expect it to
63
+
assertos.path.isfile(compas_executable), "Unable to locate the COMPAS executable: check that the environment variable COMPAS_ROOT_DIR is set correctly, and the COMPAS executable exists."
64
+
65
+
43
66
enable_warnings=False# option to enable/disable warning messages
44
67
45
-
number_of_systems=10#number of systems per batch
68
+
number_of_systems=10# number of systems per batch
46
69
47
70
populationPrinting=False
48
71
49
72
randomSeedFileName='randomSeed.txt'
50
73
ifos.path.isfile(randomSeedFileName):
51
74
random_seed=int(np.loadtxt(randomSeedFileName))
52
75
else:
53
-
random_seed=0# If you want a random seed, use: np.random.randint(2,2**63-1)
76
+
random_seed=0# If you want a random seed, use: np.random.randint(2,2**63-1)
54
77
55
78
# environment variable COMPAS_LOGS_OUTPUT_DIR_PATH is used primarily for docker runs
56
79
# if COMPAS_LOGS_OUTPUT_DIR_PATH is set (!= None) it is used as the value for the
@@ -61,7 +84,7 @@ class pythonProgramOptions:
61
84
62
85
if (compas_logs_output_overrideisNone):
63
86
output=os.getcwd()
64
-
output_container=None# names the directory to be created and in which log files are created. Default in COMPAS is "COMPAS_Output"
87
+
output_container=None# names the directory to be created and in which log files are created. Default in COMPAS is "COMPAS_Output"
65
88
else:
66
89
output=compas_logs_output_override
67
90
output_container=None
@@ -82,9 +105,12 @@ class pythonProgramOptions:
82
105
hyperparameterList=False
83
106
shareSeeds=False
84
107
108
+
notes_hdrs=None# no annotations header strings (no annotations)
109
+
notes=None# no annotations
110
+
85
111
mode='BSE'# evolving single stars (SSE) or binaries (BSE)?
86
112
87
-
grid_filename='Grid_demo.txt'# grid file name (e.g. 'mygrid.txt')
113
+
grid_filename='Grid_demo.txt'# grid file name (e.g. 'mygrid.txt')
88
114
89
115
ifgrid_filename!=None:
90
116
ifcompas_input_path_override==None:
@@ -142,6 +168,8 @@ class pythonProgramOptions:
142
168
common_envelope_mass_accretion_min=0.04# For 'MACLEOD+2014' [Msol]
143
169
common_envelope_mass_accretion_max=0.10# For 'MACLEOD+2014' [Msol]
0 commit comments