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


Ignore:
Timestamp:
Dec 10, 2010, 4:38:23 PM (15 years ago)
Author:
cmv
Message:

intro choix dabs calcul de beta pour les redshift-distorsions, cmv 10/12/2010

File:
1 edited

Legend:

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

    r3908 r3924  
    2727{
    2828 cout<<"cmvginit3d [...options...]"<<endl
    29      <<" -a : auto init random seed (needed for multiple simul)"<<endl
     29     <<"-- redshift"<<endl
     30     <<" -Z zref : redshift for the center of the simulation cube"<<endl
     31     <<"-- geometry"<<endl
     32     <<" -x nx,dx : size along x axis (npix,Mpc)"<<endl
     33     <<" -y ny,dy : size along y axis (npix,Mpc)"<<endl
     34     <<"            if ny or dy <=0 take same value as for x"<<endl
     35     <<" -z nz,dz : size along z axis (redshift axis, npix,Mpc)"<<endl
     36     <<"-- input spectra"<<endl
     37     <<" -8 sigmaR,R : normalisation du spectre de puissance, R en Mpc"<<endl
     38     <<"               (default sigmaR=1, R=8/h100 Mpc)"<<endl
     39     <<" -f cambspec.dat,h100tab,ztab : use CAMB file (def: Eisenstein spectrum)"<<endl
     40     <<" -F : filter spectrum by pixel shape (0=no 1=yes(default)"<<endl
     41     <<"-- redshift evolution"<<endl
    3042     <<" -G typevol: compute Pk(z=0) and apply growth factor in real space"<<endl
    3143     <<"       typevol=1 evolved with distance / observateur (def)"<<endl
    3244     <<"       typevol=2 evolved with distance to middle of Z planes"<<endl
    3345     <<"       else : no evol, spectrum Pk(z=z_median) for all cube (def)"<<endl
    34      <<" -F : filter spectrum by pixel shape (0=no 1=yes(default)"<<endl
     46     <<"-- redshift distorsions"<<endl
     47     <<" -B type,fixed_beta : redshift distorted P(k)_z = P(k)*(1+beta*mu^2)^2"<<endl
     48     <<"      type=0 : compute beta = -(1+z)*D'/D (default)"<<endl
     49     <<"      type>0 : compute beta = OmegaM(z)^fixed_beta"<<endl
     50     <<"      type<0 : use beta = fixed_beta"<<endl
    3551     <<" -K : modify spectrum with Kaiser redshift distortion (default=no)"<<endl
    36      <<" -x nx,dx : size along x axis (npix,Mpc)"<<endl
    37      <<" -y ny,dy : size along y axis (npix,Mpc)"<<endl
    38      <<"            if ny or dy <=0 take same value as for x"<<endl
    39      <<" -z nz,dz : size along z axis (redshift axis, npix,Mpc)"<<endl
    40      <<" -Z zref : redshift for the center of the simulation cube"<<endl
    41      <<" -f cambspec.dat,h100tab,ztab : use CAMB file (def: Eisenstein spectrum)"<<endl
     52     <<" -v temp_file.ppf: generate los velocity cube"<<endl
     53     <<"                   temporary save cube in temp_file.ppf"<<endl
     54     <<"-- program init and efficiency"<<endl
     55     <<" -a : auto init random seed (needed for multiple simul)"<<endl
     56     <<" -T nth : nombre de threads (si compil multi-thread, default: 0)"<<endl
     57     <<"-- check by re-computing Pk spectra, ntuple"<<endl
    4258     <<" -1 : compute 1D spectrum (default: no)"<<endl
    4359     <<" -2 : compute 2D spectrum (default: no)"<<endl
    4460     <<" -C : go back to cube in FT space and compute P(k) for check (def: do nothing)"<<endl
    45      <<" -8 sigmaR,R : normalisation du spectre de puissance, R en Mpc"<<endl
    46      <<"               (default sigmaR=1, R=8/h100 Mpc)"<<endl
    47      <<" -v temp_file.ppf: generate los velocity cube"<<endl
    48      <<"                   temporary save cube in temp_file.ppf"<<endl
    4961     <<" -n nent : fill control ntuple with nent entries (def: do not fill)"<<endl
     62     <<" -V : compute variance from real space (for check, default: no)"<<endl
     63     <<"-- output type selection"<<endl
     64     <<" -o out_base_name : base string for output file name (def: cmvginit3d)"<<endl
    5065     <<" -O a,b : tell what you want to write"<<endl
    5166     <<"      a : write generated fourier cube (_k0)"<<endl
     
    5368     <<"      a,b= 0 no write, 1 ppf write, 2 fits write, 3 ppf+fits write"<<endl
    5469     <<" -S : write cube slices in PPF format"<<endl
    55      <<" -o out_base_name : base string for output file name (def: cmvginit3d)"<<endl
    56      <<" -V : compute variance from real space (for check, default: no)"<<endl
    57      <<" -T nth : nombre de threads (si compil multi-thread, default: 0)"<<endl
    5870     <<endl;
    5971}
     
    93105 unsigned short nthread=0;
    94106 int filter_by_pixel = 1;
    95  bool kaiser_modify = false;
    96 
    97  // *** What to do
     107
     108 // *** traitement des distorsions de redshift
    98109 bool comptransveloc = false;
    99110 string temporay_file = "cmvginit3d_tmp.ppf";
     111 bool kaiser_modify = false;
     112 int type_beta = 0;
     113 double fixed_beta = 0.6;
     114
     115 // *** What to do
    100116 // compute: 1=1D spectra,  2=2D spectra,
    101117 //          4=recompute spectra after real space generation
     
    122138 // --- Decodage des arguments
    123139 char c;
    124  while((c = getopt(narg,arg,"haG:F:Kx:y:z:Z:128:v:n:CO:So:VT:f:")) != -1) {
     140 while((c = getopt(narg,arg,"haG:F:KB:x:y:z:Z:128:v:n:CO:So:VT:f:")) != -1) {
    125141  int nth = 0;
    126142  switch (c) {
     
    135151    break;
    136152  case 'K' :
    137     kaiser_modify =  true;
     153    kaiser_modify = true;
     154    break;
     155  case 'B' :
     156    sscanf(optarg,"%d,%lf",&type_beta,&fixed_beta);
    138157    break;
    139158  case 'x' :
     
    206225 if(kaiser_modify) cout<<"Modify spectrum with Kaiser redshift distorted formula"<<endl;
    207226 if(comptransveloc) cout<<"Tansverse velocity generation requested"<<endl;
     227 if(type_beta>0) cout<<"Beta: Pk factor is (1 + OmegaM^"<<fixed_beta<<" * mu^2)^2"<<endl;
     228   else if(type_beta<0) cout<<"Beta: Pk factor is (1 + "<<fixed_beta<<" * mu^2)^2"<<endl;
     229     else cout<<"Beta: automatically computed with dD/dEta"<<endl;
    208230 if(cambfread.size()>0) cout<<"use CAMB file: cambfread="<<cambfread<<endl;
    209231 cout<<"R="<<R<<" Rg="<<Rg<<" Mpc, sigmaR="<<sigmaR<<endl;
     
    414436 if(kaiser_modify) {
    415437   cout<<"\n--- Modify spectrum coeff with Kaiser redshift distorted formula"<<endl;
    416    fluct3d.ToRedshiftSpace();
     438   fluct3d.ToRedshiftSpace(type_beta,fixed_beta);
    417439   spec_is_modified = true;
    418440   PrtTim(">>>> End Computing Modify spectrum coeff with Kaiser");
     
    571593   //-----------------------------------------------------------------
    572594   cout<<"\n--- Modifying cube for Transverse velocity"<<endl;
    573    fluct3d.ToVelLoS();
     595   fluct3d.ToVelLoS(type_beta,fixed_beta);
    574596   fluct3d.NTupleCheck(posobs,string("ntpvgenf"),ntnent);
    575597   PrtTim(">>>> End Modifying cube for Transverse velocity");
     
    614636      cout<<"\n--- Apply Growth factor for transverse velocity"<<endl;
    615637      cout<<"...D(z=0)="<<growth(0.)<<"  D(z="<<zref<<")="<<growth(zref)<<endl;
    616       fluct3d.ApplyVelLosGrowthFactor(use_growth_factor);
     638      fluct3d.ApplyVelLosGrowthFactor(use_growth_factor,type_beta,fixed_beta);
    617639      fluct3d.MinMax(vdum1,vdum2);
    618640      fluct3d.MeanSigma2(vdum1,vdum2);
     
    637659    }
    638660
    639  }
     661 }  //// Fin de Transverse velocity space computation
    640662
    641663 //-----------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.