The mathematica codes

The Mathematica codes supplied by the authors are used to produce all the figures of the paper and include a code that combine all the observational probes the authors used (it allows the user to choose the ones he wants) and performs a chi-square fit to the user’s model, produces 1 sigma and 2 sigma confidence contours and the best fit form of the equation of state along with the 1sigma error region.  Note that Mathematica 5.0+ is needed.

 

Analysis of the observational probes code (observational_probes.nb) (used for figs 2,7 & 8)

1) To use the code first set the working directory, using the SetDirectory command at the beginning, to where the observational data are in your system. Then, choose the datasets you want by modifying the seldatasets variable. Note that a zero (0) means the dataset will not used while one (1) means it will be used. The correspondence is

 

seldatasets={SNIA-Gold, CMB-shift, BAO, X-Ray, SNLS, Cluster-data}

 

so in the example the values seldatasets={0,0,0,0,1,0} will only choose the SNLS dataset. Note that the Gold and the SNLS datasets cannot be used simultaneously because they have a common subset. In the case you wish to do that, modify the line:

 

datasnls=ReadList["snls_115.txt",{Number,Number,Number}]

 

to

 

datasnls=ReadList["snls_71.txt",{Number,Number,Number}]

(the file is also supplied)

 

2) Next set the matter content of the universe. This is done by the variable om0. In the example this is set to 0.2.

 

3) Define the Hubble parameter of your model by modifying the function  H[a_,om_,w0_,w1_]. In the example the CPL ansatz is used  (see text).

 

4) The chi-square function, defined in eq (3.73) of the paper, is minimized by the FindMinimum command of Mathematica. The code includes automatically the appropriate terms in the chi-square and yields the best fit values and the 1sigma errors of the parameters (see text for details).

 

5) Finally the code creates 1 sigma and 2 sigma confidence contours and the best fit form of the equation of state along with the 1sigma error region. Note that this can be very time consuming as it might take even upto ~10mins for each contour alone depending on the PC and the plotpoints needed for the plot. 

 

The final contours and the w(z) error region plot are exported in the file*.m format with a suitable filename. Then the user can combine the plots in a bigger one, as it is done in figures 7 and 8, by using the “combine_w_z.nb” and “combine_contours.nb ” file. In this way it is even possible to make additions to the plots like adding color in the contour, text on the plot, labels etc.

 

 

 

 Analysis of the other codes (eg fig3.nb)

Most of the other codes use the advanced graphics capabilities of Mathematica to create the plots given the data created by CAMB or the existing WMAP3 year data.

The files “fig1.nb” and “fig5.nb” numerically solve eq (1.14) of the paper and plot respectively the growth rate and the growth factor for the models and the parameters mentioned in the paper. To change the model just modify the function  H[a_,om_,w0_,w1_] as in the example mentioned earlier.

any comments/questions are always welcome