Skip to content

Commit 79d2df3

Browse files
authored
Merge pull request #563 from reinhold-willcox/directory_reorganization
Directory reorganization
2 parents a02da37 + abb026e commit 79d2df3

File tree

17 files changed

+12
-11
lines changed

17 files changed

+12
-11
lines changed

demo/demo_plot.png

-119 KB
Binary file not shown.

docs/getting_started.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,18 +124,18 @@ If you do not have python3 installed, install it by following the instructions b
124124

125125

126126
## 2. Evolving your first binary
127-
To start using COMPAS, you will need the python script pythonSubmit.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.
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.
128128

129-
To start, change to the `demo` directory:
129+
To start, change to the `examples/methods_paper_plots/detailed_evolution/` directory:
130130

131-
cd $COMPAS_ROOT_DIR/demo
131+
cd $COMPAS_ROOT_DIR/examples/methods_paper_plots/detailed_evolution/
132132

133-
Here, you will find the script pythonSubmitDemo.py for this demo.
133+
Here, you will find the script `pythonSubmitDemo.py` for this demo.
134134

135135
### 2.1 Running COMPAS from a grid file
136136
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.
137137

138-
An example grid file, `Grid_demo.txt`, has been included in the `demo` directory. Open it with a text editor to view it:
138+
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:
139139

140140
# Demo BSE Grid file
141141

@@ -144,7 +144,7 @@ An example grid file, `Grid_demo.txt`, has been included in the `demo` directory
144144

145145
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, and semi-major axis of 1.02 AU. For more detailed documentation of COMPAS's grid functionality for both single and binary stars, please see [Specifications](./COMPAS_Doc.pdf).
146146

147-
To tell the python submit script to take its input from this grid file, you need to open `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`.
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.
148148

149149
Now let's run COMPAS!
150150

@@ -181,10 +181,10 @@ The COMPAS run just now produces a new directory `COMPAS_Output`, inside which y
181181

182182
We examine `BSE_Detailed_Output_0.h5` to look at the evolution of the two stars. A default python plotting script has been included to visualise the data. Let's run the script:
183183

184-
python3 $COMPAS_ROOT_DIR/demo/single_sys_plotter.py
184+
python3 single_sys_plotter.py
185185

186186
This should produce the following plot:
187-
![demo_plot](../demo/demo_plot.png)
187+
![demo_plot](../examples/methods_paper_plots/detailed_evolution/gw151226evol.png)
188188

189189

190190
COMPAS provides many tools for analysing and post-processing the data. Please view the post-processing documentation in `COMPAS/postProcessing`.

docs/sampling.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ If you have not already, you will need to install Stroopwafel. If you have admin
1717

1818
---------------
1919

20-
To use Stroopwafel sampling, copy `defaults/stroopwafelInterface.py` into your working directory.
20+
To use Stroopwafel sampling, copy `preProcessing/stroopwafelInterface.py` into your working directory.
2121

2222

2323
### Settings
@@ -30,7 +30,7 @@ If you have many non-default COMPAS arguments, you may want to set them in the
3030
`pythonSubmit.py` file in the same directory. For now, the file must be named this way
3131
and placed in the same directory as the `stroopwafelInterface.py` file.
3232

33-
A configurable pythonSubmit file can be found in the `defaults/` directory.
33+
A configurable pythonSubmit file can be found in the `preProcessing/` directory.
3434

3535
Set your desired options, then set the `usePythonSubmit` parameter to `True`
3636
in the `stroopwafelInterface.py`.

demo/demo_chirpmass_dist.ipynb renamed to examples/methods_paper_plots/chirpmass_distribution/chirpmass_dist.ipynb

File renamed without changes.

demo/Grid_demo.txt renamed to examples/methods_paper_plots/detailed_evolution/Grid_demo.txt

File renamed without changes.

demo/single_sys_plotter.py renamed to examples/methods_paper_plots/detailed_evolution/detailed_evol_plotter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def main():
8585
fig.subplots_adjust(left=0.05) #adjusting boundaries of the plotter
8686
fig.subplots_adjust(wspace=.3)
8787
plt.savefig('gw151226evol.eps', format='eps')
88+
plt.savefig('gw151226evol.png', format='png')
8889
plt.show()
8990

9091

demo/gw151226evol.eps renamed to examples/methods_paper_plots/detailed_evolution/gw151226evol.eps

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
87.1 KB
Loading

demo/pythonSubmitDemo.py renamed to examples/methods_paper_plots/detailed_evolution/pythonSubmitDemo.py

File renamed without changes.

0 commit comments

Comments
 (0)