Changeset 3363 in Sophya for trunk/Cosmo/SimLSS/cmvobserv3d.cc


Ignore:
Timestamp:
Oct 23, 2007, 4:59:17 PM (18 years ago)
Author:
cmv
Message:

add possibility to just multiply dRho.Rho , cmv 23/10/2007

File:
1 edited

Legend:

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

    r3358 r3363  
    2828     <<"      (default: no, spectrum Pk(z=z_median) for all cube)"<<endl
    2929     <<" -F : filter spectrum by pixel shape (0=no 1=yes(default)"<<endl
    30      <<" -U : do not poisson fluctuate with Ngal, convert directly to HI mass"<<endl
     30     <<" -U typ : do not poisson fluctuate with Ngal, convert directly to HI mass"<<endl
     31     <<"          (typ<0 just multiply dRho/Rho by mass_by_pixel)"<<endl
    3132     <<" -x nx,dx : size along x axis (npix,Mpc)"<<endl
    3233     <<" -y ny,dy : size along y axis (npix,Mpc)"<<endl
     
    100101 string schmassdistfile = "";
    101102 bool no_poisson = false;
     103 int no_poisson_type = 1;
    102104
    103105 double scalemass = -1.;
     
    133135
    134136 char c;
    135  while((c = getopt(narg,arg,"ha0PWSV2UG:F:x:y:z:s:Z:M:A:T:N:Q:R:8:")) != -1) {
     137 while((c = getopt(narg,arg,"ha0PWSV2U:G:F:x:y:z:s:Z:M:A:T:N:Q:R:8:")) != -1) {
    136138  int nth = 0;
    137139  switch (c) {
     
    147149  case 'U' :
    148150    no_poisson = true;
     151    sscanf(optarg,"%d",&no_poisson_type);
    149152    break;
    150153  case 'F' :
     
    230233     <<"), schmax="<<schmax<<" ("<<lschmax<<") Msol"
    231234     <<", schnpt="<<schnpt<<endl;
    232  if(no_poisson) cout<<"No poisson fluctuation, direct conversion to HI mass"<<endl;
     235 if(no_poisson) cout<<"No poisson fluctuation, direct conversion to HI mass, typ="
     236                    <<no_poisson_type<<endl;
    233237 cout<<"snoise="<<snoise<<" equivalent Msol, evolution="<<noise_evol<<endl;
    234238 cout<<"scalemass="<<scalemass<<endl;
     
    291295 cout<<"Spectrum normalisation = "<<pkz.GetScale()<<endl;
    292296
     297 {
     298 Histo hpkz0(lkmin,lkmax,npt); hpkz0.ReCenterBin();
     299 FuncToHisto(pkz,hpkz0,true);
     300 tagobs = "hpkz0"; posobs.PutObject(hpkz0,tagobs);
     301 }
     302
    293303 pkz.SetZ(zref);
    294304
     305 {
    295306 Histo hpkz(lkmin,lkmax,npt); hpkz.ReCenterBin();
    296307 FuncToHisto(pkz,hpkz,true);
    297  {
    298308 tagobs = "hpkz"; posobs.PutObject(hpkz,tagobs);
    299309 }
     
    542552   cout<<"\n--- Converting !!!DIRECTLY!!! mass into HI mass: mass per pixel ="
    543553       <<mass_by_pixel<<endl;
    544    rm = fluct3d.TurnFluct2MeanNumber(mass_by_mpc3); // ici on doit donner Msol/Mpc^3
     554   if(no_poisson_type<0) {
     555     cout<<"!!!WARNING!!! dRho/Rho is just multiplied by "<<mass_by_pixel<<endl;
     556     fluct3d.ScaleOffset(mass_by_pixel);
     557   } else {
     558     rm = fluct3d.TurnFluct2MeanNumber(mass_by_mpc3); // ici on doit donner Msol/Mpc^3
     559   }
    545560 } else {
    546561   cout<<"\n--- Converting mass into galaxy number: gal per pixel ="
Note: See TracChangeset for help on using the changeset viewer.