source: Sophya/trunk/Cosmo/RadioBeam/subtractradsrc.cmd@ 3787

Last change on this file since 3787 was 3787, checked in by ansari, 15 years ago

Ajout classes / programmes de calcul d'effet de lobe sur les radio-sources, Reza 25/06/2010

File size: 3.1 KB
RevLine 
[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
10csh> ~/Objs/exe/cmvginit3df -a -1 -2 -C -G 0. -F 0 -x 360,4 -y 360,4 -z 128,5 -Z 0.6 -8 1. -n 10000 -O 0,2 -o map3dz06B -T 2
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
16csh> cat > racube.pic
17set f map3dz06B
18readfits ${f}_r.fits
19rename ${f}_r map
20print map
21c++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
29print omap
30saveppf omap lsscube.ppf
31
32csh> spiapp -term -exec lsscube.ppf
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
36csh> ./Objs/syncube syncmap_eq.fits syncube.ppf
37# 2.b/ radio source cube from NVSS catalog
38csh> ./Objs/srcat2cube nvss.fits nvsscube.ppf
39# 2.c/ Add the two cubes using the following spiapp script
40csh> cat > sumcubes.pic
41openppf syncube.ppf
42openppf nvsscube.ppf
43expmeansig syncube val
44expmeansig nvsscube val
45c++exec TArray<r_4> fgndcube = syncube+nvsscube; KeepObj(fgndcube);
46print fgndcube
47expmeansig fgndcube val
48saveppf fgndcube fgndcube.ppf
49
50csh> spiapp -term -exec sumcubes.pic
51
52## Step 3/ Apply lobe effect on foreground cube and LSS cube
53csh> ./Objs/applobe fgndcube.ppf fgndcube_lobe.ppf
54csh> ./Objs/applobe lsscube.ppf lsscube_lobe.ppf
55
56### Step 4/ Compute power spectra
57## mass to temperature converion factor CT21 ~= 0.2 mK
58## Foreground maps are in temperature
59## Noise fluctuations Sigma^2 ~ T_sys^2 / t_obs * DeltaFreq
60## Tsys ~ 50 K , DeltaFreq ~ 0.5 MHz , t_obs ~ 1 day ~ 80 000 s.
61## sigma_noise ~ 0.25 mK
62# 4.a/ LSS power spectrum without noise
63csh> ./Objs/calcpk lsscube.ppf lsspk.ppf 0.2
64# and with noise
65csh> ./Objs/calcpk lsscube.ppf lsspkwn.ppf 0.2 0.25
66# with the lobe effect
67csh> ./Objs/calcpk lsscube_lobe.ppf lsspklobe.ppf 0.2
68# 4.b/ Foreground power spectrum
69csh> ./Objs/calcpk fgndcube.ppf fgndpk.ppf 1000
70csh> ./Objs/calcpk fgndcube_lobe.ppf fgndpklobe.ppf 1000
71
72# 4.c/ Extract LSS P(k) from Foreground+LSS+noise , after cleaning/subtraction without beam
73csh> ./Objs/calcpk2 lsscube.ppf 0.2 fgndcube.ppf 1000 subpk.ppf 0.25
74# 4.d / Extract LSS P(k) from Foreground+LSS+noise and beam effect
75csh> ./Objs/calcpk2 lsscube_lobe.ppf 0.2 fgndcube_lobe.ppf 1000 subpklobe.ppf 0.25
76
77### Step 5 / Check the results using spiapp
78openppf fgndpk.ppf
79openppf lsspk.ppf
80openppf lsspkwn.ppf
81openppf lsspklobe.ppf
Note: See TracBrowser for help on using the repository browser.