aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2017-02-06 11:50:57 +0800
committerAaron LI <aaronly.me@outlook.com>2017-02-06 11:53:40 +0800
commit904b0374e526d9475d09166a27e1e5c4e81fcf59 (patch)
tree3abf225b62508e3e3c392d0a57b0824d3bbca4bc /scripts
parent100c271015c52c5a7c8126f02f0b7e1a4ee483d8 (diff)
downloadchandra-acis-analysis-904b0374e526d9475d09166a27e1e5c4e81fcf59.tar.bz2
Generate skyfov if no previous one found
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/chandra_xcentroid.sh20
1 files changed, 15 insertions, 5 deletions
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
-