Changeset 3802 in Sophya for trunk/Cosmo/SimLSS/pkspectrum.cc
- Timestamp:
- Jul 22, 2010, 2:49:20 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Cosmo/SimLSS/pkspectrum.cc
r3768 r3802 295 295 /////////////////////////////////////////////////////////// 296 296 297 TransfertTabulate::TransfertTabulate(double h100,double OmegaCDM0,double OmegaBaryon0) 298 : Oc_(OmegaCDM0) , Ob_(OmegaBaryon0) , h100_(h100) , kmin_(1.) , kmax_(-1.) 299 , interptyp_(0) 297 TransfertTabulate::TransfertTabulate(void) 298 : kmin_(1.) , kmax_(-1.) , interptyp_(0) 300 299 { 301 300 } 302 301 303 302 TransfertTabulate::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_) 306 304 { 307 305 } … … 323 321 } 324 322 325 int TransfertTabulate::ReadCMBFast(string filename )323 int TransfertTabulate::ReadCMBFast(string filename,double h100,double OmegaCDM0,double OmegaBaryon0) 326 324 { 327 325 FILE *file = fopen(filename.c_str(),"r"); 328 326 if(file==NULL) return -1; 327 cout<<"TransfertTabulate::ReadCMBFast: fn="<<filename<<" h100="<<h100 328 <<" OmegaCDM0="<<OmegaCDM0<<" OmegaBaryon0="<<OmegaBaryon0<<endl; 329 329 330 330 const int lenline = 512; … … 336 336 double k,tc,tb,tf; 337 337 sscanf(line,"%lf %lf %lf",&k,&tc,&tb); 338 k *= h100 _; // convert h^-1 Mpc -> Mpc339 tf = (O c_*tc+Ob_*tb)/(Oc_+Ob_);338 k *= h100; // convert h Mpc^-1 -> Mpc^-1 339 tf = (OmegaCDM0*tc+OmegaBaryon0*tb)/(OmegaCDM0+OmegaBaryon0); 340 340 if(tf>tmax) tmax = tf; 341 341 k_.push_back(k);
Note:
See TracChangeset
for help on using the changeset viewer.