• If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

• Want to get organized in 2022? Let Dokkio put your cloud files (Drive, Dropbox, and Slack and Gmail attachments) and documents (Google Docs, Sheets, and Notion) in order. Try Dokkio (from the makers of PBworks) for free. Available on the web, Mac, and Windows.

View

How to calculate BAO scales

last edited by 13 years, 4 months ago

How to calculate the BAO Transverse and Radial Scales

Once IDL and iCosmo are set up, you can calculate BAO transverse and radial scales for a given survey using the following 4 simple steps (an explanation is given below):

; (1) set fiducial parameters:

fid=set_fiducial(cosmo_in={omega_m:.25d},calc_in={fit_tk:2},expt_in={sv1_n_zbin:2,sv1_zerror:0.02d})

; (2) create a survey structure:

sv=mk_survey(fid,'sv1')

; (3) create cosmology parameters structure:

cosmo=mk_cosmo(fid)

; (4) calculate BAO radial and tangential scales:

bao = mk_bao(cosmo, sv)

Explanation

(1) Set Fiducial Parameters

Create a structure that contains all the fiducial values that are used in iCosmo.  At this stage users can input options here.  For this there are three input structures: cosmo_in, calc_in and expt_in:

cosmo_in: input cosmological parameter, the options are -

H, Omega_B, Omega_m, Omega_L, w0, wa, n, Tau, Sigma8 and Curv

calc_in: Input calculation parameter. Here you can decide which transfer function to use (using the fit_tk key word) and the nonlinear correction to use (the fit_nl key word). In the example fit_nl is set to 2 (Smith et al) and fit_tk is set to 0 (E&H).  The options are -

fit_NL, fit_TK, verbose, delta, n_l, l_ran, speed, linear, k_ran, n_k, n_lbin, nz_fn, nz_crs, ran_z and err

fit_nl: fitting formula for the non-linear powerspectrum

(default 0:Peacock & Dodds, 1: Ma et al., 2: Smith et al.)

fit_tk: fitting function for transfer function to use:

0: E&H without wiggles (default)

1: E&H with wiggles (UNSTABLE w/ NON-LINEAR CORRECTION)

2: BBKS as summarised by Peacock & Dodds (1997)

expt_in: Input experiment parametersproperties of a survey. The options are:

sv1_N_ZBIN, sv1_ZERROR, sv1_Z_MED, sv1_NG,  sv1_A_SURVEY, sv1_EFF, sv1_SIG_INT, sv1_DNDZTYPE, sv1_DNDZP, sv1_DNDZZ, sv1_BIASTYPE, sv1_NS, sv1_SIGMAM, sv1_DELM, sv1_SNE_ZRAN, sv1_NAME, sv1_PROBES  (sv1 can also be changed to sv2 and sv3)

a_survey: survey area  [deg^2]

ng: galaxy surface density (without binning) [gals amin^-2]

z_m: galaxy median redshift (without binning)

sig_int: intrinsic rms shear per component

n_zbin: number of redshift slices

;at the moment the BAO calculation does not take into account photometric errors

gerror: Gaussian photo-z error (sigz=gerror*(1+z))

f_cat: fraction of catastrophic failures

z_delta: off set of a catastrophic failure

To see the cosmological parameters:  help,fid.cosmo,/st

To see the calculation parameters:  help,fid.calc,/st

To see the parameters for survey:  help,fid.expt.sv1,/st

(2) Create a Survey Structure

Produces a structure with the survey parameters for the survey chosen by the user (help,sv,/st).

(3) Create a Cosmology Structure

Calculates the basic cosmology parameters using the setting in the fiducial structure.  This routine produces a structure which in turn contains three structure (help,cosmo,/st):

cosmo.const - cosmological constants such as Omega_m and sigma8

cosmo.evol   - cosmological parameters that evolve with redshift such as co-moving distance

cosmo.pk     - 3D matter powerspectrum (both linear and non-linear) for a set of redshift.

To see the const parameters: help,cosmo.const,/st

To see the evol parameters:   help,cosmo.evol,/st

To see the pk parameters:      help,cosmo.pk,/st

(4) Calculate the BAO Transverse and Radial Scales

You should now have a strucutre (bao) that contains bao transverse and radial scales.  The BAO scales are calculated following Blake et al. (2006) and Parkinson et al. (2007).  The observable quantities are the comoving distance to redshift z from the transverse and radial modes, denoted where r(z) is the comoving distance to redshift z and s is the sound horizon.

If you type, help, bao, /st , you will see the information contained in this structure.  In the example above we get;

IDL> help, bao, /st

** Structure <2127a04>, 6 tags, length=9840, data length=9840, refs=1:

YPRIME          DOUBLE    Array

Y                   DOUBLE    Array

Z                   DOUBLE    Array

YPRIME_BIN   DOUBLE    Array

Y_BIN            DOUBLE    Array

Z_BIN            DOUBLE    Array

This means that:

The BAO tangential (y) and radial (yprime) scales have been calculated for redshift z, using a grid of 400 values.

The calculation has also been made for 10 redshift bins.  The 'bao' structure also contains binned calculation for the tangential (y_bin) and radial (yprime_bin) BAO scales.

Printing BAO transverse and radial scales to a file.

If you want to print the BAO transverse and radial  to a file here is an example of how this can be done:

;to print out the BAO information

openw,10,'bao.dat'

for i = 0, n_elements(bao.z)-1 do printf, 10, bao.z[i], bao.y[i], bao.yprime[i]

close, 10

;to print out the binned BAO information

openw,10,'bao_bin.dat'

for i = 0, n_elements(bao.z_bin)-1 do printf, 10, bao.z_bin[i], bao.y_bin[i], bao.yprime_bin[i]

close, 10

The '10' is a Logical Unit Number between 0 and 128 to uniquely specify the file read from or written to.

Key

• red - Commands you can type into IDL
• green - What IDL print
• blue - other, e.g. keywords