summaryrefslogtreecommitdiffstats
path: root/clean_repro_zzh.sh
blob: 1478f9cd689f5be0d156d3d7bfa80948c51158a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
#
# Clean the 'repro' and its subdirectories for the sources
# drawn from zzh among the excess_sample.
#
#
# Aaron LI
# 2016-04-12
#

case "$1" in
    ""|-[hH]*)
        echo "Usage: `basename $0` <repro_dir1> ..."
        exit 1
esac

INIT_DIR=`pwd -P`
while [ ! -z "$1" ]; do
    repro_dir="$1"
    shift
    cd ${INIT_DIR}
    cd ${repro_dir}
    echo "*** Cleaning '${repro_dir}' ..."
    cd evt
    rm -fv *~ .?*~ _* *.log
    rm -fv evt2*_orig.fits evt2*_rmsrcs.fits
    rm -fv img_*.fits sbprofile.reg *fov*.fits
    mv -fv peak*.reg ../img/
    cd ../bkg
    rm -fv *~ .?*~ _* *.log
    cd ../img
    rm -fv *~ .?*~ _* *.log
    rm -fv rspec*bak *fov*.fits img_*.fits
done