Changeset 3283 in Sophya for trunk/Cosmo/SimLSS
- Timestamp:
- Jul 25, 2007, 2:41:39 PM (18 years ago)
- Location:
- trunk/Cosmo/SimLSS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/cmvobserv3d.cc
r3281 r3283 208 208 GrowthFactor growth(om0,ol0); 209 209 // GrowthFactor growth(1.,0.); // D(z) = 1/(1+z) 210 double growth_at_z = growth(zref); 211 cout<<"...Growth factor at z="<<zref<<" = "<<growth_at_z<<endl; 210 212 211 213 PkSpectrum0 pk0(pkini,tf); … … 439 441 double varr; 440 442 fluct3d.VarianceFrReal(R,varr); 443 cout<<"...Computed variance = "<<varr 444 <<" , Theorical variance at (z=0) = "<<pow(sigmaR,1.) 445 <<" , at (z="<<zref<<") = "<<pow(sigmaR*growth_at_z,1.)<<endl; 441 446 PrtTim(">>>> End Check variance sigmaR in real space"); 442 447 } … … 511 516 } 512 517 518 double scalecube = -1., offsetcube=0.; 513 519 if(snoise>0.) { 514 520 cout<<"\n--- Add noise to HI Flux snoise="<<snoise<<", evolution="<<isnoise_evol<<endl; 515 521 fluct3d.AddNoise2Real(snoise,(isnoise_evol>0? true:false)); 516 522 nm = fluct3d.MeanSigma2(rm,rs2); 523 if(rs2>0. && sr2int>0.) scalecube = sqrt(sr2int)/sqrt(rs2); 524 offsetcube = -rm; 517 525 PrtTim(">>>> End Add noise"); 518 526 } 519 527 528 if(scalecube>0.) { 529 cout<<"\n--- Scale and offset scale="<<scalecube 530 <<" off="<<offsetcube<<endl; 531 fluct3d.ScaleOffset(scalecube,offsetcube); 532 } 533 520 534 if(wfits) { 521 535 fluct3d.WriteFits("!cmvobserv3d_rf.fits"); -
trunk/Cosmo/SimLSS/genefluct3d.cc
r3281 r3283 450 450 // On ecrit 3 tranches du cube selon chaque axe 451 451 { 452 cout<<"--- GeneFluct3D::WriteSlicePPF: Writing Cube Slices "<<cfname<<endl;452 cout<<"--- GeneFluct3D::WriteSlicePPF: Writing Cube Slices "<<cfname<<endl; 453 453 try { 454 454 … … 996 996 <<" because out of range=]"<<vmin<<","<<vmax<<"["<<endl; 997 997 return nbad; 998 } 999 1000 void GeneFluct3D::ScaleOffset(double scalecube,double offsetcube) 1001 // Replace "V" by "scalecube * ( V + offsetcube )" 1002 { 1003 if(lp_>0) cout<<"--- ScaleCube "<<scalecube<<endl; 1004 1005 for(long i=0;i<Nx_;i++) for(long j=0;j<Ny_;j++) for(long l=0;l<Nz_;l++) { 1006 int_8 ip = IndexR(i,j,l); 1007 data_[ip] = scalecube * ( data_[ip] + offsetcube ); 1008 } 1009 1010 return; 998 1011 } 999 1012 -
trunk/Cosmo/SimLSS/genefluct3d.h
r3281 r3283 86 86 int_8 NumberOfBad(double vmin=-1.e+150,double vmax=1.e+150); 87 87 int_8 SetToVal(double vmin, double vmax,double val0=0.); 88 void ScaleOffset(double scalecube=1.,double offsetcube=0.); 88 89 89 90 void TurnFluct2Mass(void);
Note:
See TracChangeset
for help on using the changeset viewer.