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
@@ -124,15 +125,53 @@ If you do not have python3 installed, install it by following the instructions b
124
125
125
126
126
127
## 2. Evolving your first binary
127
-
To start using COMPAS, you will need the python script `pythonSubmitDemo.py`, which specifies all the program options (physics assumptions, output types) and runs COMPAS in the terminal. Although the primary functionality of COMPAS is to evolve a whole population of binary stars rapidly, for now, let's focus on evolving a single stellar system and examining the detailed output.
128
+
129
+
### 2.1 Running COMPAS out-of-the-box
130
+
To start using COMPAS, and after the source code has been compiled, you need to go to `$COMPAS_ROOT_DIR/preProcessing/` and run the `runSubmit.py`, which reads the options from `compasConfigDefault.yaml` and overwrite the COMPAS defaults when specified.
131
+
The `compasConfigDefault.yaml` specifies all the program options (physics assumptions, output types) and runs COMPAS in the terminal.
132
+
Your output should be similar to following.
133
+
134
+
$ python3 runSubmit.py
135
+
python_version = 3
136
+
compas_executable_override None
137
+
grid_filename None
138
+
$COMPAS_ROOT_DIR/src/COMPAS --LONG-COMMAND-LINE
139
+
140
+
COMPAS v02.25.10
141
+
Compact Object Mergers: Population Astrophysics and Statistics
If that is the case, you have succesfully installed COMPAS and ran your fist binary.
159
+
160
+
As of v02.25.10, the `runSubmit.py` and `compasConfigDefault.yaml` combo are the preferred way to set up runs using python, instead of the prevously used `pythonSubmit.py` (and their adaptations).
161
+
We will eventually update the documentation to reflect this, but for now the references to `pythonSubmit.py` or `pythonSubmitDemo.py` refer to the combined options and commands python script that has been tested and used in releases previous than v02.25.10, including those of the methods paper.
162
+
The `pythonSubmit.py`, `pythonSubmitDemo.py`, and their functionality, will eventually be fully replaced by the `runSubmit.py` and `compasConfigDefault.yaml` combo.
163
+
164
+
### 2.2 Running COMPAS from a grid file
165
+
166
+
We will now try to run a binary using a grid file. For this, you will need the python script `pythonSubmitDemo.py`, which specifies all the program options (physics assumptions, output types) and runs COMPAS in the terminal. For now, let's focus on evolving a single stellar system and examining the detailed output.
128
167
129
168
To start, change to the `examples/methods_paper_plots/detailed_evolution/` directory:
130
169
131
170
cd $COMPAS_ROOT_DIR/examples/methods_paper_plots/detailed_evolution/
132
171
133
-
Here, you will find the script `pythonSubmitDemo.py` for this demo.
172
+
Here, you will find the script `pythonSubmitDemo.py` for this demo. This file is an older version of the `runSubmit.py` and `compasConfigDefault.yaml`
173
+
134
174
135
-
### 2.1 Running COMPAS from a grid file
136
175
In population synthesis, the initial stellar population is usually generated by drawing the primary mass, secondary mass, semi-major axis, and eccentricity from their respective distributions specified in the program options. However, we illustrate COMPAS's ability to specify a grid of initial values for single and binary star evolution using COMPAS's grid functionality.
137
176
138
177
An example grid file, `Grid_demo.txt`, has been included in the current `detailed_evolution` directory. Open it with a text editor to view it:
@@ -144,7 +183,7 @@ An example grid file, `Grid_demo.txt`, has been included in the current `detaile
144
183
145
184
It should be clear that this grid file specifies a binary of zero-age main sequence stars with primary mass 35.4 Msol, secondary mass 29.3 Msol, metallicity 0.001, zero eccentricity, semi-major axis of 1.02 AU, and kick velocities for each component. For more detailed documentation of COMPAS's grid functionality for both single and binary stars, please see [Specifications](./COMPAS_Doc.pdf).
146
185
147
-
To tell the python submit script to take its input from this grid file, you usually need to open `$COMPAS_ROOT_DIR/preProcessing/pythonSubmit.py` with a text editor, and specify the grid filename `grid_filename = 'Grid_demo.txt'`. And to print the time evolution of binary properties, we need to turn on detailed output: `detailed_output = True`. COMPAS can produce logfiles of different types: HDF5, CSV, TSV, and TXT, which can be chosen by editing the line `logfile_type = 'HDF5'` (the default type is HDF5). For this demo, this has all been done for you in the file `pythonSubmitDemo.py` found in the current directory.
186
+
To tell the python submit script to take its input from this grid file, you usually need to open `$COMPAS_ROOT_DIR/preProcessing/compasConfigDefault.yaml` with a text editor, and specify the grid filename `grid: 'Grid_demo.txt'`. And to print the time evolution of binary properties, we need to turn on detailed output: `detailed-output: True`. COMPAS can produce logfiles of different types: HDF5, CSV, TSV, and TXT, which can be chosen by editing the line `logfile-type = 'HDF5'` (the default type is HDF5). For this demo, you can use the `pythonSubmitDemo.py` found in the current directory; this is a good option for v02.21.00 and previous releases. Alternatively, for more recent releases, you could choose to try and adapt the same options from the `$COMPAS_ROOT_DIR/preProcessing/compasConfigDefault.yaml` and the run via `$COMPAS_ROOT_DIR/preProcessing/runSubmit.py` script.
148
187
149
188
Now let's run COMPAS!
150
189
@@ -172,7 +211,7 @@ Now let's run COMPAS!
172
211
Congratulations! You've just made a binary black hole. And it didn't even take a second.
173
212
174
213
175
-
### 2.2 Examining detailed output
214
+
### 2.3 Examining detailed output
176
215
The COMPAS run just now produces a new directory `COMPAS_Output`, inside which you will find the following files/directories (here we assume `logfile_type = 'h5'` in the python submit file):
177
216
178
217
*`COMPAS_Output.h5`: The primary output file, containing hdf5 data groups for the relevant output physics. By default, and for a sufficiently large simulation, this will include `BSE_Common_Envelopes`, `BSE_Double_Compact_Objects`, `BSE_Supernovae`, and `BSE_System_Parameters`.
0 commit comments