From ffd178e0bd72562a3c2cff9747b6e656edc881dc Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Fri, 27 May 2016 22:47:24 +0800 Subject: Add mass_profile tools * These tools are mainly use to calculate the total gravitational mass profile, as well as the intermediate products (e.g., surface brightness profile fitting, gas density profile, NFW fitting, etc.) * There are additional tools for calculating the luminosity and flux. * These tools mainly developed by Junhua GU, and contributed by Weitian (Aaron) LI, and Zhenghao ZHU. --- mass_profile/dump_fit_qdp.cpp | 55 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 mass_profile/dump_fit_qdp.cpp (limited to 'mass_profile/dump_fit_qdp.cpp') diff --git a/mass_profile/dump_fit_qdp.cpp b/mass_profile/dump_fit_qdp.cpp new file mode 100644 index 0000000..556edea --- /dev/null +++ b/mass_profile/dump_fit_qdp.cpp @@ -0,0 +1,55 @@ +#include "dump_fit_qdp.hpp" + +namespace opt_utilities +{ + const static double kpc=3.086E21; + void dump_sbp_beta(std::ostream& os,fitter,double,std::string>& f,double cm_per_pixel,const std::vector& r,const std::vector& y,const std::vector& ye) + { + os<<"read serr 1 2"< p=f.get_all_params(); + for(int i=1;i,std::vector,std::vector,double,std::string>& f,double cm_per_pixel,const std::vector& r,const std::vector& sbps,const std::vector& sbpe) + { + os<<"read serr 1 2"< p=f.get_all_params(); + std::vector mv=f.eval_model_raw(r,p); + for(int i=1;i