diff options
author | Aaron LI <aaronly.me@outlook.com> | 2017-02-12 18:54:59 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2017-02-12 18:54:59 +0800 |
commit | a4f1e4eaaae5ea3ce2531b72b04f2fc30f96e3a0 (patch) | |
tree | d00e1eae3e0aaaccf54545d636e3ec08f9f83143 | |
parent | 8e7a0d0de9bf1cb58ac610f1390bacfb8be4be93 (diff) | |
download | cexcess-a4f1e4eaaae5ea3ce2531b72b04f2fc30f96e3a0.tar.bz2 |
Remove update_r4_header.sh
-rwxr-xr-x | update_r4_header.sh | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/update_r4_header.sh b/update_r4_header.sh deleted file mode 100755 index 8840a15..0000000 --- a/update_r4_header.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh -# -# Add/Update the header keywords of our sample products corresponding to -# the "repro-4", by running the `r4_header_update' tool. -# These new keywords are required by new version (>= v4.6) tools such as -# `dmcoords', `mkacisrmf', `mkwarf', etc. -# -# Reference: -# [1] ahelp - r4_header_update -# http://cxc.harvard.edu/ciao/ahelp/r4_header_update.html -# -# Aaron LI -# Created: 2016-03-03 -# Updated: 2016-03-03 -# - - -if [ $# -lt 1 ]; then - echo "Usage:" - echo " `basename $0` <repro_dir_list>" - echo " `basename $0` <repro_dir1> ..." - exit 1 -fi - -# repro dir's -if [ -f "$1" ]; then - REPRO_LIST="$1" -elif [ -d "$1" ]; then - REPRO_LIST="_tmp_repro_$$.list" - [ -f "${REPRO_LIST}" ] && mv -f "${REPRO_LIST}" "${REPRO_LIST}_bak" - while [ ! -z "$1" ]; do - echo "$1" >> "${REPRO_LIST}" - shift - done -else - echo "ERROR: invalid arguments: $1" - exit 2 -fi - -INIT_DIR=`pwd -P` -cat "${REPRO_LIST}" | while read repro_dir; do - cd "${repro_dir}" - echo "********* `pwd` *********" - PBKFILE=`ls acisf*_pbk0.fits` - ASOLLIS=`ls acisf*_asol1.lis` - # fix asol.lis if necessary - if grep -q '/' "${ASOLLIS}"; then - sed -i'_bak' -e 's#^/.*/##' "${ASOLLIS}" - fi - for f in `find . -type f \( -iname 'acisf*_repro_evt2.fits' -o -iname 'evt2*.fits' -o -iname 'img*.fits' \)`; do - echo "* ${f}" - r4_header_update infile="${f}" pbkfile="${PBKFILE}" asolfile="@${ASOLLIS}" - done - cd "${INIT_DIR}" -done - |