Changeset 3908 in Sophya for trunk/Cosmo/SimLSS/cmvginit3d.cc


Ignore:
Timestamp:
Nov 15, 2010, 4:11:32 PM (15 years ago)
Author:
cmv
Message:

Kaiser spectrum modif for redshift distortions cmvginit3d.cc interface, cmv 15/11/2010

File:
1 edited

Legend:

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

    r3828 r3908  
    3333     <<"       else : no evol, spectrum Pk(z=z_median) for all cube (def)"<<endl
    3434     <<" -F : filter spectrum by pixel shape (0=no 1=yes(default)"<<endl
     35     <<" -K : modify spectrum with Kaiser redshift distortion (default=no)"<<endl
    3536     <<" -x nx,dx : size along x axis (npix,Mpc)"<<endl
    3637     <<" -y ny,dy : size along y axis (npix,Mpc)"<<endl
     
    9293 unsigned short nthread=0;
    9394 int filter_by_pixel = 1;
     95 bool kaiser_modify = false;
    9496
    9597 // *** What to do
     
    120122 // --- Decodage des arguments
    121123 char c;
    122  while((c = getopt(narg,arg,"haG:F:x:y:z:Z:128:v:n:CO:So:VT:f:")) != -1) {
     124 while((c = getopt(narg,arg,"haG:F:Kx:y:z:Z:128:v:n:CO:So:VT:f:")) != -1) {
    123125  int nth = 0;
    124126  switch (c) {
     
    131133  case 'F' :
    132134    filter_by_pixel = atoi(optarg);
     135    break;
     136  case 'K' :
     137    kaiser_modify =  true;
    133138    break;
    134139  case 'x' :
     
    199204 cout<<"kmin="<<kmin<<" ("<<log10(kmin)<<"), kmax="<<kmax<<" ("<<log10(kmax)<<") Mpc^-1"<<", npt="<<npt<<endl;
    200205 cout<<"Filter by pixel = "<<filter_by_pixel<<endl;
     206 if(kaiser_modify) cout<<"Modify spectrum with Kaiser redshift distorted formula"<<endl;
    201207 if(comptransveloc) cout<<"Tansverse velocity generation requested"<<endl;
    202208 if(cambfread.size()>0) cout<<"use CAMB file: cambfread="<<cambfread<<endl;
     
    397403
    398404 //-----------------------------------------------------------------
     405 bool spec_is_modified = false;
    399406 if(filter_by_pixel!=0) {
    400407   cout<<"\n--- Computing convolution by pixel shape"<<endl;
    401408   fluct3d.FilterByPixel();
    402    fluct3d.NTupleCheck(posobs,string("ntpkgenf"),ntnent);
     409   spec_is_modified = true;
    403410   PrtTim(">>>> End Computing convolution by pixel shape");
    404411 }
    405412
     413 //-----------------------------------------------------------------
     414 if(kaiser_modify) {
     415   cout<<"\n--- Modify spectrum coeff with Kaiser redshift distorted formula"<<endl;
     416   fluct3d.ToRedshiftSpace();
     417   spec_is_modified = true;
     418   PrtTim(">>>> End Computing Modify spectrum coeff with Kaiser");
     419 }
     420
     421 //-----------------------------------------------------------------
     422 if(spec_is_modified) fluct3d.NTupleCheck(posobs,string("ntpkgenf"),ntnent);
    406423 if(compdspec&1) {
    407424   HistoErr hpkgenf(hpkgen);
    408    if(filter_by_pixel!=0) {
     425   if(spec_is_modified) {
    409426     cout<<"\n--- Checking realization spectra"<<endl;
    410427     hpkgenf.Zero(); hpkgenf.Show();
     
    416433 if(compdspec&2) {
    417434   Histo2DErr hpkgenf2(hpkgen2);
    418    if(filter_by_pixel!=0) {
     435   if(spec_is_modified) {
    419436     cout<<"\n--- Checking realization 2D spectra"<<endl;
    420437     hpkgenf2.Zero(); hpkgenf2.Show();
Note: See TracChangeset for help on using the changeset viewer.