deeplink to this page
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 programmed 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.Get a Nikhef account ↷Get a Nikhef account ↺We can use the compute tools and resources at Nikhef. To apply for a Nikhef account, remind me to send you this form, 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: theory and observations ↷Binaries: theory and observations ↺GeneralDWDs
LIGO-Virgo-KAGRA detectionsPopulation synthesis ↷Population synthesis ↺The BSE-postprocess code
Note 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.$ ./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 plots 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 and libSUFR 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 like emerge, pacman, apt, apt-get, aptitude, yum or something else. For macOS you can use Homebrew (command brew). The command will look something likeemerge -vau net-misc/wget sys-devel/gcc dev-build/make dev-build/cmake # Gentoo Linux and related - probably already installed pacman -S wget make cmake gcc # Arch Linux and related yum install wget make cmake gcc # CentOS, Redhat, etc. brew install wget make cmake gcc # MacOS Install build tools: MS WindowsYou can try Cygwin to get a Linux-like environment on your Windows machine. Or perhaps Chocolatey to install the packages wget make cmake gcc/gfortran. Windows is not known for its high quality or user friendliness, but you can probably contact the local vendor you purchased your OS from for the support you paid for.Build dependencies: most OSs(If on Windows, ensure you have your Linux-like environment installed.) You can use wget 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/ cmake .. make Get, configure and compile BSE/PopbinAfter installing libSUFR, from the build/ directory, doNext we need to get and build BSE/Popbin itself. Ensure you have set up ssh access to Nikhef, preferably with an ssh key. Thencd ../usr pwd ls -l ls -l include/libSUFR/ # Should contain *.mod files ls -l lib/ # Should contain libSUFR.* The 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 readcd /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 dir Here, -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 runCFLAGS += -I/the/path/to/your/module/files CFLAGS += -L/the/path/to/your/library/files -lSUFR Your directory should now contain a binary executable (note the x at the front) called popbin:make # this should call gfortran to build (compile and link) `sse`, `bse` and `popbin` ls -l -rwxr-xr-x 1 sluys 237K Fri 28 Feb 14:47 popbin Running BSE/PopbinIn order to run the popbin binary executable, you need
Alternatively, you can./popbin # should take the binary.in in the current directory and run whatever is set in there ./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, q to quit |