Changeset 3973 in Sophya for trunk/Cosmo/RadioBeam/calcpk2.cc
- Timestamp:
- Apr 18, 2011, 5:30:44 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/RadioBeam/calcpk2.cc
r3830 r3973 7 7 R. Ansari , C. Magneville - Juin 2010 8 8 9 Usage: calcpk2 InMapLSS convFacLSS InMapSync convFacSync InMapRadioSource convFacRsc OutPkFile9 Usage: calcpk2 [-t -g] InMapLSS convFacLSS InMapSync convFacSync InMapRadioSource convFacRsc OutPkFile 10 10 [PixNoiseLevel] [Diameter/Four2DRespTableFile] [TargetBeamArcmin] [NSigSrcThr] 11 11 --------------------------------------------------------------- */ … … 44 44 { 45 45 if ( (narg<6)||((narg>1)&&(strcmp(arg[1],"-h")==0)) ) { 46 cout << " Usage: calcpk2 InMapLSS convFacLSS InMapFgnd convFacFgnd OutPkFile \n"47 << " [PixNoiseLevel] [D_Dish/Four2DRespTableFile CorBeamD oL] \n"46 cout << " Usage: [-t -g] calcpk2 InMapLSS convFacLSS InMapFgnd convFacFgnd OutPkFile \n" 47 << " [PixNoiseLevel] [D_Dish/Four2DRespTableFile CorBeamDiam] \n" 48 48 << " [NSigSrcThr] [P2/P1] [RecMapFile] " << endl; 49 49 if ((narg>1)&&(strcmp(arg[1],"-h")==0)) { 50 cout << "- InMapLSS: Input 3D LSS cube (PPF file name) \n " 50 cout << "-t -g : Triangular / gaussian beam shape (def=gaussian) \n" 51 << "- InMapLSS: Input 3D LSS cube (PPF file name) \n " 51 52 << "- convFacLSS: LSS cube conversion factor to mK (milliKelvin) \n" 52 53 << "- InMapFgnd: Input 3D foreground cube (PPF file name) \n" … … 54 55 << "- PixNoiseLevel: White noise level per pixel (mK) (default=0.) \n" 55 56 << "- D_Dish/Four2DRespTableFile: Dish diameter or 2D (u,v) plane response (PPF file name) \n" 56 << "- CorBeamD oL: Beam correction target Diameter/Lambda\n"57 << "- CorBeamDiam: Beam correction target dish diameter \n" 57 58 << " These two parameters are used to correct for beam effect for a \n" 58 59 << " target beam (independent of frequency) defined by D/Lambda \n" 59 << " DoL = 100 --> beam ~ 35 arcmin (D=30m @ z~0.5 ) \n"60 << " DoL = 100 --> beam ~ 35 arcmin (D=30m @ z~0.5 Lambda~30cm) \n" 60 61 << " default : no beam correction applied \n " 61 62 << " - NSigSrcThr: Point source cleaning, Nb_Sigmas on stacked 2D temperature \n" 62 << " default : no point source cleaning, use NSigSrcThr ~ 3..5 \n"63 << " default (0.) : no point source cleaning, use NSigSrcThr ~ 3..5 \n" 63 64 << " - P2/P1: 2nd/first degree polynomial fit on ln(Temp) = f(ln(freq)) \n " 64 65 << " foreground subtraction. default is P2 \n" … … 74 75 int rc = 0; 75 76 try { 77 bool fggaussian=true; // true -> gaussian beam 78 // decodage argument optionnel 79 bool fgoptarg=true; 80 while (fgoptarg) { 81 string fbo = arg[1]; 82 if (fbo=="-t") { fggaussian=false; arg++; narg--; } 83 else if (fbo=="-g") { fggaussian=true; arg++; narg--; } 84 else fgoptarg=false; 85 } 86 if (narg < 6) { 87 cout << " calcpk2/error arguments , applobe -h for help " << endl; 88 return 2; 89 } 90 76 91 string inppflss = arg[1]; 77 92 r_4 rfaclss = atof(arg[2]); … … 102 117 } 103 118 } 104 double tbeamD oL=0.;119 double tbeamDiam=0.; 105 120 if (narg>8) { 106 tbeamD oL=atof(arg[8]);107 if (tbeamD oL<1.) fgcorrbeam=false;121 tbeamDiam=atof(arg[8]); 122 if (tbeamDiam<1.) fgcorrbeam=false; 108 123 } 109 124 bool fgclnsrc=true; … … 170 185 cout << "calcpk2[3.a]: initializing Four2DRespTable from file" << resptblname << endl; 171 186 resptbl.readFromPPF(resptblname); 187 resptbl.renormalize(1.); 172 188 arep_p=&resptbl; 173 189 } … … 175 191 << " DoL=" << DIAMETRE/lambda << " ) " << endl; 176 192 177 double DoL = tbeamD oL;193 double DoL = tbeamDiam/lambda; 178 194 double tbeamarcmin = RadianToDegree(1.22/DoL)*60.; 179 int typcb = 2;195 int typcb = (fggaussian)?1:2; 180 196 // if (fgresptbl) typcb=22; 181 197 Four2DResponse tbeam(typcb, DoL, DoL ); … … 183 199 ForegroundCleaner cleaner(*arep_p, tbeam, skycube); 184 200 if (fgcorrbeam) { 185 cout << "calcpk2[3.b] : calling cleaner.BeamCorrections() for target beam D /Lambda=" << DoL186 << " -> arcmin " << tbeamarcmin << " TypDishResp=" << typcb << endl;201 cout << "calcpk2[3.b] : calling cleaner.BeamCorrections() for target beam Diameter=" << tbeamDiam 202 << " D/Lambda=" << DoL << " -> arcmin " << tbeamarcmin << " TypDishResp=" << typcb << endl; 187 203 cleaner.BeamCorrections(); 188 204 } … … 218 234 pkc.SetCellSize(dkxmpc, dkympc, dkzmpc); 219 235 220 HProf hp = pkc.ComputePk(0., 256);236 HProf hp = pkc.ComputePk(0.,HPk_NBin); 221 237 222 238 tm.Split(" Done ComputePk ");
Note:
See TracChangeset
for help on using the changeset viewer.