Changeset 3947 in Sophya for trunk/Cosmo/RadioBeam/repicon.cc
- Timestamp:
- Feb 14, 2011, 12:58:29 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/RadioBeam/repicon.cc
r3936 r3947 32 32 33 33 // pour sauver la reponse mdresp et la config des dishes dans un fichier PPF 34 void SaveDTVecDishesH2Resp( string& outfile, vector<Dish>& vdishes, Four2DRespTable& mdresp);34 void SaveDTVecDishesH2Resp(POutPersist& po, vector<Dish>& vdishes, Four2DRespTable& mdresp); 35 35 36 36 // --------------------------------------------------------------------- 37 // main program for computing interferometer response un (u,v) plane37 // main program for computing interferometer response in (u,v) plane 38 38 // R. Ansari - Avril-Juin 2010 39 39 // --------------------------------------------------------------------- … … 42 42 { 43 43 cout << " Usage: repicon [-parname Value] configId OutPPFName \n" 44 << " configIds: f4x4,f8x8,f20x20, confA,confB,confC,confD, hex12,cross11, f3cyl,f8cyl,f3cylp,f8cylp \n" 45 << " f4x4 , f8x8 , f20x20 Filled array of nxn dishes \n" 44 << " configIds: f4x4,f8x8,f11x11,f20x20, confA,confB,confC,confD, hex12,cross11, \n" 45 << " f3cyl,f8cyl,f3cylp,f8cylp, nan12,nan24,nan36,nan40,nan128 \n" 46 << " f4x4 , f8x8 , f11x11 , f20x20 Filled array of nxn dishes \n" 46 47 << " confA , confB, confC, confD : semi-filled array of dishes \n" 47 48 << " hex12,cross11 : ASKAP like double hexagonal (12xD=12m), cross config (11xD=12m) \n" 49 << " nan12,nan24,nan36,nan40,nan128: 3,4,6,5,8 cylinder like configurations with 12,24,36,40,128 dishes\n" 48 50 << " f3cyl, f8cyl , f3cylp, f8cylp : filled array of non perfect/perfect of n cylinders \n" 49 51 << " f4cylw : filled array of 4 perfect of wide cylinders \n" 50 << " [ -parname value] : -renmax -z -prt -D -lmax \n" 52 << " pit2cyl,pit2cylw : 2 cylinders 15mx7m, 20mx10 for z=0.3 at Pittsburg (perfect) \n" 53 << " pit4cyl : 4 cylinders 32mx8m for z=0.3-0.7 at Pittsburg (perfect) \n" 54 << " [ -parname value] : -renmax -z -prt -D -lmax -eta -autocor \n" 51 55 << " -renmax MaxValue (default : Do NOT renormalize 2D response value \n" 52 56 << " -z redshift (default=0.7) --> determines Lambda \n" 53 57 << " -D DishDiameter (default=5 m) \n" 58 << " -eta fill_factor (default=0.90) \n" 54 59 << " -lmax array extension (default=100 m ) for response calculation kmax \n" 55 60 << " -repnxy Nx,Ny (default=200,200) ResponseTable binning \n" 56 61 << " -beamnxy Nx,Ny (default=200,200) Beam sampling \n" 57 62 << " -rot ThetaMaxDeg,NTheta,PhiMaxDeg,NPhi (default NO-rotate/pointing -> 23,10,30,15 ) \n" 63 << " -autocor : keep antenna auto-correlation signals (default NO) \n" 58 64 << " -prt PrtLev,PrtModulo (default=0,10) \n" 59 65 << endl; … … 82 88 83 89 double Ddish=5.; 90 double Eta=0.9; 84 91 bool fgDfixed=false; 85 92 double LMAX = 100.; // taille de la zone, pour calcul kmax … … 94 101 int NBX=200; 95 102 int NBY=200; 103 bool fgnoauto=true; // do not keep antenna autocorrelation signal 96 104 97 105 int ka=1; … … 106 114 Ddish=atof(arg[ka+1]); fgDfixed=true; ka+=2; 107 115 } 116 else if (strcmp(arg[ka],"-eta")==0) { 117 Eta=atof(arg[ka+1]); ka+=2; 118 } 108 119 else if (strcmp(arg[ka],"-lmax")==0) { 109 120 LMAX=atof(arg[ka+1]); fgLMAXfixed=true; ka+=2; … … 117 128 else if (strcmp(arg[ka],"-rot")==0) { 118 129 sscanf(arg[ka+1],"%lg,%d,%lg,%d",&thetamxdeg,&nteta,&phimxdeg,&nphi); fgpoint=true; ka+=2; 130 } 131 else if (strcmp(arg[ka],"-autocor")==0) { 132 fgnoauto=false; ka+=1; 119 133 } 120 134 else if (strcmp(arg[ka],"-prt")==0) { … … 143 157 LAMBDA = conv.getLambda(); 144 158 145 double Eta=0.95;146 159 double cylW=12.; // Largeur des cylindres 147 160 double cylRL=2*LAMBDA; // Longeur des elements de reception le long du cylindre … … 150 163 151 164 vector<Dish> vdishes; 152 cout << " repicon[1] : creating dish vector/ MultiDish for configuration: " << config << endl; 165 cout << " repicon[1] : creating dish vector/ MultiDish for configuration: " << config 166 << " Ddish=" << Ddish << " m. Eta=" << Eta << endl; 153 167 154 168 if (config=="f4x4") { … … 157 171 else if (config=="f8x8") { 158 172 vdishes=CreateFilledSqConfig(8,Ddish, Eta); 173 } 174 else if (config=="f11x11") { 175 vdishes=CreateFilledSqConfig(11,Ddish, Eta); 159 176 } 160 177 else if (config=="f20x20") { … … 172 189 cylW=25.; cylRL=3*LAMBDA; 173 190 vdishes=CreateFilledCylConfig(4, 100, cylW, cylRL, etaW, etaRL, false); 191 } 192 else if (config=="pit2cyl") { 193 etaW=0.9; etaRL=0.9; 194 cylW=7.; cylRL=2*LAMBDA; 195 vdishes=CreateFilledCylConfig(2, 32, cylW, cylRL, etaW, etaRL, false); 196 } 197 else if (config=="pit2cylw") { 198 etaW=0.9; etaRL=0.9; 199 cylW=9.; cylRL=2*LAMBDA; 200 vdishes=CreateFilledCylConfig(2, 40, cylW, cylRL, etaW, etaRL, false); 201 } 202 else if (config=="pit4cyl") { 203 etaW=0.9; etaRL=0.9; 204 cylW=8.; cylRL=2*LAMBDA; 205 vdishes=CreateFilledCylConfig(4, 64, cylW, cylRL, etaW, etaRL, false); 174 206 } 175 207 else if (config=="f8cyl") { … … 206 238 vdishes=CreateDoubleHexagonConfig(Ddish); 207 239 } 240 else if (config=="nan12") { 241 vdishes=CreateConfigNancay12(Ddish, Eta); 242 } 243 else if (config=="nan24") { 244 vdishes=CreateConfigNancay24(Ddish, Eta); 245 } 246 else if (config=="nan36") { 247 vdishes=CreateConfigNancay36(Ddish, Eta); 248 } 249 else if (config=="nan40") { 250 vdishes=CreateConfigNancay40(Ddish, Eta); 251 } 252 else if (config=="nan128") { 253 vdishes=CreateConfigNancay128(Ddish, Eta); 254 } 208 255 else { 209 256 cout << " NON valid configuration option -> exit" << endl; … … 212 259 213 260 double Dol = LMAX/LAMBDA; 214 bool fgnoauto = true;215 261 216 262 cout << " repicon[1] : Lambda=" << LAMBDA << " LMAX= " << LMAX << " NDishes=" << vdishes.size() 217 << " D-Dish=" << Ddish << " m. " << endl;263 << " D-Dish=" << Ddish << " m. " << ((fgnoauto)?" NO-":"With-") << "AutoCorrelation" << endl; 218 264 219 265 MultiDish mdish(LAMBDA, LMAX, vdishes, fgnoauto); … … 230 276 Histo2D hrep = mdish.GetResponse(); 231 277 PrtTim("Apres mdish.GetResponse()"); 278 HProf h1dnoise = mdish.GetProjNoiseLevel(); 279 HProf h1drep = mdish.GetProjResponse(); 232 280 233 281 Four2DRespTable mdresp(hrep, Dol, LAMBDA); … … 241 289 242 290 string outfile2 = "hdt_"+outfile; 243 cout << " repicon[4] : saving H2D-response, multidish config to PPF file " << outfile2 << endl; 244 SaveDTVecDishesH2Resp(outfile2, vdishes, mdresp); 291 POutPersist po2(outfile2); 292 cout << " repicon[4] : saving H1D/H2D-response, multidish config to PPF file " << outfile2 << endl; 293 po2 << PPFNameTag("h1dnoise") << h1dnoise; 294 po2 << PPFNameTag("h1drep") << h1drep; 295 SaveDTVecDishesH2Resp(po2, vdishes, mdresp); 245 296 246 297 rc = 0; … … 265 316 266 317 /*-- Nouvelle-Fonction --*/ 267 void SaveDTVecDishesH2Resp( string& outfile, vector<Dish>& vdishes, Four2DRespTable& mdresp)318 void SaveDTVecDishesH2Resp(POutPersist& po, vector<Dish>& vdishes, Four2DRespTable& mdresp) 268 319 { 269 320 char* names[5]={"did","posx","posy","diam","diamy"}; … … 285 336 } 286 337 Histo2D h2rep=mdresp.GetResponse(); 287 POutPersist po(outfile);288 338 po << PPFNameTag("mdish") << ntvd; 289 339 po << PPFNameTag("h2rep") << h2rep;
Note:
See TracChangeset
for help on using the changeset viewer.