Changeset 3947 in Sophya for trunk/Cosmo/RadioBeam/pknoise.cc
- Timestamp:
- Feb 14, 2011, 12:58:29 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/RadioBeam/pknoise.cc
r3931 r3947 44 44 << " -renmax MaxValue (default : Do NOT renormalize 2D response value \n" 45 45 << " -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" 47 48 << " -z redshift (default=0.7) \n" 48 49 << " -prt PrtLev,PrtModulo (default=0,10) " << endl; … … 74 75 bool fgrenorm=false; 75 76 double rmax=1.; 76 int NMAX = 1;77 int NMAX = 0; 77 78 double SCut=0.; 78 79 double z_Redshift=0.7 ; // 21 cm at z=0.7 -> 0.357 m … … 141 142 cout << "pknoise[1]: initializing Four2DRespTable from file" << resptblname << endl; 142 143 resptbl.readFromPPF(resptblname); 144 cout << "pknoise[1.b] Four2DRespTable.LambdaRef=" << resptbl.getLambdaRef() << " setLambda(" 145 << lambda << ")" << endl; 146 resptbl.setLambda(lambda); 143 147 arep_p=&resptbl; 144 148 if (fgrenorm) { 145 cout << " pknoise[1.b] call to resptbl.renormalize(" << rmax << ")";149 cout << "pknoise[1.c] call to resptbl.renormalize(" << rmax << ")"; 146 150 double omax=resptbl.renormalize(rmax); 147 151 cout << " ... Old Max=" << omax << endl; … … 159 163 160 164 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 } 166 186 rc = 0; 167 187 } // End of try bloc
Note:
See TracChangeset
for help on using the changeset viewer.