Changeset 3802 in Sophya for trunk/Cosmo


Ignore:
Timestamp:
Jul 22, 2010, 2:49:20 PM (15 years ago)
Author:
cmv
Message:

minor cosmetics, cmv 22/07/2010

Location:
trunk/Cosmo/SimLSS
Files:
4 edited

Legend:

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

    r3800 r3802  
    368368n/plot hpkrec2.val%sqrt(x*x+y*y) ! ! "nsta crossmarker3 logx"
    369369
     370# les matrices 2D
     371set n 0
     372disp mx_$n
     373newwin
     374disp mxc_$n
     375
    370376defscript tom
    371377del m2
     
    376382endscript
    377383
    378 # les matrices 2D
    379 set n 0
    380 disp mx_$n
    381 newwin
    382 disp mxc_$n
     384###### Comparaison avec le spectre initial
     385cd /home
     386mkdir ok
     387mkdir gene
     388cd /home
     389
     390cd /ok
     391openppf cmvrvloscor.ppf
     392tom
     393cd /home
     394
     395cd /gene
     396openppf ginit3d_?_?p?_???.ppf
     397tom
     398cd /home
     399
     400h/oper / /ok/m2 /gene/m2 mdiff
     401disp mdiff
    383402 */
  • trunk/Cosmo/SimLSS/cmvtransf.cc

    r3572 r3802  
    6969 TransfertEisenstein tfnob(h100,Om0-Ob0,Ob0,tcmb,true);  // No baryons
    7070
    71  TransfertTabulate tfcmbfast(h100,Om0-Ob0,Ob0);
     71 TransfertTabulate tfcmbfast;
    7272 bool cmbfastOK = false;
    7373 if(fcmbfast.size()>0) {
    7474   cout<<endl<<"TransfertTabulate for CMBfast"<<endl;
    75    tfcmbfast.ReadCMBFast(fcmbfast);
     75   tfcmbfast.ReadCMBFast(fcmbfast,h100,Om0-Ob0,Ob0);
    7676   tfcmbfast.SetInterpTyp(1);
    7777   if(tfcmbfast.NPoints()>0) cmbfastOK = true;
  • trunk/Cosmo/SimLSS/pkspectrum.cc

    r3768 r3802  
    295295///////////////////////////////////////////////////////////
    296296
    297 TransfertTabulate::TransfertTabulate(double h100,double OmegaCDM0,double OmegaBaryon0)
    298 : Oc_(OmegaCDM0) , Ob_(OmegaBaryon0) , h100_(h100) , kmin_(1.) , kmax_(-1.)
    299 , interptyp_(0)
     297TransfertTabulate::TransfertTabulate(void)
     298: kmin_(1.) , kmax_(-1.) , interptyp_(0)
    300299{
    301300}
    302301
    303302TransfertTabulate::TransfertTabulate(TransfertTabulate& tf)
    304 : Oc_(tf.Oc_) , Ob_(tf.Ob_) , h100_(tf.h100_) , kmin_(tf.kmin_) , kmax_(tf.kmax_)
    305 , interptyp_(tf.interptyp_) , k_(tf.k_) , tf_(tf.tf_)
     303: kmin_(tf.kmin_) , kmax_(tf.kmax_) , interptyp_(tf.interptyp_) , k_(tf.k_) , tf_(tf.tf_)
    306304{
    307305}
     
    323321}
    324322
    325 int TransfertTabulate::ReadCMBFast(string filename)
     323int TransfertTabulate::ReadCMBFast(string filename,double h100,double OmegaCDM0,double OmegaBaryon0)
    326324{
    327325 FILE *file = fopen(filename.c_str(),"r");
    328326 if(file==NULL) return -1;
     327 cout<<"TransfertTabulate::ReadCMBFast: fn="<<filename<<" h100="<<h100
     328     <<" OmegaCDM0="<<OmegaCDM0<<" OmegaBaryon0="<<OmegaBaryon0<<endl;
    329329
    330330 const int lenline = 512;
     
    336336   double k,tc,tb,tf;
    337337   sscanf(line,"%lf %lf %lf",&k,&tc,&tb);
    338    k *= h100_;     // convert h^-1 Mpc  ->  Mpc
    339    tf = (Oc_*tc+Ob_*tb)/(Oc_+Ob_);
     338   k *= h100;     // convert h Mpc^-1  ->  Mpc^-1
     339   tf = (OmegaCDM0*tc+OmegaBaryon0*tb)/(OmegaCDM0+OmegaBaryon0);
    340340   if(tf>tmax) tmax = tf;
    341341   k_.push_back(k);
  • trunk/Cosmo/SimLSS/pkspectrum.h

    r3768 r3802  
    5555class TransfertTabulate : public GenericFunc {
    5656public:
    57   TransfertTabulate(double h100,double OmegaCDM0,double OmegaBaryon0);
     57  TransfertTabulate(void);
    5858  TransfertTabulate(TransfertTabulate& tf);
    5959  virtual ~TransfertTabulate(void);
     
    6161  int NPoints(void) {return k_.size();}
    6262  void SetInterpTyp(int typ=0);
    63   int ReadCMBFast(string filename);
     63  int ReadCMBFast(string filename,double h100,double OmegaCDM0,double OmegaBaryon0);
    6464protected:
    65   double Oc_,Ob_,h100_;
    6665  double kmin_,kmax_;
    6766  int interptyp_;
Note: See TracChangeset for help on using the changeset viewer.