aboutsummaryrefslogtreecommitdiffstats
path: root/mass_profile
diff options
context:
space:
mode:
Diffstat (limited to 'mass_profile')
-rw-r--r--mass_profile/Makefile5
-rw-r--r--mass_profile/cooling_time.cpp62
2 files changed, 1 insertions, 66 deletions
diff --git a/mass_profile/Makefile b/mass_profile/Makefile
index 1d7f48b..bd8a70e 100644
--- a/mass_profile/Makefile
+++ b/mass_profile/Makefile
@@ -26,7 +26,7 @@ OPT_UTIL_INC ?= -I../opt_utilities
TARGETS= fit_nfw_sbp fit_dbeta_sbp fit_beta_sbp \
fit_direct_beta fit_wang2012_model \
fit_nfw_mass fit_mt_pl fit_lt_pl fit_mt_bpl \
- fit_lt_bpl cooling_time calc_lx_dbeta calc_lx_beta
+ fit_lt_bpl calc_lx_dbeta calc_lx_beta
HEADERS= projector.hpp spline.hpp vchisq.hpp
all: $(TARGETS)
@@ -69,9 +69,6 @@ fit_mt_bpl: fit_mt_bpl.cpp
fit_lt_bpl: fit_lt_bpl.cpp
$(CXX) $(CXXFLAGS) $< -o $@ $(OPT_UTIL_INC)
-cooling_time: cooling_time.cpp
- $(CXX) $(CXXFLAGS) -o $@ $<
-
fit_nfw_sbp.o: fit_nfw_sbp.cpp nfw_ne.hpp $(HEADERS)
$(CXX) $(CXXFLAGS) -c $< $(OPT_UTIL_INC)
diff --git a/mass_profile/cooling_time.cpp b/mass_profile/cooling_time.cpp
deleted file mode 100644
index eb8af2b..0000000
--- a/mass_profile/cooling_time.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-#include <iostream>
-#include <fstream>
-#include <cmath>
-#include "spline.hpp"
-
-
-using namespace std;
-const double kB=1.60217646E-9;//erg/keV
-const double pi=atan(1)*4;
-int main(int argc,char* argv[])
-{
- if(argc!=6)
- {
- cerr<<"Usage:"<<argv[0]<<" <rho_fit.dat> <T file> <bolo cooling function file> <dl> <cm_per_pixel>"<<endl;
- return -1;
- }
- double cm_per_pixel=atof(argv[5]);
- double dl=atof(argv[4]);
- spline<double> cf,t_profile;
- ifstream ifs(argv[2]);
- for(;;)
- {
- double x,T;
- ifs>>x>>T;
- if(!ifs.good())
- {
- break;
- }
- x=x*cm_per_pixel/3.08567758E21;//convert to kpc
- t_profile.push_point(x,T);
- }
- t_profile.gen_spline(0,0);
- ifs.close();
- ifs.open(argv[3]);
- for(;;)
- {
- double x,c;
- ifs>>x>>c;
- if(!ifs.good())
- {
- break;
- }
- x=x*cm_per_pixel/3.08567758E21;//convert to kpc
- cf.push_point(x,c);
- }
- cf.gen_spline(0,0);
-
- ifs.close();
- ifs.open(argv[1]);
- for(;;)
- {
- double r,ne;
- ifs>>r>>ne;
- if(!ifs.good())
- {
- break;
- }
- double nh=ne*1.2;
- double tcool=3./2.*(ne+nh)*kB*t_profile.get_value(r)/ne/nh/(cf.get_value(r)*4*pi*dl*dl);//s;
- cout<<r<<"\t"<<tcool/(24*3600*365*1E9)<<endl;
- }
-}