Changeset 3947 in Sophya for trunk/Cosmo/RadioBeam/pknoise.cc


Ignore:
Timestamp:
Feb 14, 2011, 12:58:29 AM (15 years ago)
Author:
ansari
Message:

Amelioration et modifs diverses lors de la redaction du papier, Reza 13/02/2011

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cosmo/RadioBeam/pknoise.cc

    r3931 r3947  
    4444       << "    -renmax MaxValue (default : Do NOT renormalize 2D response value \n"   
    4545       << "    -scut SCutValue (default=100.) \n"
    46        << "    -ngen NGen (default=1) number of noise fourier amp generations \n"
     46       << "    -ngen NGen (default=0) number of noise fourier amp generations \n"
     47       << "       NGen=0 -> Call ComputeNoisePk(), else generate Fourier Amplitudes (random) \n"
    4748       << "    -z redshift (default=0.7) \n"
    4849       << "    -prt PrtLev,PrtModulo (default=0,10) " << endl;
     
    7475  bool fgrenorm=false;
    7576  double rmax=1.;
    76   int NMAX = 1;
     77  int NMAX = 0;
    7778  double SCut=0.;
    7879  double z_Redshift=0.7 ;  // 21 cm at z=0.7 -> 0.357 m 
     
    141142      cout << "pknoise[1]: initializing Four2DRespTable from file" << resptblname << endl;
    142143      resptbl.readFromPPF(resptblname);
     144      cout << "pknoise[1.b] Four2DRespTable.LambdaRef=" << resptbl.getLambdaRef() << " setLambda("
     145           << lambda << ")" << endl;
     146      resptbl.setLambda(lambda);
    143147      arep_p=&resptbl;
    144148      if (fgrenorm) {
    145         cout << " pknoise[1.b] call to resptbl.renormalize(" << rmax << ")";
     149        cout << "pknoise[1.c] call to resptbl.renormalize(" << rmax << ")";
    146150        double omax=resptbl.renormalize(rmax);
    147151        cout << " ... Old Max=" << omax << endl;
     
    159163
    160164    cout << " pknoise[3]: Computing Noise P(k) using PkNoiseCalculator ..." << endl;
    161     PkNoiseCalculator pkn(m3d, *(arep_p), SCut, NMAX, tits.c_str());
    162     pkn.SetPrtLevel(prtlev,prtmod);
    163     HProf hpn = pkn.Compute();
    164     po << hpn;
    165  
     165    if (NMAX>0) {
     166      PkNoiseCalculator pkn(m3d, *(arep_p), SCut, NMAX, tits.c_str());
     167      pkn.SetPrtLevel(prtlev,prtmod);
     168      HProf hpn = pkn.Compute();
     169      po << hpn;
     170    }
     171    else {
     172      Histo fracmodok;
     173      DataTable dtnoise;
     174      HProf hpn = m3d.ComputeNoisePk(*(arep_p),fracmodok,dtnoise,SCut);
     175      po << hpn;
     176      string outfile2 = "x"+outfile;
     177      POutPersist po2(outfile2);
     178      HProf h1dnoise=arep_p->GetProjNoiseLevel();
     179      HProf h1drep=arep_p->GetProjResponse();
     180      po2 << PPFNameTag("dtnoise") << dtnoise;
     181      po2 << PPFNameTag("hpnoise") << hpn;
     182      po2 << PPFNameTag("fracmodok") << fracmodok;
     183      po2 << PPFNameTag("h1dnoise") << h1dnoise;
     184      po2 << PPFNameTag("h1drep") << h1drep;
     185    }
    166186    rc = 0;
    167187  }  // End of try bloc
Note: See TracChangeset for help on using the changeset viewer.