deeplink to this page
student projects
teaching
Getting started with your student projectOnce we have agreed on a project, there are many things that need to be arranged before we can start to work on the content. This page tells you what to do. Get access to the Ornstein lab ↷Get access to the Ornstein lab ↺During your project, you will work in the student room of the institute of GRAvitational and Subatomic Particles (GRASP) on the second floor of the Ornstein Laboratory (OL). Since the OL is a bit of a fortress, you will need a UU access card to let you into the building. Our secretariat can arrange both the card (in case you haven’t one yet) and the access. You can either remind me to send them an email, or send them an email yourself, mentioning and Cc-ing me. Getting access to the building requires a short online safety course.Setup your Windows laptop ↷Setup your Windows laptop ↺If you are using a Windows laptop, you will probably need to set it up for this project. See this page for the possibilities. If you have a Linux machine or Mac, things will probably be much simpler.Get a Nikhef account ↷Get a Nikhef account ↺We will use the compute tools and resources at Nikhef. Please remind me to send you this form, so that you can fill it out, sign it and send it to me via email. Ensure to fill out:
Git ↷Git ↺
Python ↷Python ↺
Fortran ↷Fortran ↺
Bash/terminal/shell ↷Bash/terminal/shell ↺
Use and explore your Nikhef account ↷Use and explore your Nikhef account ↺Once you have your Nikhef account:
LaTeX ↷LaTeX ↺
Binaries and GWs: theory and observations ↷Binaries and GWs: theory and observations ↺Binary evolution and GWs
DWDs
γ-EE
LIGO-Virgo-KAGRA detectionsPopulation synthesis ↷Population synthesis ↺The BSE-postprocess code
$ ./bse-postprocess.py -h # Show all the options (-h == --help) usage: bse-postprocess [-h] [-r REPLICATION] [-p] [-s MIN_SIGMA] [-S MAX_SIGMA] [-v | -q | -d] input_file Postprocess output from the BSE/Popbin population-synthesis code (Utrecht branch). positional arguments: input_file name of the input file, e.g. DWDs_000001.out options: -h, --help show this help message and exit -r REPLICATION, --replication REPLICATION replicate each zero-age binary with this factor (default: 25) -p, --plot create plots (default: False) -s MIN_SIGMA, --min-sigma MIN_SIGMA use 1-, 2- or 3-sigma accuracies as minimum (default: 3) -S MAX_SIGMA, --max-sigma MAX_SIGMA use 1-, 2- or 3-sigma accuracies as maximum (default: 3) -v, --verbosity increase output verbosity (default: 1) -q, --quiet produce no output (default: False) -d, --debug print debug/test info (default: False) $ ./bse-postprocess.py DWDs_test_1000.out # Run on the test file Reading input file DWDs_test_1000.out... Replicating DWDs 25 times... Evolving and filtering DWDs... Matches 3-sigma tau: 2: [0. 3. 2. 0. 0. 0. 0. 0. 0. 0. 0.] Matches 3-sigma no tau: 2: [0. 3. 2. 0. 0. 0. 0. 0. 0. 0. 0.] Number of matched observed DWDs with tau: 2 Matched observed DWDs with tau: [1 2] Non-matched observed DWDs with tau: [ 0 3 4 5 6 7 8 9 10] Number of matched observed DWDs without tau: 2 Matched observed DWDs without tau: [1 2] Non-matched observed DWDs without tau: [ 0 3 4 5 6 7 8 9 10] $ ./bse-postprocess.py -p DWDs_test_1000.out # Run on the test file AND make the plotsNote that when running in an IDE, you need to pass the command-line options to your IDE. This section shows how to so that with PyCharm, using the Parameters field. For Spyder, this answer is useful. The BSE/Popbin code
Building the BSE/Popbin codeIn order to build the Utrecht BSE/Popbin code, you first need to install the build tools andlibSUFR library. You can download the
latest libSUFR tarball
from SourceForge.
Install build tools: Linux and macOSDepending on the Linux flavour you use, your package manager may be called something likeemerge, pacman, apt, apt-get, aptitude, yum
or something else. For macOS you can use Homebrew (command brew). The command will
look something like, but you may need to install gfortran instead of gcc (gfortran is part of
gcc):
sudo apt install wget make cmake gfortran # Ubuntu family pacman -S wget make cmake gcc # Arch Linux and related emerge -vau net-misc/wget sys-devel/gcc dev-build/make dev-build/cmake # Gentoo Linux and related - probably already installed brew install wget make cmake gcc # MacOS Install build tools: MS WindowsApparently, there exists something called Windows subsystem for Linux (WSL), which sounds like a Linux subsystem for Windows. It is allegedly an attempt by Microsoft to make Windows useful for professionals, and may be your best bet to turn your laptop into a machine useful to do science on. Since I cannot (legally) download Windows for free, I cannot experiment with this — please let me know what is needed to do this if you succeeded in installing and using WSL. From what I hear, this is simply a virtual machine running Ubuntu. See also my Windows page.
If this did not work, or perhaps needed in addition to WSL, you can try Cygwin to get a
Linux-like environment on your Windows machine. Or perhaps Chocolatey to install the
packages Build dependencies: most OSs(If on Windows, ensure you have your Linux-like environment installed.) You can usewget to download libSUFR to the current directory - ensure you use
the latest version. (Alternatively, use your browser to download and save the tarball in the
desired directory.)
mkdir /some/directory/where/you/want/to/install/libsufr cd /some/directory/where/you/want/to/install/libsufr wget https://sourceforge.net/projects/libsufr/files/libsufr-0.7.8.tar.gz tar xfz libsufr-0.7.8.tar.gz cd libsufr-0.7.8/ mkdir build cd build/ FC=gfortran cmake .. make Get, configure and compile BSE/PopbinAfter installinglibSUFR, from the build/ directory, do
cd ../usr pwd ls -l ls -l include/libSUFR/ # Should contain *.mod files ls -l lib/ # Should contain libSUFR.*Next we need to get and build BSE/Popbin itself. Ensure you have set up ssh access to Nikhef, preferably with an ssh key. Then cd /some/directory/BELOW/WHICH/you/want/to/install/BSE git clone git@gitlab.nikhef.nl:sluys/bse-code.git cd bse-code/ cp doc/Makefile . # Copy the Makefile from the dir where it is shipped to your compile dirThe shipped Makefile is for my system; we need to adapt it for yours. In particular,
we need to tell it where to find libSUFR. Open the Makefile in your favourite
text editor (not Word, a text editor). Find the block that says gfortran and
within that block the lines that start with CFLAGS += -I and LFLAGS += -l.
The change them to read
CFLAGS += -I/the/path/to/your/module/files LFLAGS += -L/the/path/to/your/library/files -lSUFRHere, -lSUFR is the name of the library files (libSUFR.*), where lib
replaced by -l and the extensions have been dropped. Save the file as plain
text! and in the directory of the edited Makefile run
mkdir mod obj # create directories for the compiler to use make # this should call gfortran to build (compile and link) `sse`, `bse` and `popbin`Your directory should now contain a binary executable (note the x at the front)
called popbin:
ls -l -rwxr-xr-x 1 sluys 237K Fri 28 Feb 14:47 popbin Running BSE/PopbinIn order to run thepopbin binary executable, you need
popbin.) Once you are in the
directory with these two files, ensure to create no more than 1000 binaries by
editing binary.in and simply run
./popbin # should take the binary.in in the current directory and run whatever is set in thereAlternatively, you can
./popbin & # Run it in the background - you get your prompt back and can do other things in your terminal while popbin is running
./popbin binary2.in # Run with a different settings file
time ./popbin # time how long a run takes
wc -l binaries.out # See how many lines are in the output file (yet)
less DWDs.out # Have a peek, use space to jump forward,
|