Wiki

Clone wiki

cosmosis / The ``postprocess`` parameters file

PAGE UNDER CONSTRUCTION --- AND WORK IN DEVELOPMENT

Defining graphical output

After a run of CosmoSIS, the postprocessor may be called with an input file, which provides options to the postprocess application and stipulates the plots which should be produced of the CosmoSIS results. This page describes the parameter file.

Overview

Like the other CosmoSIS input files, the parameter file is in the ini format. It consists of sections, marked by [square brackets], and parameters set in the form name = value within each section. The spaces around the "=" are optional.

Comments are marked by semi-colons.

Example

Here's an example parameter file from demo 1, with some of the comments removed, just to show the structure:

#!ini

[DEFAULT]
inifile = demos/demo1.ini

[MCMC]
burn = 
thin = 
weights = 

[General]
outdir = plots
prefix = demo1
more-latex = 
no-latex = 
blind-add = 
blind-mul = 
pdb = 

[Inputs]
text = 
derive = 

[Plotting]
legend = 
legend-loc =
swap = 
only = 
either = 
no-plots = 
no-2d = 
no-alpha = 
file-type = 
no-smooth = 
n-kde = 
factor-kde = 
no-fill = 
extra = 
tweaks = 
no-image = 
run-max-post = 

We now go through each of these sections in turn to see what they contain.

The [DEFAULT] section

This section defines the one piece of information postprocess has to have to run: the location of the output from CosmoSIS.

#!ini
[DEFAULT]
inifile = demos/demo1.ini
Parameter Meaning
inifile This should be the path either to the .ini file which was used to drive cosmosis, a single output file produced by CosmoSIS, or a directory into which CosmoSIS wrote many output files.

The [MCMC] section

This section provides options for MCMC-type samplers, where some kind of semi-random walk takes place through the parameter space to find the optimal parameter set. It is seldom meaningful to look at every single point sampled; more often we want to get an overall idea of how the method is converging to the solution in the final stages of the search.

#!ini
[MCMC]
burn = 100
thin = 10
weights = 
Parameter Meaning
burn If this is a value less than one, it is the fraction of data points to ignore at the start of the parameter search. If greater than one, it gives the number of points to ignore directly.
thin This says to keep only every Nth sample point.
weights This gives the name of a column in the output file which indicates the weight of the sample point..

The [General] section

This section provides general, high-level options.

#!ini
[General]
outdir = plots
prefix = demo1
more-latex = 
no-latex = 
blind-add = 
blind-mul = 
pdb = 
Parameter Meaning
outdir The directory to which postprocess should output all of its files.
prefix A string which is prepended to all the output files. If this option is used, an extra _ will be placed between the prefix and the rest of the file name.
more-latex Specify an additional latex file to be loaded.
no-latex Take all label specifications to be verbatim text.
blind-add Blind results by adding a secret value to each parameter.
blind-mul Further blind the results by applying a secret muliplier to each parameter.
pdb Run the Python debugger if any failures occur during the running of postprocess.

The [Inputs] section

This section provides options to inform of the nature of the inputs to the postprocess application.

#!ini
[Inputs]
text = 
derive = 
Parameter Meaning
text Force the input inifile to be read as a text file, regardless of file-name extension.
derive Read a Python script which will generate more columns which can be plotted.

The [MCMC] section

This section provides options for MCMC-type samplers, where some kind of semi-random walk takes place through the parameter space to find the optimal parameter set. It is seldom meaningful to look at every single point sampled; more often we want to get an overall idea of how the method is converging to the solution in the final stages of the search.

#!ini
[Plotting]
legend = 
legend-loc =
swap = 
only = 
either = 
no-plots = 
no-2d = 
no-alpha = 
file-type = 
no-smooth = 
n-kde = 
factor-kde = 
no-fill = 
extra = 
tweaks = 
no-image = 
run-max-post = 
Parameter Meaning
legend Add a legend to the plot with the specified titles, separated by the pipe symbol.
legend-loc The location of the legend: best, UR, UL, LL, LR, R, CL, CR, LC, UC, C.
swap Swap the ordering of the parameters in (x,y).
only Only make 2D plots where both parameter names start with this.
either Only make 2D plots where one of the parameter names starts with this.
no-plots Do not make any default plots.
no-2d Do not make any 2D plots.
no-alpha No alpha effect - shaded contours will not be visible through other ones.
file-type Filename suffix for plots.
no-smooth Do not smooth grid plot joint constraints.
n-kde Number of KDE smoothing points per dimension to use for MCMC 2D curves. Reduce to speed up, but can make plots look worse.
factor-kde Smoothing factor for MCMC plots. More makes plots look better but can smooth out too much.
no-fill Do not fill in 2D constraint plots with color.
extra Load extra post-processing steps from this file.
tweaks Load plot tweaks from this file.
no-image Do not plot the image in 2D grids; just show the contours.
run-max-post Run the test sampler on maximum-posterior sample and save to the named directory.

Updated