Changeset 3154 in Sophya for trunk/Cosmo/SimLSS/cmvobserv3d.cc
- Timestamp:
- Jan 19, 2007, 5:19:49 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/cmvobserv3d.cc
r3150 r3154 28 28 <<" -Z zref : redshift median"<<endl 29 29 <<" -s snoise : sigma du bruit en Msol"<<endl 30 <<" -2 : compute 2D spectrum"<<endl 31 <<" -F : write cube in FITS format"<<endl 32 <<" -P : write cube in PPF format"<<endl 33 <<" -V : compute variance from real space"<<endl 30 34 <<endl; 31 35 } … … 73 77 unsigned short nthread=4; 74 78 79 // *** What to do 80 bool comp2dspec = false; 81 bool wfits = false; 82 bool wppf = false; 83 bool compvarreal = false; 84 75 85 // --- Decodage arguments 76 86 77 87 char c; 78 while((c = getopt(narg,arg,"ha0 x:y:z:s:Z:")) != -1) {88 while((c = getopt(narg,arg,"ha0PWV2x:y:z:s:Z:")) != -1) { 79 89 switch (c) { 80 90 case 'a' : … … 98 108 case 'Z' : 99 109 sscanf(optarg,"%lf",&zref); 110 break; 111 case '2' : 112 comp2dspec = true; 113 break; 114 case 'V' : 115 compvarreal = true; 116 break; 117 case 'W' : 118 wfits = true; 119 break; 120 case 'P' : 121 wppf = true; 100 122 break; 101 123 case 'h' : … … 185 207 186 208 //----------------------------------------------------------------- 187 cout<<endl<<"\n--- Compute galax iesdensity number"<<endl;209 cout<<endl<<"\n--- Compute galaxy density number"<<endl; 188 210 189 211 sch.SetOutValue(0); … … 249 271 } 250 272 251 if( 1) {273 if(comp2dspec) { 252 274 cout<<"\n--- Checking realization 2D spectra"<<endl; 253 275 Histo2DErr hpkgen2(0.,ktnyqmax,nherrt,0.,kznyqmax,nherrz); … … 265 287 } 266 288 267 if( 1) fluct3d.WriteFits("!cmvobserv3d_k.fits");268 if( 1) fluct3d.WritePPF("cmvobserv3d_k.ppf",false);289 if(wfits) fluct3d.WriteFits("!cmvobserv3d_k0.fits"); 290 if(wppf) fluct3d.WritePPF("cmvobserv3d_k0.ppf",false); 269 291 270 292 if(1) { … … 279 301 } 280 302 281 if( 1) {303 if(comp2dspec) { 282 304 cout<<"\n--- Checking realization 2D spectra after pixel shape convol."<<endl; 283 305 Histo2DErr hpkgenf2(0.,ktnyqmax,nherrt,0.,kznyqmax,nherrz); … … 295 317 cout<<"rgen.Min = "<<rmin<<" , Max="<<rmax<<endl; 296 318 297 if( 1) fluct3d.WriteFits("!cmvobserv3d_r0.fits");298 if( 1) fluct3d.WritePPF("cmvobserv3d_r0.ppf",true);319 if(wfits) fluct3d.WriteFits("!cmvobserv3d_r0.fits"); 320 if(wppf) fluct3d.WritePPF("cmvobserv3d_r0.ppf",true); 299 321 300 322 int_8 nm; … … 308 330 } 309 331 310 if( 1) {332 if(compvarreal) { 311 333 cout<<"\n--- Check variance sigmaR in real space"<<endl; 312 334 double varr; … … 336 358 <<rs2<<" -> "<<sqrt(rs2)<<endl; 337 359 338 cout<<"\n--- Apply poisson on galax ienumber"<<endl;360 cout<<"\n--- Apply poisson on galaxy number"<<endl; 339 361 nm = fluct3d.ApplyPoisson(); 340 362 cout<<nm<<" galaxies into survey after poisson"<<endl; … … 343 365 <<rs2<<" -> "<<sqrt(rs2)<<endl; 344 366 345 cout<<"\n--- Convert Galax iesnumber to HI mass"<<endl;367 cout<<"\n--- Convert Galaxy number to HI mass"<<endl; 346 368 long nhmdndm = long( (lschmax-lschmin+1.)*100. + 0.5); 347 369 Histo hmdndm(lschmin,lschmax,nhmdndm); … … 368 390 <<rs2<<" -> "<<sqrt(rs2)<<endl; 369 391 370 if( 1) fluct3d.WriteFits("!cmvobserv3d_r.fits");371 if( 1) fluct3d.WritePPF("cmvobserv3d_r.ppf",true);392 if(wfits) fluct3d.WriteFits("!cmvobserv3d_r.fits"); 393 if(wppf) fluct3d.WritePPF("cmvobserv3d_r.ppf",true); 372 394 373 395 cout<<"\n--- Add noise to HI Flux snoise="<<snoise<<endl; … … 384 406 fluct3d.ReComputeFourier(); 385 407 } 408 409 if(wfits) fluct3d.WriteFits("!cmvobserv3d_k.fits"); 410 if(wppf) fluct3d.WritePPF("cmvobserv3d_k.ppf",false); 386 411 387 412 if(1) { … … 394 419 } 395 420 396 if( 1) {421 if(comp2dspec) { 397 422 cout<<"\n--- Computing final 2D spectrum"<<endl; 398 423 Histo2DErr hpkrec2(0.,ktnyqmax,nherrt,0.,kznyqmax,nherrz); … … 410 435 /* 411 436 ###################################################### 437 readfits cmvobserv3d_k0.fits 412 438 readfits cmvobserv3d_k.fits 413 439 readfits cmvobserv3d_r0.fits 414 440 readfits cmvobserv3d_r.fits 415 441 442 openppf cmvobserv3d_k0.ppf 416 443 openppf cmvobserv3d_k.ppf 417 444 openppf cmvobserv3d_r0.ppf
Note:
See TracChangeset
for help on using the changeset viewer.