Changeset 3948 in Sophya for trunk/Cosmo/RadioBeam/pknoise.cc
- Timestamp:
- Feb 16, 2011, 3:20:54 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/RadioBeam/pknoise.cc
r3947 r3948 43 43 << " -noise NoiseLevel (default=1.) \n" 44 44 << " -renmax MaxValue (default : Do NOT renormalize 2D response value \n" 45 << " -scut SCutValue (default=100.) \n"46 45 << " -ngen NGen (default=0) number of noise fourier amp generations \n" 47 46 << " NGen=0 -> Call ComputeNoisePk(), else generate Fourier Amplitudes (random) \n" 48 47 << " -z redshift (default=0.7) \n" 48 << " -scut SCutValue (default= -100.) \n" 49 << " if SCutValue<0. ==> SCut=MinNoisePower*(-SCutValue) \n" 49 50 << " -prt PrtLev,PrtModulo (default=0,10) " << endl; 50 51 return; … … 76 77 double rmax=1.; 77 78 int NMAX = 0; 78 double SCut=0.; 79 double SCut=-100.; 80 bool fgautoscut=true; 81 double FacSCut=-SCut; 79 82 double z_Redshift=0.7 ; // 21 cm at z=0.7 -> 0.357 m 80 83 int prtlev=0; … … 92 95 else if (strcmp(arg[ka],"-scut")==0) { 93 96 SCut=atof(arg[ka+1]); ka+=2; 97 if (SCut<0.) { FacSCut=-SCut; fgautoscut=true; } 94 98 } 95 99 else if (strcmp(arg[ka],"-ngen")==0) { … … 154 158 else cout << " pknoise[1]: Four2DResponse ( Diameter=" << DIAMETRE << " Lambda= " << lambda 155 159 << " DoL=" << DIAMETRE/lambda << " ) " << endl; 156 160 Histo2D h2drep = arep_p->GetResponse(); 161 double repmax= h2drep.VMax(); 162 if (fgautoscut) { 163 SCut = FacSCut/repmax; 164 cout << " pknoise[1.b]: Four2DResponse.RepMax=" << repmax << " --> SCut=" << FacSCut << "/repmax=" 165 << SCut << endl; 166 } 167 else cout << " pknoise[1.b]: Four2DResponse.RepMax=" << repmax << " , SCut=" << SCut << endl; 157 168 158 169 cout << " pknoise[2]: Instanciating object type Four3DPk " << endl; … … 167 178 pkn.SetPrtLevel(prtlev,prtmod); 168 179 HProf hpn = pkn.Compute(); 180 cout << " pknoise[3.b]: writing hpn noise profile to " << outfile << endl; 169 181 po << hpn; 170 182 } … … 173 185 DataTable dtnoise; 174 186 HProf hpn = m3d.ComputeNoisePk(*(arep_p),fracmodok,dtnoise,SCut); 175 po << hpn;176 string outfile2 = "x"+outfile;177 POutPersist po2(outfile2);178 187 HProf h1dnoise=arep_p->GetProjNoiseLevel(); 179 188 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; 189 cout << " pknoise[3.b]: writing dtnoise,hpn,h2rep... with tags to " << outfile << endl; 190 po << PPFNameTag("dtnoise") << dtnoise; 191 po << PPFNameTag("hpnoise") << hpn; 192 po << PPFNameTag("fracmodok") << fracmodok; 193 po << PPFNameTag("h1dnoise") << h1dnoise; 194 po << PPFNameTag("h1drep") << h1drep; 195 po << PPFNameTag("h2drep") << h2drep; 185 196 } 186 197 rc = 0;
Note:
See TracChangeset
for help on using the changeset viewer.