aboutsummaryrefslogtreecommitdiffstats
path: root/HOWTO_chandra_acis_process.txt
diff options
context:
space:
mode:
authorWeitian LI <liweitianux@gmail.com>2014-06-18 22:20:59 +0800
committerWeitian LI <liweitianux@gmail.com>2014-06-18 22:20:59 +0800
commite3923265d0d6949407a83726e9a9bd5d97079221 (patch)
tree9afd8520595f4cf80815b9bccfc3dcf2879ebe47 /HOWTO_chandra_acis_process.txt
downloadchandra-acis-analysis-e3923265d0d6949407a83726e9a9bd5d97079221.tar.bz2
Initial commit
Added files: * mass_profile: developed by Junhua GU, modified by Weitian LI * opt_utilities: developed by Junhua GU * tools/cosmo_calc: originated from 'calc_distance', modified * scripts: scripts used to process Chandra ACIS data * files: useful files used in processing * HOWTO_chandra_acis_process.txt * README.md
Diffstat (limited to 'HOWTO_chandra_acis_process.txt')
-rw-r--r--HOWTO_chandra_acis_process.txt150
1 files changed, 150 insertions, 0 deletions
diff --git a/HOWTO_chandra_acis_process.txt b/HOWTO_chandra_acis_process.txt
new file mode 100644
index 0000000..95a9f0a
--- /dev/null
+++ b/HOWTO_chandra_acis_process.txt
@@ -0,0 +1,150 @@
+###########################################################
+## HOWTO
+## Processing Chandra ACIS data
+##
+## Weitian LI <liweitianux@gmail.com>
+## Last updated: 2014/06/18
+###########################################################
+
+### Settings: {{{
+## directory:
+# chandra scripts:
+CHANDRA_SCRIPT_DIR="${HOME}/bin/chandra/scripts"
+# mass program dir:
+MASS_PROFILE_DIR="${HOME}/bin/chandra/mass_profile"
+
+## aliases:
+# ciao scripts
+alias chcld="${CIAO_SCRIPT_DIR}/chandra_collect_data_v3.sh"
+alias chr500="${CIAO_SCRIPT_DIR}/ciao_r500avgt_v3.sh"
+# mass_profile related
+alias fitmass="${MASS_PROFILE_DIR}/fit_mass.sh"
+alias fitnfw="${MASS_PROFILE_DIR}/fit_nfw_mass mass_int.dat"
+alias fitsbp="${MASS_PROFILE_DIR}/fit_sbp.sh"
+alias fitwang="${MASS_PROFILE_DIR}/fit_wang2012_model tcl_temp_profile.txt"
+alias calclxfx="${MASS_PROFILE_DIR}/calc_lxfx_simple.sh"
+alias getlxfx="${MASS_PROFILE_DIR}/get_lxfx_data.sh"
+### Settings: }}}
+
+### Websites: {{{
+NED: http://ned.ipac.caltech.edu/forms/byname.html
+Chandra Chaser: http://cda.harvard.edu/chaser/dispatchOcat.do
+SIMBAD: http://simbad.u-strasbg.fr/simbad/
+nH tool: https://heasarc.gsfc.nasa.gov/cgi-bin/Tools/w3nh/w3nh.pl
+### }}}
+
+### Process step-guide: {{{
+ (1) $ chandra_repro indir=. outdir=repro verbose=2
+ (2) $ cd repro; mkdir -p evt bkg img spc/profile mass;
+ (3) $ cd evt; ln -s ../acis*evt2.fits .;
+ (4) $ ciao_procevt2.sh
+ (5) $ cd ../bkg; ln -s ../evt/evt2*_clean.fits .;
+ (6) $ ciao_blanksky_v4.sh
+ (7) ds9 open 'evt2*_clean.fits'; select edge region as the
+ *local background*, save as 'lbkg.reg';
+ and estimate the phonton counts:
+ (8) $ dmlist "evt2_clean.fits[sky=region(lbkg.reg)][energy=400:8000]" blocks
+ (9) $ ciao_bkg_spectra_v4.sh reg="lbkg.reg" basedir=.. nh=<nh> z=<z>
+(10) $ xspec
+(11) xspec> @xspec_lbkg_model.xcm
+ xspec> fit
+ xspec> cpd /xs
+ xspec> pl l del
+ xspec> @~/astro/scripts/xspec_bkgcorr_v2.tcl
+(12) cd ../img; ln -s ../evt/evt2*_clean.fits .;
+(13) ds9 open 'evt2*_clean.fits', select the center of cluster,
+ save the region as 'center.reg'
+(14) $ ciao_genregs_v1.sh reg_in=center.reg
+(15) $ cd ../spc/profile;
+ $ ln -s ../../evt/evt2*_clean.fits .;
+ $ ln -s ../../bkg/bkgcorr_blanksky_lbkg.pi .; (maybe 'lbkg.pi')
+ $ ln -s ../../img/rspec.reg img_rspec.reg;
+(16) ds9 open 'evt2*_clean.fits' with regs 'img_rspec.reg';
+ adjust the regions and save as 'rspec.reg'
+(17) create conf file '<NAME>_spec.conf' like:
+ basedir ../..
+ reg rspec.reg
+ bkgd bkgcorr_blanksky_lbkg.pi | lbkg.pi
+ nh <nh>
+ z <redshift>
+(18) $ ciao_deproj_spectra_v8.sh reg="rspec.reg" bkgd=<bkgd> basedir="../.." nh=<nh> z=<z>
+(19) $ xspec
+ xspec> @xspec_deproj.xcm
+ xspec> fit
+ xspec> @~/astro/scripts/xspec_coolfunc_v2.tcl
+ (input 1)
+ xspec> exit
+(20) fix 'NULL' values in 'tcl_temp_profile.qdp' & 'tcl_temp_profile.txt'
+(21) $ xspec
+ xspec> newpar <..>=<..> (bind all kT's and Abundanc's)
+ xspec> fit (get avarage Temp and Abund)
+ xspec> exit
+(22) $ cd ../../img;
+ create '<NAME>_expcorr.conf' with contents:
+ basedir ..
+ reg sbprofile.reg
+ nh <nh>
+ z <redshift>
+ temp <avg_temp>
+ abund <avg_abund>
+(23) $ ciao_expcorr_sbp_v4.sh basedir=.. nh=<nh> z=<redshift> temp=<avg_temp> abund=<avg_abund>
+## --------------------------------------------------------
+
+(24) $ cd ../mass; clean_massdir.sh;
+(25) check needed linked files:
+ sbprofile.txt, flux_sbp.txt, radius_sbp.txt, tcl_temp_profile.txt
+(26) check needed config files:
+ wang2012_param.txt,
+ fitting_mass.conf, fitting_sbp.conf,
+ fitting_dbeta_mass.conf, fitting_dbeta_sbp.conf,
+ global.cfg
+(27) $ fitwang wang2012_param.txt
+(28) $ qdp fit_result.qdp # check fitted temperature profile
+(29) $ fitsbp fitting_mass.conf # single-beta sbp
+ $ fitsbp fitting_dbeta_mass.conf # double-beta sbp
+(30) $ qdp sbp_fit.qdp # check fitted sbp
+(31) $ ln -s fitting_mass.conf global.cfg # use single-beta
+ $ ln -s fitting_dbeta_mass.conf global.cfg # use double-beta
+(32) $ fitnfw <z> [rmin_kpc]
+(33) $ qdp nfw_fit_result.qdp # check fitted nfw profile, and ajust 'rmin_kpc'
+(34) add 'nfw_rmin_kpc' to 'global.cfg'
+(35) $ fitmass global.cfg c # calculate the center values
+(36) $ fitmass global.cfg 2>&1 | tee global_<date>.log # calculate mass data
+(37) $ chandra_collect_data_v3.sh
+(38) $ cd ../img;
+ $ chandra_update_xcentroid.sh
+(39) $ cd ../spc/profile;
+(40) $ chr500 inner=0.1 outer=0.5 # check 0.5R500 range
+ $ chr500 inner=0.2 outer=0.5
+(41) $ xspec
+ xspec> @xspec_r500avgt_0.1-0.5.xcm
+ xspec> fit; fit;
+ xspec> cpd /xs; pl l del;
+ xspec> error 1. 2 3 # calc errors (68%) of kT and Abundanc
+(42) update the data of 'T(0.1-0.5 R500)', 'Z(0.1-0.5 R500)' ...
+
+## --------------------------------------------------------
+(43) $ cd ../..; # in 'repro' dir
+ $ cp -a mass lxfx; cd lxfx;
+(44) $ calclxfx global.cfg c 500 200 # 'c' for center values
+ $ calclxfx global.cfg 500 200 # calc 'errors'
+(45) $ getlxfx . c 500 200 # for center results
+ $ getlxfx . 500 200 # for all results (with errors)
+
+## --------------------------------------------------------
+(46) $ cd ..; cd spc/profile;
+ calculate cooling time and Csb value:
+ $ ciao_calc_ct_csb.sh
+ check the region whether exceeds ccd edge, and answer y/n
+ check results in file 'ct_csb_results.txt'
+ ---
+ Alternatively:
+ $ ciao_calc_ct.sh
+ $ ciao_calc_csb.sh
+ check the region whether exceeds ccd edge, and answer y/n
+ check results in file 'cooling_results.txt' and 'csb_results.txt'
+ ---
+### process }}}
+
+
+# vim: set ts=8 sw=4 tw=0 fenc=utf-8 ft=txt: #