# About

I'm currently an associate professor at the Institute of Theoretical Astrophysics at the University of Oslo. I took my master (2010) and my PhD (2013) at the University of Oslo and I had a postdoc at the University of Oxford and at the Universty of Portsmouth before going back home.

# Teaching

AST5220 Cosmology II (S2020; S2021). Master and PhD course. This course covers the theory and contains a numerical based project (basically write your own CAMB/CLASS code; availiable on the page linked) on the formation of the CMB and structures in the Universe. The linked page contains all the background material needed to understand the theory, code templates for doing the numerical project plus a link to a Slack page to ask questions.

AST1010 Introduction to astronomy (F2019; S2020; F2020; F2021). Bachelor course. An interactive quiz for this course (in Norwegian) is avaliable here.

Introduction to theoretical cosmology (2017). PhD lectures. Slides / lecture notes.

# Notes

Some useful notes I've written:

Gravitational redshift in the Einstein and Jordan frames

Lecture notes (mostly from AST5220 / AST9420 Cosmology II):

- Crash course in General Relativity
- Introduction to theoretical cosmology and background cosmology
- Thermodynamics / statistical mechanics and the thermal history of the Universe
- Cosmological perturbation theory
- Inflation and initial conditions
- From perturbations to statistical observables
- Non-linear structure-formation
- Units in cosmology
- Numerical methods
- Some useful math

# My Codes

FML - A C++ library for working with particles and grids and solving PDEs in parallel with up to thousands of tasks. The library uses MPI, OpenMP (or both) for the parallelization, though everything also works without a MPI compiler. We take care of most of the communication between tasks under the cover so the user don't have to deal too much with that. It is made mainly for analyzing the large scale structure of the Universe, but it is written in general so it can be useful outside of cosmology. It is not meant to be a replacement for common cosmology codes that does similar things (like initial condition generation, simple N-body simuations, halo and void finders, reconstruction etc.) although these things are very easy to do with the library. The goal of the library is rather provide users with the basic tools needed to working in parallel so that one don't have to start by making the tools before doing the science. The philosophy of the library is to implement general algorithms without making (too many) assumptions about how they are to be used and let the user take all these decitions thus making it easier to do new things without having to modify the whole code. The classes we provide are therefore templated on dimension (well knowing that nobody is going to use it for anything else that $N=2$ or $N=3$) and the types and the algorithms are templated on classes that determine how to process and compile up the data it computes. To be able to do Fourier transforms we settle for a simple slab-based domain decomposition for the parallelization. The library contains algorithms for assigning particles to grids, linking particles together in groups, general watershed, tesselations, fourier transforms, computing correlation function in real and fourier space (powerspectrum, bispectrum, trispectrum, ...), creating particle distributions, Lagrangian perturbation theory, a general multigrid solver for solving non-linear PDEs and many more things. We also provide wrappers of methods in libraries like GSL, CGAL and LUA to more easily being able to perform various tasks.

MG-PICOLA - The code extends the COLA (COmoving Lagrangian Acceleration) method for simulating cosmological structure formation from LCDM to theories that exhibit scale-dependent growth at the level of 2LPT. The code includes the fast approximate screening method of Winther & Ferreira (2014). For the scientific paper explaining the approach see Winther, Koyama, Manera, Wright and Zhao (2017). This code is now replaced by this one which has much more features.

ISIS - Llinares, Mota & Winther (2013) - N-body simulation code for gravity theories beyond $\Lambda$CDM based on RAMSES.

SCALAR - Mina, Mota & Winther (2019) - an AMR code to simulate fuzzy and axion-like dark matter models by solving the Poisson-Schrodinger system.

# List of Cosmology Codes

A list of some useful cosmology codes for doing various things:

My Online CMB Calculator (for the course AST5220 / AST9420). You can also run CAMB online.

N-body and hydro initial conditions:

- MUSIC by Oliver Hahn. Initial condition up to third order in Lagrangian perturbation theory. Multiscale initial conditions. With baryons etc etc etc. Written in C++.
- 2LPTic by Roman Scoccimarro. Second order in LPT.

High resolution N-body simulations:

- RAMSES by Romain Teyssier. Highly parallel adaptive mesh refinement N-body / hydro code with radiation transfer and many other features. Written in Fortran 90.
- GADGET by Volker Springel. Highly parallel tree / particle mesh N-body code with smoothed particle hydrodynamics and many other features. Written in C.

Fixed resolution N-body simulations:

- PICOLA by Cullan Howlett. Fast approximative N-body in LCDM. Written in C.
- MG-PICOLA. Fast approximative N-body extended to modified gravity etc. theories and adds some useful functionality like power-spectra (real and multipoles) and halos on the fly to the L-PICOLA code. Written in C.
- GEVOLUTION by Julian Adamek. Includes all metric perturbations up to second order + neutrinos. Written in C++.
- CONCEPT by Jeppe Dakin and Thomas Tram. N-body with massive neutrinos. Written in (C)Python.

Halo finders:

- Rockstar by Peter Behroozi. Phase space halofinder. Has become the one everybody uses in cosmology. Written in C.
- AHF by Alexander Knebe. Grid based halo finder. Good documentation and has usergroup for question. Written in C.
- MatchMaker by David Alonso. Friends of Friends halo finder. Written in C.

Void finders:

- ZOBOV by Mark Neyrinck. Tesselation based void finder (using qhull). Written in C.
- REVOLVER by Sesh Nadathur. Tesselation based void finder. Includes RSD reconstruction. Based on ZOBOV. Written in Python.
- VIDE by Guilhem Lavaux and P.M. Sutter. Tesselation based void finder. Based on ZOBOV. Written in Python.

Einstein-Boltzmann solvers:

- CAMB by Anthony Lewis and Anthony Challinor. Good and fast. Many extensions availiable. Connects to CosmoMC by the same author for doing parameter inference. Written in Fortran 90, but includes Python interface.
- CLASS by Julien Lesgourgues. Written in C. The fastest solver to date. Tons of functionality and exensions. Well thoughtout design and structure of the code.
- Hi-CLASS by Miguel Zumalacarregui and Emilio Bellini. Extension of the CLASS code to a huge class of cosmological models (dark energy and modified gravity). Built on CLASS. Written in C.
- EFTCAMB by B. Hu, M. Raveri, N. Frusciante and A. Silvestri. Extension of the public Einstein-Boltzmann solver CAMB, which implements the Effective Field Theory approach to cosmic acceleration. Similar to Hi-CLASS, but for CAMB. Written in Fortran.

Recombination:

- RECFAST by Seager, Scott, Sasselov. Written in C, but Fortran and C++ versions availiable.
- HYREC by Yacine Ali-Haïmoud and Chris Hirat. A code for primordial hydrogen and helium recombination including radiative transfer. Written in C.
- COSMOREC by Jens Chluba.

MCMC and likelihood inference:

- CosmoMC by Anthony Lewis. Parallelized MCMC sampler (general and cosmology). For cosmology it includes likelihoods for CMB, galaxy surveys, supernovea etc. etc. Very easy to get started with (but a bit harder to modify). Written in Fortan 2008.
- Monte Python by Benjamin Audren. The CosmoMC of CLASS. Written in Python.
- Victor by Seshadri Nadathur. Modelling and likelihood analysis of void-galaxy cross-correlation data. Written in Python.
- emcee by Dan Foreman-Mackey. Ensemble sampling toolkit for affine-invariant MCMC. Written in Python.

Other things:

- CUTE by David Alonso. Compute correlation functions from galaxy catalogs and simulation boxes. Written in C.
- FFTLog by A. Slosar. C and C++ implementations of the FFTLog algorithm.