Exemplo n.º 1
0
void output_halo_correlation_function(double mass)
{
  int k,nr=50;
  double dlogr,r,xlin,xnl,rmin = 0.15,rmax = 40.0;
  FILE *fp;
  char aa[100];

  fprintf(stderr,"\n\nCALCULATING HALO CORRELATION FUNCTIONION (M=%.2e)\n",mass);
  fprintf(stderr,    "-------------------------------------------------\n\n");

  sprintf(aa,"%s.halo_xi",Task.root_filename);
  fp = fopen(aa,"w");

  rmin = pow(3*mass/(4*DELTA_HALO*PI*RHO_CRIT*OMEGA_M),THIRD);

  dlogr = (log(rmax) - log(rmin))/(nr-1);
  
  for(k=0;k<nr;++k)
    {
      r = exp(k*dlogr)*rmin;
      xlin =  bias_interp(mass,r); 
      xnl = xi_interp(r);
      fprintf(fp,"%e %e\n",r,xnl*xlin*xlin);
    }
  fclose(fp);
}
Exemplo n.º 2
0
double func_central_bias(double m)
{
  double n1,n2,m0;
  m=exp(m);
  n1=dndM_interp(m);
  n2=N_cen(m);
  return(n1*n2*m*bias_interp(m,-1));
}
Exemplo n.º 3
0
/* This is the integrand which qromo or qtrap would call
 * to calculate the large-scale galaxy bias.
 * The integral is a number-weighted average of the halo
 * bias function, integrated over the halo mass function.
 */
double func_galaxy_bias(double m)
{
  m=exp(m);
  return(dndM_interp(m)*N_avg(m)*bias_interp(m,-1.)*m);
}