Wiki

Clone wiki

cosmosis / changelog

Changes

Development version

The development version contains changes that have not yet been tested well enough to be added to the main version. It has more features than numbered versions but you should also expect more bugs. See the development page for more details.

Version 1.6

CosmoSIS changes

  • The code now builds using the native MacOS clang compilers. If you use HomeBrew to provide packages you can now use the setup script source config/setup-cosmosis-mac natively.

  • We have added experimental support for CosmoSIS modules written in the Julia language. Run make in the directory cosmosis/runtime/julia_modules for more information, and use the library cosmosis/datablock/julia/cosmosis.jl within your Julia module.

  • You can now specify a prior either as a truncated P(x) ~ 1/x using param = one_over_x min max, or tabulated in a file using param = load filename.

  • Added the ndarray C++ class for multi-dimensional arrays, which can be saved to data blocks from that language.

  • To help with writing scripts using CosmoSIS, we have improved the Pipeline and Module class APIs and added the InMemory output class which saves to arrays rather than files.

  • The full set of API functions is now available from Fortran modules.

New standard library modules

  • Astropy-based background evolution calculator in background/astropy_background

  • Faster C++ based sigma(R,z) calculation by M. Aguena in boltzmann/sigma_cpp

  • CMB lensing modules to apply beams and ell cus to calculations in cmb_lensing/kappa_beam and cmb_lensing/kappa_ell_cut.py.

  • Six Degree Field Galaxy Survey BAO likelihood in likelihood/6dfgs

  • BOSS DR12 BAO likelihood in likelihood/boss_dr12

  • BOSS Main Galaxy Sample BAO likelihood in likelihood/mgs_bao

  • Dark Energy Survey Year 1 lensing + clustering likelihood in likelihood/des-y1

  • Pantheon sample supernova likelihood in likelihood/pantheon

  • Cosmic Emu Mira Titan matter power spectrum emulator in structure/cosmic_emu

  • Module to rxtract growth functions from P(k,z) instead of calculating separately in structure/extract_growth

  • Updated Mead et al non-linear and baryonic matter power predictions by A. Chen in structure/meadcb

  • Utility module to pause pipeline and open a debugger in utility/stop

Standard library module new features

  • Added reading of MOPED-compressed 2pt data files
  • Simplified 2D -> 3D calculation
  • Add suffix option to add_intrinsic
  • Allow using massless neutrinos in bbn_consistency
  • Make magnification alpha calculation more generic
  • Added OpenMP threaing in limber integral, and other speed-ups
  • Speeded growth factor calculation massively
  • Speeded CAMB interface by using separate zmax for b/g and P(k,z)
  • Added fast variant of Shear + IA for certain model classes
  • Improved CAMB error handling and reporting
  • Option to save alternative power spectra with CAMB
  • Improved code for saving simulate 2pt data files

Sampler changes

  • Added an experimental version of the Dynesty nested sampler

  • All samplers now separately save a new column called prior, containing the total log-prior.

  • More Polychord parameters are now exposed via the parameter file.

Output and postprocessing changes

  • You can optionally use the postprocess flag --getdist to use getdist.py to compute posterior statistics.

  • The datablock now stores the values log_det and norm of Gaussian likelihoods representing the log of the covariance matrix determinant and the overall likelihood normalization respectively.

The Gaussian Likelihood base class

  • You an now set the parameter likelihood_only=T to speed up Gaussian likelihoods when cov matrix is not needed. This tends to matter most when using very fast pipelines.

Demo and example changes

  • The demos now all save their output to the directory output, to avoid cluttering the main directory.

  • Added an LSST lensing + clustering example of simulating a data set and then running a Fisher analysis.

  • Added a DES-Y1 likelihood example, and removed the old DES-SV example.

Bug Fixes for CosmoSIS core

  • Remove logging being set to debug by default globally
  • Reduce mem and speed usage in Fisher sampler by reducing redundancy
  • Use scipy KDE when available
  • Fix bug in shortcut module
  • Correctly preserve priors when using the postprocess --run-max-post command
  • Fix error when replacing bools in the datablock
  • Improved polychord option handling
  • Added OpenMP to NERSC compilation
  • Removed old broken examples
  • Multinest & polychord output no longer repeats itself unnecessarily
  • Fixed cosmosis-error-report
  • Fix errors in python3 when saving tarfiles of output
  • Fix Fisher matrix failing if some parameters were unused
  • Make most demos relocatable
  • Update to new polychord version
  • Added fast/slow sampling to demos
  • Fixed running list sampler in parallel
  • Command line exit status set correctly
  • Fix failure of statistics output when some columns held constant

Bug fixes for standard library

  • Fixed memory leak in project_2d
  • Fixed error in PPF C_ell calculation
  • Fixed error in magnification C_ell amplitude
  • Fixes to CMB cross-correlation code
  • Fix sign error in consistency curvature
  • Fix memory leak in CAMB interface
  • Fix one broken mode in Clerkin model bias calculation
  • Fixed race condition when Limber calc failed
  • Avoid CAMB crash for extreme neutrino scenarios
  • Fixed bugs when using CosmicEmu with massive neutrinos
  • Fixes for Planck 2015 Makefile on some systems
  • Improved Planck interface error handling

Version 1.5

Changes that may break existing workflows

  • The standard library modules like CAMB and CLASS that compute distances D(z) now produce it in order of increasing z, since that was generally more useful. Code that uses these distances may need to change. The default modules that use distance measures have been updated.

  • Two new external python packages are now needed to support python3 (see below). They are "future" and "configparser". Both can be easily installed with pip or conda, e.g. "pip install future configparser"

Python 3

  • CosmoSIS and the CosmoSIS Standard Library are now compatible with both python 2.7 and python 3.5 and above. This makes some pieces of code look a bit more confusing but should not have changed any behaviour. It also means that there are two new python dependencies required: "future" and "configparser". Both of these can be installed with pip: pip install future configparser.

CosmoSIS Changes

Runtime upgrades

  • Add chaining of samplers together in a sequence, getting hints (start point, proposal, etc.), from previous samplers in the chain. Use this by putting, e.g. samplers = maxlike fisher emcee in the [runtime] section
  • If faulthandler python package is installed then when a crash occurrs in C/C++/Fortran code then dump a traceback of what python code was being run at the time. This can help diagnose segmentation faults and similar.
  • Add experimental fault handler flag --experimental-fault-handling that extends the faulthandler reporting to also report which C/C++/Fortran functions were being called at the time.
  • When running under MPI each individual core printed the same output and the result was very hard to read. Now during the setup phase under MPI only the master process will print any output. If you don't like this then you can print out from all the processes by adding the parameter pool_stdout = T to the [runtime] section.
  • The new --pdb flag runs the code under the python debugger PDB. In the even of an error in python code the code starts an interactive interpreter so you can figure out what went wrong.
  • The new --smp flag runs the code under the python multiprocessing mode - a shared memory parallel mode that can be used to run under many cores on the same node without MPI. This does not work for multinest or minuit but does for the other parallel samplers.

Parameters and prior upgrades

  • Priors printed for all parameters when code is run.
  • Add methods to generate samples from priors and go from [0,1] to parameter prior.
  • If the parameter "likelihoods" is not set then all detected likelihoods will be used.
  • The default output format is now the "text" format so that parameter can be omitted.

New tools

  • Script to extract parameter files from the header of a chain.
  • Script to generate samples from a Fisher matrix output.

Samplers

  • Add apriori sampler that generates samples from the prior and computes their likelihoods.
  • Add the pmaxlike sampler, a parallel maximum-likelihood sampler using Conjugate-Gradient descent.
  • Add the star sampler, which samples along 1D slices in each direction in parameter space, useful for testing theory predictions.
  • Allow initializing emcee sampling from a covariance matrix.
  • Add option to the Fisher sampler using the NumDiffTools packages to do the derivatives.
  • Expose parameter wrapping in multinest sampler.
  • Fix multinest evidence by incorporating priors correctly.
  • Update to multinest 3.10.

Standard Library Changes

New modules

  • binwise_bias: per-bin or globally constant biases.
  • bin_r: stochastic biases per-bin or globally.
  • riess16: Newest Riess et al (2016) measurements of H0.
  • cl_to_xi_fullsky: Full-sky (non-limber) calculation of correlation function w(theta).

Existing module improvements

  • Add use_lin_power option to no_bias to allow using linear matter power -> galaxy power.
  • Add distances_to_lss and n_highz_distance option to camb to distances all the way to the last-scattering surface.
  • Add options to ia_z_powerlaw to use different named sections and use a z0 pivot redshift, and to apply to galaxy-intrinsic correlations.
  • Improve error handling in camb so various error scenarios now return an error status instead of quitting.
  • Add suffix option to 2pt_like to allow looking at various sets of spectra.
  • 2pt likelihood now fails with clearer error messages in several cases.
  • save_2pt module can now save correlation functions as well as C_ell.
  • Add upsampling option to load_nz and load_nz_fits.
  • Add prefix_section and prefix_extension bool options to load_nz_fits to customize whether the NZ_ prefix is applied to the name of the input fits extension and/or the section in the block where it is saved.
  • Added prefix_nz_section to save_2pt to control how the resulting FITS file is saved.
  • Add interpolation and perbin options to photoz_bias to change how interpolation is done and whether to use a global shift.
  • Add perbin option to add_intrinsic to look for A0, A1, ... IA parameters.
  • Add M_ap and N_ap statistics to cl_to_xi_nicaea.
  • Increase speed of Limber integrator, and expose tolerance parameters.
  • Customize shear_m_bias with cal_section, cl_section, and cross_section options.
  • Add BB Intrinic alignment spectra to project_2d.
  • Add fatal_errors and save_kernel_zmax options in project_2d.
  • Fix spelling of "Calculator" in project_2d.
  • Add more checks for errors when running the Limber integral.
  • Fix bug in Kirk, Rassat, Host, Bridle model in NLA intrinsic alignment model.
  • save the cosmomc_theta parameter from camb.

Module Changes & Fixes

  • Change the order that std lib modules output distances so that they start at z=0.
  • Bugfix to Clerkin bias model so it works at all.
  • Fix Omega_nu not being included in Omega_m in consistency and Takahashi Halofit.
  • Fix memory leaks in MGCamb interface.
  • Fix bin-only cuts not being applied in 2pt likelihood.
  • Move Suyu strong lensing likelihoods into general time_delay_likelihood module.
  • Turn some GSL exits into python errors.
  • Fix memory leak in JLA.

Demos

  • In demos 5 and 9 the M parameter is now varied, as it should be.
  • Demo 15 now uses the Clerkin et al model for galaxy bias.

Config/Installation

  • Fixes to example manual setup file.
  • Update to newer more streamlined UPS packages.
  • A setup script for the NERSC supercomputer facility is now in the config directory.

Postprocessing improvements

  • Allow custom legends not just file names
  • Add option --run-max-post to run the pipeline for the maximum-posterior sample in the chain
  • Plot contours in more sensible order
  • Normalize 1D Fisher plots to peak at 1.0
  • Add plots for Star sampler (see below)
  • Add thinning for emcee sampler
  • Save more statistics about chain, including upper and lower 68/95% limits and asymmetric error bars
  • Compute Gelman-Runbin statistic during post-processing

Bugs

  • Fixed compilation failure when using newer gfortran versions to do with ordering of declarations

Misc / Quality of Life

  • More output when saving grid to block fails
  • Add include_norm option to Gaussian likelihoods letting you choose to include constant log |C|
  • Allow KDE code to be used in higher dimensions
  • Documentation strings are now included for most core cosmosis objects
  • Various changes to config handling and module loading to ease scripting cosmosis.

Version 1.4

Changes that may break existing workflows

  • The "like" values listed in the output chain files, which were always really posteriors all along, are now correctly labelled as such and so the column header has changed to "post".

Installation and compilation

  • Tweaks have been made to the recommended settings for manual compilation

CosmoSIS core changes

  • The output posteriors are now more correctly labelled as "post" (for log-posterior) rather than "like", since they include priors (thanks to Phil Marshall for discussion)
  • Various compiler flags have been tweaked
  • Fixes for El Capitan and additional compilers have been added to the core Makefiles (thanks to Anna Porredon for discussion).
  • The Gaussian likelihood now allows varying covariance and uses the log(det) term in that case. It also saves other useful info to the block.
  • Global sections visible to all modules can now be added in the pipeline.
  • Tools for and an example of scripting cosmosis from python have been added (Thanks to Michael Troxel for discussion).

Sampler changes

  • The experimental ABC sampler has been extended
  • The Fisher sampler can now include Gaussian priors as an additional matrix

## Demo changes - The demos have been updated to use the new modules described below

Postprocessing changes

  • Legends can now be added to plots made in postprocessing with command line flags
  • The postprocessor can now cope with final text file lines truncated when a job was killed
  • 1D curves and constraints from the Fisher sampler are now saved, as are ellipse areas for use as figures of merit.
  • The Grid samplers can now cope better with extreme likelihoods
  • Citations will not now be printed more than once

Standard Library Additions

  • The "project_2d" module in python replaces the old "spectra" module for projecting from 3D power spectra to 2D with the Limber approximation. It is now more consistent and complete, and respects the difference between matter power and galaxy power more clearly. It should be easier to extend to new spectra.
  • The 2pt_like module runs likelihoods on files in the new 2pt data format described at github.com/joezuntz/2point/. This makes it much easier to add new 2pt data sets.
  • The project_2d_ppf generates weak lensing spectra under parameterized deviations from GR that modify phi-psi
  • The load_nz_fits module loads n(z) (e.g. for photometric experiments) from the same file format as the 2pt_like module, or similar files.
  • Two new trivial bias modules have been added, for constant and unit bias
  • A planck2015_simple module has been added for forecasting purposes, which does a simple Gaussian likelihood for CMB data with Planck-sized errors. This is useful for forecasting but does not reflect real data.
  • A more general module for strong lensing time delay measurements has been added.

Standard Library Upgrades

  • Various new options are now exposed in CAMB, affecting kmax and accuracy levels (thanks to Vinicius Miranda).
  • Halofit will now take kmin and kmax from its linear power inputs by default
  • The sigmar module can now accept a single R or z value and should be slightly faster
  • The clerkin module can now accept a suffix to its output section
  • New options have been added to the intrinsic alignment modules. Several undocumented modules have also been added but we do not yet recommend their use.
  • New Alam 2015 data files have been packaged with the BOSS likelihood
  • The CFHTLenS and des-sv modules have been replaced with calls to the 2pt_like module described above.
  • The photoz_bias module can now work on multiple samples
  • Errors when running the Limber integral are more carefully reported
  • The defaults for the cl_to_xi_nicaea module are more sensible
  • The Planck Makefiles should now be easier to debug
  • The load_nz module can now save to any section using the wl_number_density section, aiding using multiple samples

Standard Library Fixes

  • A memory leak when running CAMB has been fixed
  • The ell_min has been changed in CLASS to make it match CAMB output
  • The Planck 2015 Makefile has been tweaked to reduce required environment variables
  • The output of Tinker mass function module has been fixed to allow proper output at z=0 only
  • Several pieces of units metadata in CAMB have been corrected (thanks to Vinicius Miranda)
  • Some details of the Tinker mass function have been corrected

Version 1.3

Sampling

  • Fisher matrix sampler
  • New GaussianLikelihood superclass to help add Fisher-compatible Gaussian likelihoods

##Standard Library Additions

  • Planck 2015 Likelihood
  • The Dark Energy Survey Science Verification Weak Lensing 2-point likelihood, including:
    • Photometric redshift bias marginalization
    • Shear bias marginalization
    • Power law intrinsic aligment models
    • xi(theta) likelihood
  • Add a utility to delete data block sections for more complex pipelines
  • Add matter and galaxy 2D C_ell spectra, and magnification, as well as their cross-correlations

##Standard Library Updates

  • Allow extrapolate_power to work downwards to kmin as well as kmax
  • Allow switching off distance output in FrankenEmu
  • Modify several likelihoods to support Fisher matrices
  • Fix linking on OSX Yosemite

##Standard Library Bug Fixes

  • Fix Planck Makefiles to work in Ubuntu - thanks to Matteo Costanzi
  • Fixed the "root" option
  • Improvement to customizability of various modules
  • Fix CAMB slowdown when P(k) not needed by exposing kmax parameter
  • Change how LAPACK is linked to enable easier custom linking
  • Fix a bug where the wrong values was used in BBN
  • Fix a compile error in the fgas module under newer gcc versions

Core Features

  • Lock output files when they are created to raise an error whey you accidentally leave out the --mpi flag or run two jobs with the same output file name.
  • Added a collection of physical constant values for use in modules (list taken from astropy.constants). In python: "import cosmosis.constants". In C: "#include cosmosis_constants.h". In Fortran: "#include cosmosis_constants.fh".
  • Save priors in the head of the output file
  • Allow the grid sampler to save its outputs progressively
  • Warn if more than 1 million grid points requested in the grid sampler
  • Enable saving chains in FITS format as well as text format

Postprocessing

  • Enable adding extra derived parameters during postprocessing with user-defined functions
  • Add weighted MCMC scatter plots
  • Added lower and upper 95% limit statistics
  • Enable postprocessing importance samples
  • Enable plotting multiple different sampler outputs in one plot
  • Enable plotting only some of the chain parameters
  • Select whether you want transparent or opaque contours
  • Add scatter plot for weighted MCMC
  • Fix unusual factor of 100 appearing in some scatter plots
  • Add options to postprocess only a subset of 2D plots to save time
  • Fix a crash when plotting only one likelihood in P(k) test sampler plots (thanks to Tom McClintock)
  • Enable postprocessing FITS chains
  • Fix a bug when postprocessing PMC chains

Core Bug Fixes

  • Fix burning a fraction of the chain rather than a fixed number of samples when postprocessing
  • Fix a crash when one column was an exact linear function of another
  • Fix a bug that gave wrong MCMC median values

Version 1.2

###Samplers

  • Added Population Monte Carlo sampler
  • Added Snake grid sampler
  • Added Kombine ensemble sampler
  • Added List simple sampler
  • (Experimental) Enable making a graphical representation of a pipeline in the test sampler
  • Improved documentation pages of all the samplers

###Postprocessing

  • Add blinding option to post-processing
  • Enable postprocessing directory of cosmology results
  • Allow postprocessing MCMCs with weight columns
  • Fix which columns are plotted in post-processing
  • Add flag to swap x and y axes in plots

###Standard Library Updates

  • Added MGCAMB
  • Added FrankenEmu Cosmic Emulator
  • Added Nicaea code for lensing C_ell -> xi(theta)
  • Added Lucy Clerkin bias code
  • Added Wrapper for CLASS Boltzmann code
  • Added Cluster f_gas likelihood by Adam Mantz
  • Added BBN YHe consistency module by Adam Mantz
  • Added Balmes-Corasaniti strong lensing likelihood
  • Added Suyu strong lensing likelihood
  • Added WiggleZ BAO likelihood
  • Updated to new version of isItGR
  • Added CAMB Jan 2015
  • Added a new format mode des_fmt to photo-z loader
  • Enable multiple renames in rename module
  • Enable using different consistency relation file in consistency module

###Standard Library Bugs

  • Fixed linear alignment code
  • Fixed bug with covariance being wrong for CFHTLenS
  • Fixed error when z_min>0 in photo-z distributions
  • Fixed some compilation problems with Planck likelihood v1
  • Fix nan errors when A=0 in intrinsic alignments

###Installation

  • Installer now works on Yosemite
  • Installer should be easier to update in future

###Infrastructure

  • Improve datablock logging facilities
  • Fix bugs with priors not working properly
  • Improved repository creation tool
  • Added an error reporting tool
  • Added a tool to download an existing module from a git/hg url
  • Added a tool to check for uncommitted changes

##Version 1.1

There are two changes in v1.1 is that might break your runs:

  • you now should specify --mpi when running multinest in MPI mode
  • you may need to change some double parameters (like some of the planck nuisance params) from integers by adding .0 on the end

Standard library

  • Include small heliocentric correction to JLA supernova likelihood
  • Add isItGR modified gravity camb
  • Add newer Takahashi Halofit
  • Add module to log-linearly extrapolate matter power spectra
  • Add intrinsic aligments to weak lensing shear spectra
  • Add Linear Alignment model for intrinsic weak lensing alignments in several variants (Bridle & King, Bridle & King Corrected, and Kirk, Rassat, Host & Bridle)
  • Fix bugs stopping BBN likelihood from working at all
  • Add a PPF shear spectra calculation
  • Add utility functions to Limber approximation library
  • Increase accuracy of C_ell -> xi(theta) code
  • Add module that lets you sample in sigma_8 by re-scaling the output from CAMB.
  • Add mass functions from the CRL with numerical recipes replaced

Samplers

  • Fix multinest MPI output problem where part of file overwritten
  • Enable saving data outputs in grid sampler
  • Fix bug saving additional output like sigma_8 from multinest
  • Let test sampler save as tgz output

Demos

  • Add new demos and split off longer demos into "examples" directory
  • Tweak amount of output in demo 6.
  • Use PLANCK_DATA_DIR environment variables in Planck demos
  • Demo 10: Smith Halofit versus Takahashi Halofit (plotting multiple ini files)
  • Demo 11: Modified gravity effect on shear spectra (grid sampling saved as tgz)
  • Demo 12: Extreme value stats for cluster masses
  • Example A: Old demo 10, moved.
  • Example B: Sample CFHTLenS with intrinsic aligments and sigma_8 (compare two models)
  • Example C: Multinest Planck (saving to sql?)

Infrastructure

  • Allow environment variables in ini files
  • Update self-updater code to be able to checkout development version
  • Enable saving multiple 2D grids in Fortran
  • Enable saving datablocks to single tgz files
  • Fix saving/loading metadata after finishing the chain in text output files
  • Enable using environment variables in ini files
  • Enable integer parameters in values files being passed to pipelines

Post-processing

  • Fix plotting grid samples in cases with a very large range in likelihoods
  • Fix bug in Dunkley power spectrum testing printing repeated values
  • Stop grid plots from including 2D plots of likelihood versus parameter
  • Output all citations required by the pipeline

Version 1.0

Version 1.0 is the first fully released version of cosmosis.

If you have a module for a pre-release version then you may need to make minor changes to it. The main is that you may need to change how python modules import cosmosis features:

#!python
#Old:
from cosmosis import names, option_section
#New:
from cosmosis.datablock import names, option_section

If you have developed module for the prototype des-pipe code then the interface functions have been changed significantly. See the documentation linked from the modules page for more information.

Updated