Fig 1 from Wang & Tegmark (2004),: Dark energy constraints from supernovae, microwave background and galaxy clustering. From inside out, the four nested dark energy constraints are for models maling increasingly strong assumptions, corresponding, respectively, to the 4-parameter spline, the 3-parameter spline, the 2-parameter (f_{infty},w_i) case and the 1-parameter constant w case (hatched). The Universe starts accelerating when the total density slope d{ln(rho)}/d{ln(1+z)}>-2, which roughly corresponds to when dark energy begins to dominate, i.e., to where the matter and dark energy bands cross. In the distant future, the Universe recollapses if the dark energy density rho_X goes negative and ends in a ``big rip'' if it keeps growing (d{ln(rho_X)/d{ln(1+z)}<0). Flux-averaging statistics of supernova data was used in this analysis. Other analyses using the same data but without flux-averaging of SNe found qualitatively different results (deviation from a cosmological constant). This analysis, using flux-averaging of SNe, found that dark energy is consisitent with a cosmological constant -- this remains true today for currently available data.

Yun Wang's Supernova Flux-averaging Likelihood Code

Why flux averaging?

Flux-averaging justifies the use of the distance-redshift relation for a smooth universe in the analysis of type Ia supernova (SN Ia) data. Flux-averaging of SN Ia data is required to yield cosmological parameter constraints that are free of the bias induced by weak gravitational lensing. Click here for the paper by Wang (2000) for more details.

How is flux-averaging done?

SN Ia data are converted into flux. For a given cosmological model, the distance dependence of the data is removed, then the data are binned in redshift, and placed at the average redshift in each redshift bin. The likelihood of the given cosmological model is then computed using ``flux statistics''. Click here for the paper by Wang, Chuang & Mukherjee (2011), which presents a consistent framework for flux-averaging analysis of supernova data for SNe with correlated errors.

Fortran Codes:

These codes compute the likelihood of an arbitrary cosmological model [with given H(z)/H_0] using flux-averaged Type Ia supernova data.

(1) Self-contained Fortran 77 code:
Click here to download the Fortran 77 code.

(2) Fortran 90 code, as a plug-in to CosmoMC:
Click here to download the Fortran 90 module to replace the supernovae module in CosmoMC.

The Conley et al. (2011) sample is included at present [ApJS (2011), 192, 1].

Note that:
(1) To use this code for an arbitrary H(z), replace the function invEz(z) with the H_0/H(z) from your model.
(2) You have to marginalize over the SN nuisance parameters (alpha, beta, Msn) by varying them.

The codes contain informative details to assist you in using the code.

To unpack the files, type:

gunzip SNcode.tar.gz
tar -xvf SNcode.tar

Report any problems to wang at nhn dot ou dot edu. No questions about fortran programming please.

If you use this code, please reference these three papers:

(1) Yun Wang, "Flux-averaging Analysis of Type Ia Supernova Data", ApJ, 536, 531 (2000), astro-ph/9907405 (This paper introduces the concept of flux-averaging.)

(2) Yun Wang, and Pia Mukherjee, "Model-Independent Constraints on Dark Energy Density from Flux-averaging Analysis of Type Ia Supernova Data", ApJ, 606, 654 (2004), astro-ph/0312192 (This paper presents a consistent framework for flux-averaging in the absence of correlated SN errors, and shows that flux-avearging leads to less biased values for estimated parameters.)

(3) Yun Wang, Chia-Hsun Chuang, and Pia Mukherjee, "A Comparative Study of Dark Energy Constraints from Current Observational Data", arXiv:1109.3172, PRD submitted (This paper presents a consistent framework for flux-averaging in the presence of correlated SN errors)

Click here if you are interested in other research of mine.

Previous versions of the code (funded in part by a NSF CAREER award): March 2004 (first release); March 2007 (revised version)
Current version (funded in part by DOE): September 14, 2011. Clarification on marginalization of (alpha, beta, Msn) added on October 18, 2011.
Send comments to wang at nhn dot ou dot edu.