| [3787] | 1 | #####################################################################################
|
|---|
| 2 | #### Commands to run the different programs to produce foreground maps
|
|---|
| 3 | #### and compute radio-source subtracted P(k)
|
|---|
| 4 | #####################################################################################
|
|---|
| 5 |
|
|---|
| 6 | ### Cube definition in file cubedef.h
|
|---|
| 7 |
|
|---|
| 8 | ### Step 1/ Produce an LSS data cube with appropriate size and redshift using SimLSS
|
|---|
| 9 | # 1.a/ Run SimLSS
|
|---|
| [3789] | 10 | csh> ~/Objs/exe/cmvginit3df -a -1 -2 -C -G 0. -F 0 -x 360,3 -y 360,3 -z 256,1.5 -Z 0.56 -8 1. -n 10000 -O 0,2 -o lssz056 -T 2
|
|---|
| [3787] | 11 | # 1.b/ Change the X and Z axis of the cube to adapt it to RadioBeam package convention
|
|---|
| 12 | # SimLSS output : the radial (redshift) direction along X axis of the cube (TArray)
|
|---|
| 13 | # RadioBeam cubes : the radial (redshift) direction along Z axis of the cube (TArray)
|
|---|
| 14 | # Execucte the following script in spiapp :
|
|---|
| 15 |
|
|---|
| 16 | csh> cat > racube.pic
|
|---|
| [3789] | 17 | set f lssz056
|
|---|
| [3787] | 18 | readfits ${f}_r.fits
|
|---|
| 19 | rename ${f}_r map
|
|---|
| 20 | print map
|
|---|
| 21 | c++exec \
|
|---|
| 22 | TArray<r_4> omap(map.SizeY(),map.SizeZ(),map.SizeX()-2 ); \
|
|---|
| 23 | for(sa_size_t i=0;i<omap.SizeX();i++) \
|
|---|
| 24 | for(sa_size_t j=0;j<omap.SizeY();j++) \
|
|---|
| 25 | for(sa_size_t k=0;k<omap.SizeZ();k++) \
|
|---|
| 26 | omap(i,j,k)=map(k+1,i,j); \
|
|---|
| 27 | KeepObj(omap);
|
|---|
| 28 |
|
|---|
| 29 | print omap
|
|---|
| 30 | saveppf omap lsscube.ppf
|
|---|
| 31 |
|
|---|
| [3789] | 32 | csh> spiapp -term -exec racube.pic
|
|---|
| [3787] | 33 |
|
|---|
| 34 | ## Step 2/ Produce synchrotron and radio source sky cubes (cube unit is Temparature- Kelvin)
|
|---|
| 35 | # 2.a/ Synchrotron map from HASLAM 400 MHz map
|
|---|
| 36 | csh> ./Objs/syncube syncmap_eq.fits syncube.ppf
|
|---|
| 37 | # 2.b/ radio source cube from NVSS catalog
|
|---|
| 38 | csh> ./Objs/srcat2cube nvss.fits nvsscube.ppf
|
|---|
| 39 | # 2.c/ Add the two cubes using the following spiapp script
|
|---|
| 40 | csh> cat > sumcubes.pic
|
|---|
| 41 | openppf syncube.ppf
|
|---|
| 42 | openppf nvsscube.ppf
|
|---|
| [3789] | 43 | # expmeansig syncube val
|
|---|
| 44 | # expmeansig nvsscube val
|
|---|
| [3787] | 45 | c++exec TArray<r_4> fgndcube = syncube+nvsscube; KeepObj(fgndcube);
|
|---|
| 46 | print fgndcube
|
|---|
| [3789] | 47 | # expmeansig fgndcube val
|
|---|
| [3787] | 48 | saveppf fgndcube fgndcube.ppf
|
|---|
| 49 |
|
|---|
| 50 | csh> spiapp -term -exec sumcubes.pic
|
|---|
| 51 |
|
|---|
| [3796] | 52 | ## Step 3/ Apply lobe (50 meter diameter array) effect on foreground cube and LSS cube
|
|---|
| 53 | csh> ./Objs/applobe 50. fgndcube.ppf fgndcube_lobe.ppf
|
|---|
| 54 | csh> ./Objs/applobe 50. lsscube.ppf lsscube_lobe.ppf
|
|---|
| [3793] | 55 | ## Step 3.b/ Correct for the lobe effect by bringing all to the beam of Diam/Lambda = 130
|
|---|
| [3796] | 56 | csh> ./Objs/applobe 50. lsscube_lobe.ppf lsscube_corlobe.ppf 130
|
|---|
| 57 | csh> ./Objs/applobe 50. fgndcube_lobe.ppf fgndcube_corlobe.ppf 130
|
|---|
| [3787] | 58 |
|
|---|
| 59 | ### Step 4/ Compute power spectra
|
|---|
| 60 | ## mass to temperature converion factor CT21 ~= 0.2 mK
|
|---|
| 61 | ## Foreground maps are in temperature
|
|---|
| 62 | ## Noise fluctuations Sigma^2 ~ T_sys^2 / t_obs * DeltaFreq
|
|---|
| [3789] | 63 | ## Tsys ~ 50 K , DeltaFreq ~ 0.275 MHz , t_obs ~ 1 day ~ 80 000 s.
|
|---|
| 64 | ## sigma_noise ~ 0.35 mK
|
|---|
| [3787] | 65 | # 4.a/ LSS power spectrum without noise
|
|---|
| 66 | csh> ./Objs/calcpk lsscube.ppf lsspk.ppf 0.2
|
|---|
| 67 | # and with noise
|
|---|
| [3789] | 68 | csh> ./Objs/calcpk lsscube.ppf lsspkwn.ppf 0.2 0.35
|
|---|
| [3787] | 69 | # with the lobe effect
|
|---|
| 70 | csh> ./Objs/calcpk lsscube_lobe.ppf lsspklobe.ppf 0.2
|
|---|
| [3789] | 71 | csh> ./Objs/calcpk lsscube_corlobe.ppf lsspkcorlobe.ppf 0.2
|
|---|
| 72 |
|
|---|
| [3787] | 73 | # 4.b/ Foreground power spectrum
|
|---|
| 74 | csh> ./Objs/calcpk fgndcube.ppf fgndpk.ppf 1000
|
|---|
| 75 | csh> ./Objs/calcpk fgndcube_lobe.ppf fgndpklobe.ppf 1000
|
|---|
| [3789] | 76 | csh> ./Objs/calcpk fgndcube_corlobe.ppf fgndpkcorlobe.ppf 1000
|
|---|
| [3787] | 77 |
|
|---|
| 78 | # 4.c/ Extract LSS P(k) from Foreground+LSS+noise , after cleaning/subtraction without beam
|
|---|
| [3796] | 79 | csh> ./Objs/calcpk2 lsscube.ppf 0.2 fgndcube.ppf 1000 subpk.ppf 0.35 50. 0. 0.
|
|---|
| [3793] | 80 | # 4.d / Extract LSS P(k) from Foreground+LSS+noise and beam effect - correcting to a beam of Diam/Lambda = 130
|
|---|
| [3796] | 81 | csh> ./Objs/calcpk2 lsscube_lobe.ppf 0.2 fgndcube_lobe.ppf 1000 subpklobe.ppf 0.35 50. 130. 3.
|
|---|
| [3787] | 82 |
|
|---|
| 83 | ### Step 5 / Check the results using spiapp
|
|---|
| [3793] | 84 | delobjs *
|
|---|
| 85 | openppf fgndpk.ppf
|
|---|
| 86 | disp fgndpk 'logx logy'
|
|---|
| 87 | # Adjust the limits
|
|---|
| 88 | openppf fgndpklobe.ppf
|
|---|
| 89 | disp fgndpklobe 'same red'
|
|---|
| 90 | disp fgndpklobe 'same red nsta'
|
|---|
| 91 | openppf fgndpkcorlobe.ppf
|
|---|
| 92 | disp fgndpkcorlobe 'same magenta nsta'
|
|---|
| 93 | openppf lsspk.ppf
|
|---|
| 94 | disp lsspk 'same gold nsta'
|
|---|
| 95 | openppf lsspklobe.ppf
|
|---|
| 96 | disp lsspklobe 'same green nsta'
|
|---|
| 97 | openppf subpklobe.ppf
|
|---|
| 98 | disp subpklobe 'same blue nsta'
|
|---|