aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-22 10:26:01 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-22 10:26:01 +0800
commit6c495bbcfaeb793969f082d953d55d3a9ef91aaf (patch)
tree936e6133440973af0ed36c5ff7c75e82a9811e25
parent361e52204d2bc67b69e1e2a6823da0e95d5a530a (diff)
downloadchandra-acis-analysis-6c495bbcfaeb793969f082d953d55d3a9ef91aaf.tar.bz2
Update to use 'cosmo_calc.py'
-rwxr-xr-xbin/calc_coolfunc_bands.sh2
-rwxr-xr-xbin/fit_mass.sh2
-rwxr-xr-xbin/fit_sbp.sh2
-rwxr-xr-xscripts/collect_infodata.sh5
4 files changed, 5 insertions, 6 deletions
diff --git a/bin/calc_coolfunc_bands.sh b/bin/calc_coolfunc_bands.sh
index bebdce2..d400a9b 100755
--- a/bin/calc_coolfunc_bands.sh
+++ b/bin/calc_coolfunc_bands.sh
@@ -27,7 +27,7 @@ N_H=$3
REDSHIFT=$4
COOLFUNC_PREFIX=$5
BLIST=$6
-NORM=`cosmo_calc ${REDSHIFT} | grep 'norm.*cooling_function' | awk -F':' '{ print $2 }'`
+NORM=`cosmo_calc.py -b --norm-apec ${REDSHIFT}`
if [ ! -r "${TPROFILE}" ]; then
printf "ERROR: given tprofile '${TPROFILE}' NOT accessiable\n"
diff --git a/bin/fit_mass.sh b/bin/fit_mass.sh
index e4e0614..078d65d 100755
--- a/bin/fit_mass.sh
+++ b/bin/fit_mass.sh
@@ -71,7 +71,7 @@ sbp_data=`grep '^sbp_data' ${sbp_cfg} | awk '{ print $2 }'`
tprofile=`grep '^tprofile' ${sbp_cfg} | awk '{ print $2 }'`
cfunc_profile=`grep '^cfunc_profile' ${sbp_cfg} | awk '{ print $2 }'`
z=`grep '^z' ${sbp_cfg} | awk '{ print $2 }'`
-cm_per_pixel=`cosmo_calc.py -b --cm-per-pixel ${z}`
+cm_per_pixel=`cosmo_calc.py -b --cm-per-pix ${z}`
sed -i'' "s/^cm_per_pixel.*$/cm_per_pixel ${cm_per_pixel}/" ${sbp_cfg}
cfunc_table="coolfunc_table_photon.txt"
diff --git a/bin/fit_sbp.sh b/bin/fit_sbp.sh
index 679caf6..074ba33 100755
--- a/bin/fit_sbp.sh
+++ b/bin/fit_sbp.sh
@@ -36,7 +36,7 @@ tprofile_data=`grep '^tprofile_data' ${mass_cfg} | awk '{ print $2 }'`
tprofile_cfg=`grep '^tprofile_cfg' ${mass_cfg} | awk '{ print $2 }'`
z=`grep '^z' ${sbp_cfg} | awk '{ print $2 }'`
-cm_per_pixel=`cosmo_calc.py -b --cm-per-pixel ${z}`
+cm_per_pixel=`cosmo_calc.py -b --cm-per-pix ${z}`
sed -i'' "s/^cm_per_pixel.*$/cm_per_pixel ${cm_per_pixel}/" ${sbp_cfg}
cfunc_profile=`grep '^cfunc_profile' ${sbp_cfg} | awk '{ print $2 }'`
tprofile=`grep '^tprofile' ${sbp_cfg} | awk '{ print $2 }'`
diff --git a/scripts/collect_infodata.sh b/scripts/collect_infodata.sh
index 5d1e753..bdda7f7 100755
--- a/scripts/collect_infodata.sh
+++ b/scripts/collect_infodata.sh
@@ -235,8 +235,7 @@ ABUND=`\grep '^abund' ${CFG_FILE} | awk '{ print $2 }'`
TPROFILE_DATA=`\grep '^tprofile_data' ${CFG_FILE} | awk '{ print $2 }'`
NFW_RMIN_KPC=`\grep '^nfw_rmin_kpc' ${CFG_FILE} | awk '{ print $2 }'`
Z=`\grep '^z' ${SBP_CFG} | awk '{ print $2 }'`
-E_Z=`cosmo_calc ${Z} | \grep -i 'Hubble_parameter' | awk '{ print $3 }'`
-KPC_PER_PIXEL=`cosmo_calc ${Z} | \grep 'kpc/pixel' | awk '{ print $3 }'`
+KPC_PER_PIXEL=`cosmo_calc -b --kpc-per-pix ${Z}`
SBP_DATA=`\grep '^sbp_data' ${SBP_CFG} | awk '{ print $2 }'`
RMAX_SBP_PIX=`tail -n 1 ${SBP_DATA} | awk '{ print $1+$2 }'`
RMAX_SBP_KPC=`echo "${RMAX_SBP_PIX} ${KPC_PER_PIXEL}" | awk '{ printf("%.2f", $1*$2) }'`
@@ -480,7 +479,7 @@ cat > ${JSON_FILE} << _EOF_
"XCNTRD_DEC": "${OBJ_XCDEC}",
"nH (10^22 cm^-2)": ${N_H},
"redshift": ${REDSHIFT},
- "E(z)": ${E_Z},
+ "E(z)": null,
"T_ref (keV)": null,
"Z_ref (solar)": ${ABUND},
"Rmax_SBP (pixel)": ${RMAX_SBP_PIX},