aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--HOWTO_chandra_acis_analysis.txt4
-rwxr-xr-xscripts/chandra_xcentroid.sh20
2 files changed, 18 insertions, 6 deletions
diff --git a/HOWTO_chandra_acis_analysis.txt b/HOWTO_chandra_acis_analysis.txt
index 71f50cd..6d6f64f 100644
--- a/HOWTO_chandra_acis_analysis.txt
+++ b/HOWTO_chandra_acis_analysis.txt
@@ -56,6 +56,7 @@ nH tool: https://heasarc.gsfc.nasa.gov/cgi-bin/Tools/w3nh/w3nh.pl
(12) $ cd ../img
$ ln -s ../evt/evt2*_clean.fits .
$ ln -s ../bkg/bkgcorr_blanksky_lbkg.pi . # maybe 'lbkg.pi'
+ $ ln -s ../pcadf*_asol1.fits .
(13) ds9 open 'evt2*_clean.fits', select the center of cluster,
save the region as 'center.reg'
(14) $ ciao_genregs.sh reg_in=center.reg bkgd=<bkgd>
@@ -84,7 +85,8 @@ nH tool: https://heasarc.gsfc.nasa.gov/cgi-bin/Tools/w3nh/w3nh.pl
(21) Determine the average temperature and abundance:
$ xspec
xspec> newpar <..>=<..> (bind all kT's and Abundanc's)
- xspec> fit (get avarage Temp and Abund)
+ xspec> fit
+ (get average temperature and abundance)
xspec> exit
(22) $ cd ../../img;
create '<NAME>_expcorr.conf' with contents:
diff --git a/scripts/chandra_xcentroid.sh b/scripts/chandra_xcentroid.sh
index 98d21b3..856a863 100755
--- a/scripts/chandra_xcentroid.sh
+++ b/scripts/chandra_xcentroid.sh
@@ -16,10 +16,12 @@
## 2012/11/08 ##
###########################################################
##
-VERSION="v3.1"
-UPDATED="2015-11-08"
+VERSION="v3.2"
+UPDATED="2017-02-06"
##
## ChangeLogs:
+## v3.2, 2017-02-06, Aaron LI
+## * Generate skyfov if no previous skyfov found
## v3.1, 2015-11-08, Aaron LI
## * Use previously generated skyfov instead to make a new one without asol
## v3.0, 2015/06/03, Aaron LI
@@ -203,7 +205,7 @@ fi
## parameters }}}
## prepare parameter files (pfiles) {{{
-CIAO_TOOLS="dmkeypar dmcopy dmstat dmcoords aconvolve"
+CIAO_TOOLS="dmkeypar dmcopy dmstat dmcoords aconvolve skyfov"
# Copy necessary pfiles for localized usage
for tool in ${CIAO_TOOLS}; do
@@ -216,8 +218,17 @@ export PFILES="./:${PFILES}"
## pfiles }}}
## main part {{{
-# Use previously generated `skyfov'
+# Try to use previously generated `skyfov'
SKYFOV=`\ls *skyfov*.fits 2>/dev/null | head -n 1`
+if [ -z "${SKYFOV}" ]; then
+ # Generate skyfov
+ SKYFOV="skyfov.fits"
+ punlearn skyfov
+ skyfov infile="${EVT}" outfile="${SKYFOV}" aspect="${ASOL}"
+ printf "Generated skyfov: ${SKYFOV}\n"
+else
+ printf "Use previously generated skyfov: ${SKYFOV}\n"
+fi
# generate image
IMG="img_c`echo ${CHIP} | tr ':' '-'`_e`echo ${E_RANGE} | tr ':' '-'`.fits"
@@ -319,4 +330,3 @@ printf "++++++++++++++++++++++++++++++++++++++++++++\n"
## main }}}
exit 0
-