Locked History Actions

DeepZot/Baofit/QuickStart

BAOFIT Quick Start Guide

Pre-requisites

The following standard packages are required:

If you think these are probably already installed, just go ahead with the next steps which will check for the necessary libraries in standard places.

Download DeepZot Packages

Checkout the code using git (recommended for keeping up to date and contributing, but requires that you have installed git):

git clone git://github.com/deepzot/likely.git
git clone git://github.com/deepzot/cosmo.git
git clone git://github.com/deepzot/baofit.git

Otherwise, download and unpack a zipfile, for example:

curl -k -L -O https://github.com/deepzot/baofit/archive/master.zip
tar -xf master.zip

Note: the extracted directory name will be different in this case (something like "baofit-master").

Build and Install

The following commands will build and install the DeepZot packages. The "configure" script will identify any missing dependencies for each of the packages. The packages must be built in order listed below.

likely

See here for more details.

cd likely/build
../configure
make
sudo make install
cd ../..

cosmo

See here for more details.

cd cosmo/build
../configure
make
sudo make install
cd ../..

baofit

See here for more details.

cd baofit/build
../configure
make
sudo make install
cd ../..

Run

Use baofit ... to access the executable installed by the sudo make install step above. If you are making changes to the code, you can also test the most recently built version using ./baofit from the baofit/build/ directory, and then only do the install step once the changes have been tested and committed. The examples below assume that you are using the installed version.

To get the complete list of command line options, type:

baofit --help

A number of analysis configurations are already specified via ".ini" files located in baofit/config directory.

Example: BOSS DR9 Lyman-alpha forest analysis (Slosar et al., 2013)

The file baofit/data/README.txt explains how to reproduce the published BOSS results. Run the installed baofit from a subdirectory of the baofit package specifying the config file to use.

baofit -i ../config/BOSSDR9LyaF.ini

The default configuration assumes that the data files (BOSSDR9LyaF.data and BOSSDR9LyaF.cov) are in ../data/ and that the model templates are in ../models/, but you can set these using the --data and --modelroot options if needed.

The following fit results should be printed to the console:

Model initialized.
Fit Model "BAO Correlation Model" has initial parameters:
                       beta =     1.400000 +/-     0.100000 $    1.40 \pm 0.10 $ gauss prior @ (1,1.8;1)
              (1+beta)*bias =    -0.336000 +/-     0.030000 $ -0.336 \pm 0.030 $
                 gamma-bias =     3.800000 +/-     0.300000 $    3.80 \pm 0.30 $ gauss prior @ (2.8,4.8;1)
                 gamma-beta =     0.000000
              BAO amplitude =     1.000000
              BAO alpha-iso =     1.000000
         BAO alpha-parallel =     1.000000 +/-     0.100000 $    1.00 \pm 0.10 $
             BAO alpha-perp =     1.000000 +/-     0.100000 $    1.00 \pm 0.10 $
                gamma-scale =     0.000000
               Rad strength =     0.000000
             Rad anisotropy =     0.000000
         Rad mean free path =     0.000000
        Rad quasar lifetime =     0.000000
dist add z0 mu0 r-2 rP0 rT0 =     0.000000 +/-     0.001000 $ 0.0000 \pm 0.0010 $
dist add z0 mu0 r-1 rP0 rT0 =     0.000000 +/-     0.001000 $ 0.0000 \pm 0.0010 $
 dist add z0 mu0 r0 rP0 rT0 =     0.000000 +/-     0.001000 $ 0.0000 \pm 0.0010 $
dist add z0 mu2 r-2 rP0 rT0 =     0.000000 +/-     0.001000 $ 0.0000 \pm 0.0010 $
dist add z0 mu2 r-1 rP0 rT0 =     0.000000 +/-     0.001000 $ 0.0000 \pm 0.0010 $
 dist add z0 mu2 r0 rP0 rT0 =     0.000000 +/-     0.001000 $ 0.0000 \pm 0.0010 $
dist add z0 mu4 r-2 rP0 rT0 =     0.000000 +/-     0.001000 $ 0.0000 \pm 0.0010 $
dist add z0 mu4 r-1 rP0 rT0 =     0.000000 +/-     0.001000 $ 0.0000 \pm 0.0010 $
 dist add z0 mu4 r0 rP0 rT0 =     0.000000 +/-     0.001000 $ 0.0000 \pm 0.0010 $

Reference redshift = 2.25
Using anisotropic BAO scales.
Scales apply to BAO peak only.
dloglam bin centers: 0,0.001,0.003,0.005,0.007,0.009,0.011,0.013,0.015,0.017,0.019,0.021,0.023,0.025,0.027,0.029,0.031,0.033,0.035,0.037,0.039,0.041,0.043,0.045,0.047,0.049,0.0591608,0.0828251 (n = 28)
dtheta bin centers: 5,15,25,35,45,55,65,75,85,95,105,115,125,135,145,155,165,175 (n = 18)
z bin centers: 2,2.5,3 (n = 3)
Read 1512 of 1512 data values from ../data/BOSSDR9LyaF.data
Read 64260 of 1143828 covariance values from ../data/BOSSDR9LyaF.cov
Combined data has 941 (1512) bins with data after (before) finalizing.

Fit results: chiSquare / dof = 857.283 / (941-14), prob = 0.950121, log(det(Covariance)) = -18321

FMIN Value =   428.641526 at:
                       beta =     1.411891 +/-     0.397488 $      1.4 \pm 0.4 $ gauss prior @ (1,1.8;1)
              (1+beta)*bias =    -0.436721 +/-     0.054222 $   -0.44 \pm 0.05 $
                 gamma-bias =     3.064323 +/-     0.887172 $      3.1 \pm 0.9 $ gauss prior @ (2.8,4.8;1)
                 gamma-beta =     0.000000
              BAO amplitude =     1.000000
              BAO alpha-iso =     1.000000
         BAO alpha-parallel =     0.986086 +/-     0.028912 $  0.986 \pm 0.029 $
             BAO alpha-perp =     0.977348 +/-     0.059979 $    0.98 \pm 0.06 $
                gamma-scale =     0.000000
               Rad strength =     0.000000
             Rad anisotropy =     0.000000
         Rad mean free path =     0.000000
        Rad quasar lifetime =     0.000000
dist add z0 mu0 r-2 rP0 rT0 =     0.000062 +/-     0.000066 $ 0.00006 \pm 0.00007 $
dist add z0 mu0 r-1 rP0 rT0 =    -0.000304 +/-     0.000216 $ -0.00030 \pm 0.00022 $
 dist add z0 mu0 r0 rP0 rT0 =     0.000015 +/-     0.000226 $ 0.00002 \pm 0.00023 $
dist add z0 mu2 r-2 rP0 rT0 =    -0.000057 +/-     0.000069 $ -0.00006 \pm 0.00007 $
dist add z0 mu2 r-1 rP0 rT0 =     0.000377 +/-     0.000149 $ 0.00038 \pm 0.00015 $
 dist add z0 mu2 r0 rP0 rT0 =    -0.000364 +/-     0.000124 $ -0.00036 \pm 0.00012 $
dist add z0 mu4 r-2 rP0 rT0 =    -0.000047 +/-     0.000066 $ -0.00005 \pm 0.00007 $
dist add z0 mu4 r-1 rP0 rT0 =     0.000142 +/-     0.000169 $ 0.00014 \pm 0.00017 $
 dist add z0 mu4 r0 rP0 rT0 =    -0.000101 +/-     0.000103 $ -0.00010 \pm 0.00010 $

Number of function evaluations used: 943

FMIN Errors & Correlations =
                       beta :     0.397488
              (1+beta)*bias :    -0.256459     0.054222
                 gamma-bias :    -0.028635     0.148710     0.887172
         BAO alpha-parallel :    -0.042507     0.177971     0.039887     0.028912
             BAO alpha-perp :     0.062831    -0.235215     0.006905    -0.551046     0.059979
dist add z0 mu0 r-2 rP0 rT0 :     0.048774     0.361994    -0.041666     0.103374     0.024692     0.000066
dist add z0 mu0 r-1 rP0 rT0 :    -0.015842    -0.254028     0.074734    -0.094416    -0.041491    -0.971871     0.000216
 dist add z0 mu0 r0 rP0 rT0 :     0.012371     0.057899    -0.340396     0.026054     0.033929     0.504688    -0.541106     0.000226
dist add z0 mu2 r-2 rP0 rT0 :     0.225615    -0.583631    -0.018114    -0.023768     0.000064    -0.437116     0.280304    -0.107013     0.000069
dist add z0 mu2 r-1 rP0 rT0 :    -0.021038     0.234140    -0.065595    -0.021407     0.128472     0.647790    -0.537846     0.277508    -0.856701     0.000149
 dist add z0 mu2 r0 rP0 rT0 :    -0.003137    -0.217854     0.135707    -0.037250    -0.104822    -0.914995     0.909707    -0.510546     0.533115    -0.804704     0.000124
dist add z0 mu4 r-2 rP0 rT0 :    -0.046073    -0.079509     0.083839    -0.149225     0.064701    -0.521666     0.590835    -0.340325    -0.158256    -0.059752     0.450290     0.000066
dist add z0 mu4 r-1 rP0 rT0 :    -0.044939     0.176808    -0.112033     0.164540    -0.081567     0.583541    -0.661810     0.386794     0.122616     0.063238    -0.501415    -0.974738     0.000169
 dist add z0 mu4 r0 rP0 rT0 :     0.038121    -0.165819     0.140504    -0.153298     0.067197    -0.609858     0.710376    -0.424761    -0.160288    -0.030299     0.528037     0.918563    -0.976130     0.000103

This configuration also outputs the following files to the working directory:

BOSSDR9LyaF_fit.config  BOSSDR9LyaF_residuals.dat  BOSSDR9LyaF_save.pars  BOSSDR9LyaF_save.pcov

If you use mathematica, there are some functions defined here to help with reading these outputs and producing nice plots. To produce a 2D chisq scan in the BAO parameters, use:

baofit -i ../config/BOSSDR9LyaF.ini --ndump 0 --parameter-scan

Look for the binning keyword in the fit config file to modify the scan parameters.