Changeset 3283 in Sophya for trunk/Cosmo/SimLSS/cmvobserv3d.cc


Ignore:
Timestamp:
Jul 25, 2007, 2:41:39 PM (18 years ago)
Author:
cmv
Message:

scale du spectre final cmv 24/07/2007

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/SimLSS/cmvobserv3d.cc

    r3281 r3283  
    208208 GrowthFactor growth(om0,ol0);
    209209 // 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;
    210212
    211213 PkSpectrum0 pk0(pkini,tf);
     
    439441   double varr;
    440442   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;
    441446   PrtTim(">>>> End Check variance sigmaR in real space");
    442447 }
     
    511516 }
    512517
     518 double scalecube = -1., offsetcube=0.;
    513519 if(snoise>0.) {
    514520   cout<<"\n--- Add noise to HI Flux snoise="<<snoise<<", evolution="<<isnoise_evol<<endl;
    515521   fluct3d.AddNoise2Real(snoise,(isnoise_evol>0? true:false));
    516522     nm = fluct3d.MeanSigma2(rm,rs2);
     523     if(rs2>0. && sr2int>0.) scalecube = sqrt(sr2int)/sqrt(rs2);
     524     offsetcube = -rm;
    517525   PrtTim(">>>> End Add noise");
    518526 }
    519527
     528 if(scalecube>0.) {
     529   cout<<"\n--- Scale and offset scale="<<scalecube
     530       <<" off="<<offsetcube<<endl;
     531   fluct3d.ScaleOffset(scalecube,offsetcube);
     532 }
     533 
    520534 if(wfits) {
    521535   fluct3d.WriteFits("!cmvobserv3d_rf.fits");
Note: See TracChangeset for help on using the changeset viewer.