Changeset 3796 in Sophya for trunk/Cosmo/RadioBeam/calcpk2.cc
- Timestamp:
- Jun 29, 2010, 7:26:01 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/RadioBeam/calcpk2.cc
r3792 r3796 7 7 R. Ansari , C. Magneville - Juin 2010 8 8 9 Usage: calcpk2 InMapLSS convFacLSS InMapSync convFacSync InMapRadioSource convFacRsc OutPk 10 [PixNoiseLevel] [ TargetBeamArcmin] [NSigSrcThr]9 Usage: calcpk2 InMapLSS convFacLSS InMapSync convFacSync InMapRadioSource convFacRsc OutPkFile 10 [PixNoiseLevel] [Diameter/Four2DRespTableFile] [TargetBeamArcmin] [NSigSrcThr] 11 11 --------------------------------------------------------------- */ 12 12 … … 44 44 { 45 45 if (narg<6) { 46 cout << " Usage: calcpk2 InMapLSS convFacLSS InMapSync convFacSync OutPk \n"47 << " [PixNoiseLevel] [ TargetBeamArcmin] [NSigSrcThr]" << endl;46 cout << " Usage: calcpk2 InMapLSS convFacLSS InMapSync convFacSync OutPkFile \n" 47 << " [PixNoiseLevel] [Diameter/Four2DRespTableFile] [TargetBeamArcmin] [NSigSrcThr]" << endl; 48 48 return 1; 49 49 } … … 65 65 66 66 bool fgcorrbeam=true; 67 68 bool fgresptbl=false; 69 double DIAMETRE=100.; 70 string resptblname; 71 if (narg>7) { 72 if (isdigit(*arg[7])) { 73 fgresptbl=false; 74 DIAMETRE=atof(arg[7]); 75 } 76 else { 77 resptblname=arg[7]; 78 fgresptbl=true; 79 } 80 } 67 81 double tbeamDoL=135; 68 if (narg> 7) {69 tbeamDoL=atof(arg[ 7]);82 if (narg>8) { 83 tbeamDoL=atof(arg[8]); 70 84 if (tbeamDoL<1.) fgcorrbeam=false; 71 85 } 72 86 bool fgclnsrc=true; 73 87 double nsigsrc=5.; 74 if (narg> 8) {75 nsigsrc=atof(arg[ 8]);88 if (narg>9) { 89 nsigsrc=atof(arg[9]); 76 90 if (nsigsrc<1.e-6) fgclnsrc=false; 77 91 } … … 119 133 conv.setFrequency(Freq0MHz); 120 134 double lambda = conv.getLambda(); 121 Four2DResponse arep(2, InterfArrayDiametre/lambda, InterfArrayDiametre/lambda, lambda); 135 Four2DResponse arep(2, DIAMETRE/lambda, DIAMETRE/lambda, lambda); 136 Four2DResponse* arep_p=&arep; 137 Four2DRespTable resptbl; 138 if (fgresptbl) { 139 cout << "calcpk2[3.a]: initializing Four2DRespTable from file" << resptblname << endl; 140 resptbl.readFromPPF(resptblname); 141 arep_p=&resptbl; 142 } 143 else cout << " calcpk2[3.a]: Four2DResponse ( Diameter=" << DIAMETRE << " Lambda= " << lambda 144 << " DoL=" << DIAMETRE/lambda << " ) " << endl; 145 122 146 double DoL = tbeamDoL; 123 147 double tbeamarcmin = RadianToDegree(1.22/DoL)*60.; 124 Four2DResponse tbeam(2, DoL, DoL ); 125 ForegroundCleaner cleaner(arep, tbeam, skycube); 148 int typcb = 2; 149 // if (fgresptbl) typcb=22; 150 Four2DResponse tbeam(typcb, DoL, DoL ); 151 152 ForegroundCleaner cleaner(*arep_p, tbeam, skycube); 126 153 if (fgcorrbeam) { 127 cout << "calcpk2[3. a] : calling cleaner.BeamCorrections() for target beam D/Lambda=" << DoL128 << " -> arcmin " << tbeamarcmin << endl;154 cout << "calcpk2[3.b] : calling cleaner.BeamCorrections() for target beam D/Lambda=" << DoL 155 << " -> arcmin " << tbeamarcmin << " TypDishResp=" << typcb << endl; 129 156 cleaner.BeamCorrections(); 130 157 } 131 cout << " calcpk2[3. b] : calling cleaner.CleanNegatives() ... " << endl;158 cout << " calcpk2[3.c] : calling cleaner.CleanNegatives() ... " << endl; 132 159 cleaner.CleanNegatives(); 133 160 if (fgclnsrc) { 134 cout << "calcpk2[3. c] : calling cleaner.CleanPointSources() with threshold NSigma=" << nsigsrc << endl;161 cout << "calcpk2[3.d] : calling cleaner.CleanPointSources() with threshold NSigma=" << nsigsrc << endl; 135 162 cleaner.CleanPointSources(nsigsrc); 136 163 }
Note:
See TracChangeset
for help on using the changeset viewer.