aboutsummaryrefslogtreecommitdiffstats
path: root/mass_profile
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-17 00:14:45 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-17 01:16:47 +0800
commitbdc9269dcd4c5a086def4ce904528b96a475af9f (patch)
tree9002d99d28465e1fc06e14a85334aa56a1e1e4db /mass_profile
parenta2c996d79c2bc3e854c991676680a64bd6e3195f (diff)
downloadchandra-acis-analysis-bdc9269dcd4c5a086def4ce904528b96a475af9f.tar.bz2
Update description & usage; change variable name to be more clear
Diffstat (limited to 'mass_profile')
-rw-r--r--mass_profile/calc_lx_beta.cpp23
-rw-r--r--mass_profile/calc_lx_dbeta.cpp24
2 files changed, 24 insertions, 23 deletions
diff --git a/mass_profile/calc_lx_beta.cpp b/mass_profile/calc_lx_beta.cpp
index dcbf1ad..11d7b04 100644
--- a/mass_profile/calc_lx_beta.cpp
+++ b/mass_profile/calc_lx_beta.cpp
@@ -1,9 +1,10 @@
-/*
- Perform a double-beta density model fitting to the surface brightness data
- Author: Junhua Gu
- Last modified: 2011.01.01
- This code is distributed with no warrant
-*/
+/**
+ * Calculate the total luminosity and flux within the specified radius.
+ *
+ * Base on 'fit_beta_sbp.cpp' and supersede 'calc_lx.cpp'
+ *
+ * Author: Junhua Gu
+ */
#include <iostream>
#include <fstream>
@@ -71,7 +72,7 @@ int main(int argc,char* argv[])
{
if(argc<4)
{
- cerr<<argv[0]<<" <configure file> <rout in kpc> <bolo erg cfunc file>"<<endl;
+ cerr<<argv[0]<<" <sbp.conf> <rout_kpc> <cfunc_erg> [cfunc2_erg ...]"<<endl;
return -1;
}
//initialize the parameters list
@@ -460,7 +461,7 @@ int main(int argc,char* argv[])
for(int n=3;n<argc;++n)
{
- spline_func_obj cf_bolo_erg;
+ spline_func_obj cf_erg;
for(ifstream ifs(argv[n]);;)
{
assert(ifs.is_open());
@@ -472,12 +473,12 @@ int main(int argc,char* argv[])
}
//cerr<<x<<"\t"<<y<<endl;
- cf_bolo_erg.add_point(x,y);//change with source
+ cf_erg.add_point(x,y);//change with source
}
- cf_bolo_erg.gen_spline();
+ cf_erg.gen_spline();
projector<double>& pj=dynamic_cast<projector<double>&>(f.get_model());
- pj.attach_cfunc(cf_bolo_erg);
+ pj.attach_cfunc(cf_erg);
diff --git a/mass_profile/calc_lx_dbeta.cpp b/mass_profile/calc_lx_dbeta.cpp
index c2f6a10..31addeb 100644
--- a/mass_profile/calc_lx_dbeta.cpp
+++ b/mass_profile/calc_lx_dbeta.cpp
@@ -1,10 +1,10 @@
-/*
- Perform a double-beta density model fitting to the surface brightness data
- Author: Junhua Gu
- Last modified: 2011.01.01
- This code is distributed with no warrant
-*/
-
+/**
+ * Calculate the total luminosity and flux within the specified radius.
+ *
+ * Base on 'fit_dbeta_sbp.cpp' and supersede 'calc_lx.cpp'
+ *
+ * Author: Junhua Gu
+ */
#include <iostream>
#include <fstream>
@@ -71,7 +71,7 @@ int main(int argc,char* argv[])
{
if(argc<4)
{
- cerr<<argv[0]<<" <configure file> <rout in kpc> <bolo erg cfunc file> "<<endl;
+ cerr<<argv[0]<<" <sbp.conf> <rout_kpc> <cfunc_erg> [cfunc2_erg ...]"<<endl;
return -1;
}
//initialize the parameters list
@@ -514,7 +514,7 @@ int main(int argc,char* argv[])
cout<<"dl="<<Dl/kpc<<endl;
for(int n=3;n<argc;++n)
{
- spline_func_obj cf_bolo_erg;
+ spline_func_obj cf_erg;
for(ifstream ifs(argv[n]);;)
{
assert(ifs.is_open());
@@ -526,12 +526,12 @@ int main(int argc,char* argv[])
}
//cerr<<x<<"\t"<<y<<endl;
- cf_bolo_erg.add_point(x,y);//change with source
+ cf_erg.add_point(x,y);//change with source
}
- cf_bolo_erg.gen_spline();
+ cf_erg.gen_spline();
projector<double>& pj=dynamic_cast<projector<double>&>(f.get_model());
- pj.attach_cfunc(cf_bolo_erg);
+ pj.attach_cfunc(cf_erg);
mv=f.eval_model_raw(radii,p);
double flux_erg=0;