diff options
author | Aaron LI <aaronly.me@outlook.com> | 2017-02-17 00:04:02 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2017-02-17 01:16:47 +0800 |
commit | a2c996d79c2bc3e854c991676680a64bd6e3195f (patch) | |
tree | 235c8b70789cfdbbb47780b07953d12ceccbaa64 /mass_profile | |
parent | 3320db9729796eb5c06a6c907b4593fec401dd2f (diff) | |
download | chandra-acis-analysis-a2c996d79c2bc3e854c991676680a64bd6e3195f.tar.bz2 |
No longer calculate and use 'flux_cnt_ratio.txt'
This ratio file only was only used by 'calc_lx', which has already
been removed.
Diffstat (limited to 'mass_profile')
-rwxr-xr-x | mass_profile/calc_lxfx.sh | 1 | ||||
-rwxr-xr-x | mass_profile/coolfunc_calc.sh | 21 | ||||
-rwxr-xr-x | mass_profile/fit_mass.sh | 27 |
3 files changed, 16 insertions, 33 deletions
diff --git a/mass_profile/calc_lxfx.sh b/mass_profile/calc_lxfx.sh index e240bbe..c6632f9 100755 --- a/mass_profile/calc_lxfx.sh +++ b/mass_profile/calc_lxfx.sh @@ -88,7 +88,6 @@ ${base_path}/coolfunc_calc.sh ${tprofile} ${abund} \ ${nh} ${z} ${cfunc_profile} ${base_path}/coolfunc_calc_erg.sh ${tprofile} ${abund} \ ${nh} ${z} "cfunc_" ${BLIST} -mv -fv flux_cnt_ratio.txt flux_cnt_ratio_center.txt PROG="calc_lx_${MODEL}" LXF_RES="lx_${MODEL}_param.txt" diff --git a/mass_profile/coolfunc_calc.sh b/mass_profile/coolfunc_calc.sh index 5077b29..800585f 100755 --- a/mass_profile/coolfunc_calc.sh +++ b/mass_profile/coolfunc_calc.sh @@ -6,7 +6,10 @@ ## ## Weitian LI ## Created: 2012-08-17 -## Updated: 2016-06-08 +## +## Change logs: +## 2017-02-16, Weitian LI +## * Do not calculate and output 'flux_cnt_ratio.txt' ## ## cmdline arguments {{{ @@ -25,7 +28,6 @@ ABUNDANCE=$2 N_H=$3 REDSHIFT=$4 COOLFUNC_DAT=$5 -COOLFUNC_DAT_RATIO="flux_cnt_ratio.txt" NORM=`cosmo_calc ${REDSHIFT} | grep 'norm.*cooling_function' | awk -F':' '{ print $2 }'` if [ ! -r "${TPROFILE}" ]; then @@ -33,7 +35,6 @@ if [ ! -r "${TPROFILE}" ]; then exit 2 fi [ -e "${COOLFUNC_DAT}" ] && rm -f ${COOLFUNC_DAT} -[ -e "${COOLFUNC_DAT_RATIO}" ] && rm -f ${COOLFUNC_DAT_RATIO} ## arguments }}} ## specify variable name outside while loop @@ -73,18 +74,13 @@ model wabs*apec & \${nh} & 1.0 & \${abundance} & \${redshift} & \${norm} & /* ## set input and output filename & open files set tpro_fn "${TPROFILE}" set cf_fn "${COOLFUNC_DAT}" -set cff_fn "${COOLFUNC_DAT_RATIO}" if { [ file exists \${cf_fn} ] } { exec rm -fv \${cf_fn} } -if { [ file exists \${cff_fn} ] } { - exec rm -fv \${cff_fn} -} ## open files set tpro_fd [ open \${tpro_fn} r ] set cf_fd [ open \${cf_fn} w ] -set cff_fd [ open \${cff_fn} w ] _EOF_ @@ -113,15 +109,14 @@ while { [ gets \${tpro_fd} tpro_line ] != -1 } { scan \${xspec_tclout} "%f %f %f %f" _ _ _ cf_photon #puts "cf: \${cf_photon}" puts \${cf_fd} "\${radius} \${cf_photon}" - flux 0.01 100.0 - tclout flux 1 - scan \${xspec_tclout} "%f" cff_erg - puts \${cff_fd} "\${radius} [expr \${cff_erg}/\${cf_photon}]" _EOF_ if [ ! -z "${COOLFUNC_BOLO}" ]; then cat >> ${XSPEC_CF_XCM} << _EOF_ # coolfunc bolometric - puts \${cfbolo_fd} "\${radius} \${cff_erg}" + flux 0.01 100.0 + tclout flux 1 + scan \${xspec_tclout} "%f" cfbolo_erg + puts \${cfbolo_fd} "\${radius} \${cfbolo_erg}" _EOF_ fi cat >> ${XSPEC_CF_XCM} << _EOF_ diff --git a/mass_profile/fit_mass.sh b/mass_profile/fit_mass.sh index e29434a..37aefa8 100755 --- a/mass_profile/fit_mass.sh +++ b/mass_profile/fit_mass.sh @@ -113,7 +113,6 @@ $base_path/coolfunc_calc.sh ${tprofile_center} \ ${abund} ${nh} ${z} ${cfunc_profile} cfunc_bolo.dat cfunc_profile_center="coolfunc_profile_center.txt" cp -f ${cfunc_profile} ${cfunc_profile_center} -mv -fv flux_cnt_ratio.txt flux_cnt_ratio_center.txt PROG_SBPFIT="fit_${MODEL}_sbp" RES_SBPFIT="${MODEL}_param.txt" @@ -244,35 +243,25 @@ FG2500E=`grep '^gas_fraction2500' ${RES_TMP} | tail -n 1 | awk '{ print $2,$3 }' printf "\n+++++++++++++++ RESULTS (${MODEL_NAME}) +++++++++++++++\n" printf "model: ${MODEL_NAME}\n" | tee -a ${RES_FINAL} -printf "\n" | tee -a ${RES_FINAL} cat ${RES_SBPFIT_CENTER} | tee -a ${RES_FINAL} printf "\n" | tee -a ${RES_FINAL} printf "r200= ${R200E} kpc\n" | tee -a ${RES_FINAL} -printf "m200= ${M200E} M_sun\n" | tee -a ${RES_FINAL} -printf "gas_m200= ${MG200E} M_sun\n" | tee -a ${RES_FINAL} +printf "m200= ${M200E} Msun\n" | tee -a ${RES_FINAL} +printf "gas_m200= ${MG200E} Msun\n" | tee -a ${RES_FINAL} printf "gas_fraction200= ${FG200E} x100%%\n" | tee -a ${RES_FINAL} printf "r500= ${R500E} kpc\n" | tee -a ${RES_FINAL} -printf "m500= ${M500E} M_sun\n" | tee -a ${RES_FINAL} -printf "gas_m500= ${MG500E} M_sun\n" | tee -a ${RES_FINAL} +printf "m500= ${M500E} Msun\n" | tee -a ${RES_FINAL} +printf "gas_m500= ${MG500E} Msun\n" | tee -a ${RES_FINAL} printf "gas_fraction500= ${FG500E} x100%%\n" | tee -a ${RES_FINAL} printf "r1500= ${R1500E} kpc\n" | tee -a ${RES_FINAL} -printf "m1500= ${M1500E} M_sun\n" | tee -a ${RES_FINAL} -printf "gas_m1500= ${MG1500E} M_sun\n" | tee -a ${RES_FINAL} +printf "m1500= ${M1500E} Msun\n" | tee -a ${RES_FINAL} +printf "gas_m1500= ${MG1500E} Msun\n" | tee -a ${RES_FINAL} printf "gas_fraction1500= ${FG1500E} x100%%\n" | tee -a ${RES_FINAL} printf "r2500= ${R2500E} kpc\n" | tee -a ${RES_FINAL} -printf "m2500= ${M2500E} M_sun\n" | tee -a ${RES_FINAL} -printf "gas_m2500= ${MG2500E} M_sun\n" | tee -a ${RES_FINAL} +printf "m2500= ${M2500E} Msun\n" | tee -a ${RES_FINAL} +printf "gas_m2500= ${MG2500E} Msun\n" | tee -a ${RES_FINAL} printf "gas_fraction2500= ${FG2500E} x100%%\n" | tee -a ${RES_FINAL} printf "\n" | tee -a ${RES_FINAL} -printf "gas mass 200= ${MG200E} M_sun\n" | tee -a ${RES_FINAL} -printf "gas fractho 200= ${FG200E} x100%%\n" | tee -a ${RES_FINAL} -printf "gas mass 500= ${MG500E} M_sun\n" | tee -a ${RES_FINAL} -printf "gas fractho 500= ${FG500E} x100%%\n" | tee -a ${RES_FINAL} -printf "gas mass 1500= ${MG1500E} M_sun\n" | tee -a ${RES_FINAL} -printf "gas fractho 1500= ${FG1500E} x100%%\n" | tee -a ${RES_FINAL} -printf "gas mass 2500= ${MG2500E} M_sun\n" | tee -a ${RES_FINAL} -printf "gas fractho 2500= ${FG2500E} x100%%\n" | tee -a ${RES_FINAL} -printf "\n" | tee -a ${RES_FINAL} ${base_path}/fg_2500_500.py | tee -a ${RES_FINAL} ${base_path}/extract_tcool.py cooling_time.dat ${rcool} | tee -a ${RES_FINAL} printf "\n+++++++++++++++++++++++++++++++++++++++++++++++++++++\n" |