Skip to content

Code description

drphilmarshall edited this page Mar 24, 2013 · 11 revisions

Pangloss is a python module of useful classes and functions, and a set of scripts that make use of them. The example we give is to produce samples drawn from Pr(kappa|D), as described in Collett et al (2013), and is run with:

Drill.py example.config

Reconstruct.py example.config

Calibrate.py example.config

Here we introduce each of these scripts, and the various objects they work with.

Scripts

From an input catalog of galaxies (either real or simulated), drill out a narrow lightcone (or set of lightcones) centred on some sky position of interest, and save the resulting smaller catalog (or catalogs).

Read in a lightcone catalog (or set of catalogs), and assign dark matter mass to the galaxies within, probabilistically. Each lightcone yields its own Pr(kappah|D), where kappah is the total gravitational lensing convergence at the centre of the lightcone - this quantity is of great relevance to the strong lens time delay distance in particular.

kappah is (at the moment) a fairly crude approximation to the "true" convergence kappa - but we have shown that one can recover a better approximation by considering Pr(kappah,kappa|C), where C is large set of lightcone catalogs drawn from a cosmological simulation. The resulting PDF Pr(kappah|D,C) contains the assumption that this simulation is an accurate representation of our real Universe - but we're working towards relaxing this.

Configuration

Define your experiment in a file called .config so the code knows what you want it to do - all the above scripts take this configuration file as their only argument. A commented example is given here.

Classes

The primary "lightcone" class defines a volume of space, containing galaxies and their properties. A lightcone is instantiated from an input catalog, and returns (among other things) estimates of lensing convergence given various assumptions.

The "kappamap" class allows convergence maps, like those obtained by Hilbert et al from full-on ray-tracing through the Millennium Simulation, to be loaded and queried by position - this provides "truth" at each sky position for calibration purposes.

Metadata structure, to interpret and store the contents of a configuration file.

For calculating cosmologically useful quantities, such as distances of various kinds. Written by Matt Auger.

Creates a scaffolding of redshift slices, in which useful quantities are pre-calculated. Lightcone objects are then "snapped" to this grid to speed up the lensing calculations.

A place to store probability density functions - including samples drawn from them.

The stellar mass to halo mass relation. The one from Behroozi et al requires a numerical look-up table - the SHMR class provides a place to store this.

Function libraries

The other files in the pangloss module contain useful functions:

Calculating the convergence and shear caused by halos with various density profiles.

Implementations of the Neto et al and Maccio et al halo concentration-mass relation, and the Behroozi et al and Moster et al stellar mass to halo mass relations.

Some simple functions to streamline the pangloss file input/output.