Documentation

From LSS Mocks
Revision as of 19:12, 26 September 2018 by Jlee (talk | contribs) (→‎Logbooks)
Jump to navigation Jump to search

Logbooks

Here are the logbooks from various WebSky related projects:

Remi CIB Lensing

Pavel CIB Lensing

Jason CIB Lensing

Software

Data

Patchy kSZ Maps

Kappa, unlensed and lensed maps (LP)

K, Phi, unlensed, lensed PDF (LP)

Transferring Data to Nersc

1.) log in to nersc - $ssh <username>@edison.nersc.gov

2.) log into edisongrid - $ssh edisongrid

3.) Sign into collaboration account

$module load globus
$myproxy-logon -s nerscca.nersc.gov    !Password is the same as your username
$gsissh localhost -l cmbs4

4.) $cd /project/projectdirs/cmbs4

5.) ensure that the permissions are set appropriately (g+rX,o-rwx)

6.) Update README and cmbs4 wiki for any new files you add or changes you make!

README snippet for .npz catalogues

HALO CATALOGUES:
Contains (x,y,z,mass,redshift) for each halo. They are saved in the npz format of numpy (see http://docs.scipy.org/doc/numpy/reference/generated/numpy.savez.html). To load simply use
halo_cat = np.load(outfile)
xpk      = halo_cat["xpk"]
ypk      = halo_cat["ypk"]
zpk      = halo_cat["zpk"] 
M         = halo_cat["M"]
redshift = halo_cat["redshift"]

README snippet for .pksc catalogues

Contains (x,y,z,v_x,v_y,v_z,R_TH) for each halo. The final halo catalog is a binary file with a 12 byte header, R_TH is the Lagrangian top hat radius of the halo. The conversion to mass is M_halo = 4*pi/3 * R_TH**3 * rho_bar, where rho_mean = 2.775e11*Omega_M*h**2. header = (int Non, float RTHmax, float redshiftbox) where Non is the total number of halos found, RTHmax is the radius of the largest halo in the simulation, redshiftbox is the redshift of the box, which will be negative for lightcone runs. This 12 byte header is then followed by a list of Non*7 4 byte floats that represent (x_halo,y_halo,z_halo,vx_halo,vy_halo,vz_halo,Rth_halo)

Sample Python and Fortran code to load a datafile:

Python:

pkfile            = open(filein,"rb")
Non              = np.fromfile(pkfile, dtype=np.int32, count=1)
RTHMAXin   = np.fromfile(pkfile, dtype=np.float32, count=1)
redshiftbox  = np.fromfile(pkfile, dtype=np.float32, count=1)
print "Non = ", Non
npkdata        = 7*Non
peakdata      = np.fromfile(pkfile, dtype=np.float32, count=npkdata)
peakdata      = np.reshape(peakdata,(Non,7))
xpos   = peakdata[:,0]
ypos   = peakdata[:,1]
zpos   = peakdata[:,2]
vxpos = peakdata[:,3]
vypos = peakdata[:,4]
vzpos = peakdata[:,5]
Rth     = peakdata[:,6]
Omega_M = 0.25
h                = 0.7
rhomean   = 2.775e11*Omega_M*h**2
M               = 4.0/3*np.pi*Rth**3*rhomean

Redshifts

z=np.linspace(0,4,1000)
def hubble(z):
    return h*100*np.sqrt(omegam*(1+z)**3+1-omegam)
def drdz(z):
    return 3e5 / hubble(z)
r  = np.cumsum(drdz(z)*(z[1]-z[0]))
r -= r[0]
z_to_r   = sp.interpolate.interp1d(z,r)
r_to_z   = sp.interpolate.interp1d(r,z)

Fortran:

open(4,file=filein,status='old',access='stream')
read(4) Npk,RTHLmax_in,boxredshift
allocate(posxyz(3,nhalo))
allocate(velxyz(3,nhalo))
allocate(rth(nhalo))
allocate(mass(nhalo))
allocate(vrad(nhalo))
offset_num_floats = 7*nhalo*myid
read(4) ((posxyz(j,i),j=1,3),&
        (velxyz(j,i),j=1,3),&
        rth(i),i=1,nhalo)
close(4)

Modeling

CMB Lensing

Using a 'field+halo' model to generate lensing kappa maps from Gaussian random field (GRF) of density fluctuations on the past light cone.

Halo Model: The peak patch algorithm is run on the GRF to produce a catalog of halos with [RA, Dec, redshift, velocity, mass]. The halos are assumed to have a spherically-symmetric matter distribution parameterized by a generalized NFW density profile. This contribution to the convergence from each halo is then projected onto the kappa map, appropriately weighted by the lensing kernel, W(z).

Field Model: (development in progress) Lagrangian perturbation theory is used to move matter not within halos to its final Eulerian position. This field matter distribution is then added directly to the kappa map. A [260 x 260 x 60] Mpc/h slab at z=0 is shown below with all the matter moved with either first (1LPT) or second (2LPT) order Lagrangian perturbation theory, in addition to the halos found with the peak patch method (these peak patch halos are also moved with either . Shown below are the same peak patch halo distributions, but also the