-
Notifications
You must be signed in to change notification settings - Fork 0
/
merge_asol.sh
executable file
·40 lines (35 loc) · 831 Bytes
/
merge_asol.sh
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
36
37
38
39
#!/bin/bash
# merge multiple asol files
# otherwise coords a wrong in reprocessed evt2 when
# first and second asol have different header keywords
#------------------------------------------------------------
if [ $# -lt 2 ]
then
echo "useage: $0 <obsid> <directory>"
exit 1
fi
if [ $# -eq 3 ]
then
logfile=$3
else
logfile="$2/reprocess_level1.log"
fi
tmpfile="merge_asol.tmp"
tmpoutfile="pcad_merge_asol1.fits"
cdir=`pwd`
cd $2
obsid=$1
if [ -f $tmpfile ]
then
rm $tmpfile
fi
ls pcadf*.fits > $tmpfile
punlearn dmmerge
pset dmmerge infile=@$tmpfile
pset dmmerge outfile=$tmpoutfile
plist dmmerge >> $logfile
#dmmerge mode=h clobber+ verbose=2 >> $logfile
dmmerge mode=h clobber+ >> $logfile
rm pcadf*asol1.fits
rm $tmpfile
mv $tmpoutfile pcadf111111111N001_asol1.fits