Changeset 3155 in Sophya for trunk/Cosmo/SimLSS/cmvobserv3d.cc
- Timestamp:
- Jan 19, 2007, 6:18:38 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/cmvobserv3d.cc
r3154 r3155 135 135 <<", npt="<<npt<<endl; 136 136 cout<<"R="<<R<<" Rg="<<Rg<<" Mpc, sigmaR="<<sigmaR<<endl; 137 cout<<"nstar= "<<nstar<<" mstar="<<mstar<<" alp ha="<<alpha<<endl;137 cout<<"nstar= "<<nstar<<" mstar="<<mstar<<" alpa="<<alpha<<endl; 138 138 cout<<"schmin="<<schmin<<" ("<<lschmin 139 139 <<"), schmax="<<schmax<<" ("<<lschmax<<") Msol" … … 204 204 cout<<"varpk_int="<<sr2int<<" -> sigma="<<sqrt(sr2int)<<endl; 205 205 206 PrtTim("End of definition");207 208 206 //----------------------------------------------------------------- 209 207 cout<<endl<<"\n--- Compute galaxy density number"<<endl; … … 219 217 cout<<"Galaxy mass density= "<<mass_by_mpc3<<" Msol/Mpc^3 between limits"<<endl; 220 218 219 PrtTim(">>>> End of definition"); 220 221 221 //----------------------------------------------------------------- 222 222 // FFTW3 (p26): faster if sizes 2^a 3^b 5^c 7^d 11^e 13^f with e+f=0 ou 1 223 cout<<endl<<"\n--- Compute Spectrum Realization"<<endl;223 cout<<endl<<"\n--- Initialisation de GeneFluct3D"<<endl; 224 224 225 225 pkz.SetZ(zref); 226 226 TArray< complex<r_8> > pkgen; 227 227 GeneFluct3D fluct3d(pkgen); 228 fluct3d.SetPrtLevel( 3);228 fluct3d.SetPrtLevel(2); 229 229 fluct3d.SetNThread(nthread); 230 230 fluct3d.SetSize(nx,ny,nz,dx,dy,dz); … … 256 256 cout<<"varpk_int(<"<<knyqmax_mod<<")="<<sr2int_kmax<<" -> sigma="<<sqrt(sr2int_kmax)<<endl; 257 257 258 PrtTim(">>>> End Initialisation de GeneFluct3D"); 259 258 260 cout<<"\n--- Computing a realization in Fourier space"<<endl; 259 261 if(computefourier0) fluct3d.ComputeFourier0(pkz); 260 262 else fluct3d.ComputeFourier(pkz); 263 PrtTim(">>>> End Computing a realization in Fourier space"); 261 264 262 265 if(1) { … … 269 272 tagobs = "hpkgen"; posobs.PutObject(hpkgen,tagobs); 270 273 } 274 PrtTim(">>>> End Checking realization spectra"); 271 275 } 272 276 … … 280 284 tagobs = "hpkgen2"; posobs.PutObject(hpkgen2,tagobs); 281 285 } 286 PrtTim(">>>> End Checking realization 2D spectra"); 282 287 } 283 288 … … 285 290 cout<<"\n--- Computing convolution by pixel shape"<<endl; 286 291 fluct3d.FilterByPixel(); 287 } 288 289 if(wfits) fluct3d.WriteFits("!cmvobserv3d_k0.fits"); 290 if(wppf) fluct3d.WritePPF("cmvobserv3d_k0.ppf",false); 292 PrtTim(">>>> End Computing convolution by pixel shape"); 293 } 294 295 if(wfits) { 296 fluct3d.WriteFits("!cmvobserv3d_k0.fits"); 297 PrtTim(">>>> End WriteFits"); 298 } 299 if(wppf) { 300 fluct3d.WritePPF("cmvobserv3d_k0.ppf",false); 301 PrtTim(">>>> End WritePPF"); 302 } 291 303 292 304 if(1) { … … 299 311 tagobs = "hpkgenf"; posobs.PutObject(hpkgenf,tagobs); 300 312 } 313 PrtTim(">>>> End Checking realization spectra"); 301 314 } 302 315 … … 310 323 tagobs = "hpkgenf2"; posobs.PutObject(hpkgenf2,tagobs); 311 324 } 325 PrtTim(">>>> End Checking realization 2D spectra"); 312 326 } 313 327 … … 316 330 double rmin,rmax; rgen.MinMax(rmin,rmax); 317 331 cout<<"rgen.Min = "<<rmin<<" , Max="<<rmax<<endl; 318 319 if(wfits) fluct3d.WriteFits("!cmvobserv3d_r0.fits"); 320 if(wppf) fluct3d.WritePPF("cmvobserv3d_r0.ppf",true); 332 PrtTim(">>>> End Computing a realization in real space"); 333 334 if(wfits) { 335 fluct3d.WriteFits("!cmvobserv3d_r0.fits"); 336 PrtTim(">>>> End WriteFits"); 337 } 338 if(wppf) { 339 fluct3d.WritePPF("cmvobserv3d_r0.ppf",true); 340 PrtTim(">>>> End WritePPF"); 341 } 321 342 322 343 int_8 nm; … … 328 349 cout<<"rgen:("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 329 350 <<rs2<<" -> "<<sqrt(rs2)<<", n(<-1)="<<nlowone<<endl; 351 PrtTim(">>>> End Check mean and variance in real space"); 330 352 } 331 353 … … 335 357 int_8 nvarr = fluct3d.VarianceFrReal(R,varr); 336 358 cout<<"R="<<R<<" : sigmaR^2="<<varr<<" -> "<<sqrt(varr)<<", n="<<nvarr<<endl; 359 PrtTim(">>>> End Check variance sigmaR in real space"); 337 360 } 338 361 … … 343 366 cout<<"1+rgen: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 344 367 <<rs2<<" -> "<<sqrt(rs2)<<endl; 368 PrtTim(">>>> End Converting fluctuations into mass"); 345 369 346 370 cout<<"\n--- Converting mass into galaxy number"<<endl; … … 350 374 cout<<"galaxy: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 351 375 <<rs2<<" -> "<<sqrt(rs2)<<endl; 376 PrtTim(">>>> End Converting mass into galaxy number"); 352 377 353 378 cout<<"\n--- Set negative pixels to BAD"<<endl; … … 357 382 cout<<"galaxy: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 358 383 <<rs2<<" -> "<<sqrt(rs2)<<endl; 384 PrtTim(">>>> End Set negative pixels to BAD etc..."); 359 385 360 386 cout<<"\n--- Apply poisson on galaxy number"<<endl; … … 364 390 cout<<"galaxy: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 365 391 <<rs2<<" -> "<<sqrt(rs2)<<endl; 392 PrtTim(">>>> End Apply poisson on galaxy number"); 366 393 367 394 cout<<"\n--- Convert Galaxy number to HI mass"<<endl; … … 382 409 <<rs2<<" -> "<<sqrt(rs2)<<endl; 383 410 cout<<"Equivalent: "<<rm*nm/fluct3d.NPix()<<" Msol / pixels"<<endl; 411 PrtTim(">>>> End Convert Galaxy number to HI mass"); 384 412 385 413 cout<<"\n--- Set BAD pixels to Zero"<<endl; … … 389 417 cout<<"galaxy: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 390 418 <<rs2<<" -> "<<sqrt(rs2)<<endl; 391 392 if(wfits) fluct3d.WriteFits("!cmvobserv3d_r.fits"); 393 if(wppf) fluct3d.WritePPF("cmvobserv3d_r.ppf",true); 419 PrtTim(">>>> End Set BAD pixels to Zero etc..."); 420 421 if(wfits) { 422 fluct3d.WriteFits("!cmvobserv3d_r.fits"); 423 PrtTim(">>>> End WriteFits"); 424 } 425 if(wppf) { 426 fluct3d.WritePPF("cmvobserv3d_r.ppf",true); 427 PrtTim(">>>> End WritePPF"); 428 } 394 429 395 430 cout<<"\n--- Add noise to HI Flux snoise="<<snoise<<endl; … … 398 433 cout<<"HI mass with noise: ("<<nm<<") Mean = "<<rm<<", Sigma^2 = " 399 434 <<rs2<<" -> "<<sqrt(rs2)<<endl; 435 PrtTim(">>>> End Add noise"); 400 436 401 437 //----------------------------------------------------------------- … … 405 441 cout<<endl<<"\n--- ReComputing spectrum from real space"<<endl; 406 442 fluct3d.ReComputeFourier(); 407 } 408 409 if(wfits) fluct3d.WriteFits("!cmvobserv3d_k.fits"); 410 if(wppf) fluct3d.WritePPF("cmvobserv3d_k.ppf",false); 443 PrtTim(">>>> End ReComputing spectrum"); 444 } 445 446 if(wfits) { 447 fluct3d.WriteFits("!cmvobserv3d_k.fits"); 448 PrtTim(">>>> End WriteFits"); 449 } 450 if(wppf) { 451 fluct3d.WritePPF("cmvobserv3d_k.ppf",false); 452 PrtTim(">>>> End WritePPF"); 453 } 411 454 412 455 if(1) { … … 417 460 fluct3d.ComputeSpectrum(hpkrec); 418 461 tagobs = "hpkrec"; posobs.PutObject(hpkrec,tagobs); 462 PrtTim(">>>> End Computing final spectrum"); 419 463 } 420 464 … … 428 472 tagobs = "hpkrec2"; posobs.PutObject(hpkrec2,tagobs); 429 473 } 430 } 431 474 PrtTim(">>>> End Computing final 2D spectrum"); 475 } 476 477 PrtTim(">>>> End Of Job"); 432 478 return 0; 433 479 }
Note:
See TracChangeset
for help on using the changeset viewer.