aboutsummaryrefslogtreecommitdiffstats
path: root/mass_profile/calc_distance.cc
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-16 23:41:11 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-17 01:16:47 +0800
commit1b839fd299c77624bc9522995bc0241de63eee8f (patch)
tree55d4c17d9089e82bba5b46ec4001365f92364089 /mass_profile/calc_distance.cc
parent3da99b5716ecad5fb97c6f979e267ba10a6f6276 (diff)
downloadchandra-acis-analysis-1b839fd299c77624bc9522995bc0241de63eee8f.tar.bz2
Remove calc_distance (last used by the deleted 'calc_lx')
Diffstat (limited to 'mass_profile/calc_distance.cc')
-rw-r--r--mass_profile/calc_distance.cc61
1 files changed, 0 insertions, 61 deletions
diff --git a/mass_profile/calc_distance.cc b/mass_profile/calc_distance.cc
deleted file mode 100644
index 91f2ea3..0000000
--- a/mass_profile/calc_distance.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <iostream>
-#include <cmath>
-#include <cstdlib>
-#include <cstddef>
-#include <cassert>
-#include "adapt_trapezoid.h"
-
-//calc_distance
-//usage:
-//calc_distance z
-
-using namespace std;
-
-static double cm=1;
-static double s=1;
-static double km=1000*100;
-static double Mpc=3.08568e+24*cm;
-//static double kpc=3.08568e+21*cm;
-//static double yr=365.*24.*3600.;
-//static double Gyr=1e9*yr;
-static double H=71.*km/s/Mpc;
-static const double c=299792458.*100.*cm;
-//const double c=3e8*100*cm;
-static const double omega_m=0.27;
-static const double omega_l=0.73;
-static const double arcsec2arc_ratio=1./60/60/180*3.1415926;
-
-
-double E(double z)
-{
- double omega_k=1-omega_m-omega_l;
- return sqrt(omega_m*(1+z)*(1+z)*(1+z)+omega_k*(1+z)*(1+z)+omega_l);
-}
-
-double f_dist(double z)
-{
- return 1/E(z);
-}
-
-double f_age(double z)
-{
- return f_dist(1/z)/(z*z);
-}
-
-
-
-double calc_angular_distance(double z)
-{
- //return c/H*integer(f_dist,0,z)/(1+z);
- //return c/H*adapt_trapezoid(f_dist,0.,z,1e-4)/(1+z);
- return adapt_trapezoid(f_dist,0.,z,1e-4)/(1+z);
-}
-
-double calc_luminosity_distance(double z)
-{
- //return c/H*integer(f_dist,0,z)/(1+z);
- return c/H*adapt_trapezoid(f_dist,0.,z,1e-4)*(1+z);
-}
-
-
-//EOF