******************************************* CALIBRATION ERRORS IN THE LSS - PUBLIC CODE ******************************************* This is a C code that takes calibration errors with arbitrary spatial dependence and outputs the biases in the angular power spectra of galaxies due to these calibration errors. The code has been written by Dragan Huterer in 2011-2012. If you end up using the code for your publication(s), please cite: =========================================== Huterer, Cunha and Fang, arXiv:1211.1015 =========================================== Note, this code is a significantly pared-down version of the code actually used in the above paper - for simplicity, we ask the reader to input his/her angular auto-correlation power spectra C_ii(l), where i denotes a redshift bin and l is the multipole. We then calculate T_ii(l)/C_ii(l), where T_ii(l) is the biased angular power spectrum. The calculation of the fiducial angular power spectrum C_ii(l) is 'trivial' but messy, and we leave it to the reader. Nevertheless, the reader can use the Cl_fiduc_input.dat file that we provide, which corresponds to the fiducial case from our paper (5 redshift bins out to zmax=1 for the forecasted DES survey). NOT in this code, but projected to be added here soon: - possibility of adding cross-powers C_ij(l) and T_ij(l) with i\neq j (they contain little info for cosmology, but might be useful for the systematics) - possibility of adding correlations between different l, so T_ij(l, l') (this is identically zero in the statistically isotropic, unbiased cosmology, but calibration errors introduce coupling between different l in general) ************************** TO COMPILE THE CODE: ************************** Except for GSL routines, which you need and for which you modify the makefile (depending where they are on your computer), the code should be ready to compile out of the box. The C compiler is gcc. The necessary Numerical Recipes and Wigner-3j routines are all in this directory, so you should not need to worry about those at all. Run the code with > make clean > make cl and then either one of these two > ./cl # for partial keyboard input > ./cl all_file_input.dat # for all-file input ******************************** TO RUN THE CODE: REQUIRED INPUT ********************************* 1) Number of tomographic bins (Z_BINS); asked at the prompt if keyboard input 2) Choice of whether your input is dN/N (also called c(nhat) in the paper), or magnitude errors dm(nhat); this is the variable CAL_OR_MAG. The two quantities are related via dN/N (nhat) \equiv c(nhat) = ln(10) * s(z) * dm(nhat) where s(z) is the faint end of the luminosity function. 2.5) In case you choose magnitudes in the previous question, you also will be prompted to input, for each tomographic bin, faint-end slope of LF s(z). 3) Choice of whether you want rms of the field, or file with angular power spectrum Cl OF THE CALIBRATION FIELD/MAG; this is the variable CHOICE. 4) If CHOICE==1 (rms chosen), then you will be prompted to say over how many l do you want that variance spread (LMAX_SPREAD_CVAR variable), and what the actual rms you want (CALIB_OR_MAG_ERR). If CHOICE == 2 (file with calib/mag multipoles chosen), then you will need to have the file Cl_mag_input.dat in this directory, in the format l Cl_mag(l) 5) You will need the file multipoles_to_evaluate_input.dat in this directory, with multipoles at which you want to evaluate Tl/Cl (in every redshift bin); format is l so just each multipole (integer) in a line separately. 6) The fiducial angular power spectrum of the galaxy field Cl should be in a file Cl_fiduc_input.dat. Make that file in the format: l Cl_11(l) ... Cl_nn(l) where n is the total number of redshift bins.