forked from telegraphic/leda_analysis_2016
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfits.sh
executable file
·65 lines (59 loc) · 1.45 KB
/
fits.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh
# Remove the fits/hkl files in the current directory and optionally
# in the h5 directory if you want to start over
doit() {
path_to_files="$1" # outrigger h5 files
for f in `ls -t $path_to_files/*.h5`
do
base=`echo $f | sed s/\.h5//`
for ant in 252A 254A 254B 255A 255B
do
if [ ! -r "${base}_${ant}.fits" ]
then
echo ">>> Doing $f $ant fits"
./plot_ds9.py $2 $3 --median --no_show --flag $f $ant
mv *.fits $path_to_files
else
echo ">>> $f $ant done"
fi
done
if [ ! -r "${base}.hkl" ]
then
echo ">>> Doing $f hickle"
./01_plot_waterfall.py $2 $3 --median --no_show --dump --flag $f
mv *.hkl $path_to_files
else
echo ">>> $f hkl done"
fi
done
}
rm /mnt/md0/total-power/2018/*.{fits,hkl}
doit /mnt/md0/total-power/2018 --new_cal
pushd /mnt/md0/total-power/2018
tar cf night.tar *.fits *.hkl
gzip night.tar
rm *.hkl *.fits
popd
rm *.fits *.hkl
doit /mnt/md0/total-power/2018 --new_cal --all_lsts
pushd /mnt/md0/total-power/2018
tar cf all_lsts.tar *.fits *.hkl
gzip all_lsts.tar
rm *.hkl *.fits
popd
rm *.fits *.hkl
rm /mnt/md0/total-power/*.{fits,hkl}
doit /mnt/md0/total-power
pushd /mnt/md0/total-power
tar cf night.tar *.fits *.hkl
gzip night.tar
rm *.hkl *.fits
popd
rm *.fits *.hkl
doit /mnt/md0/total-power --all_lsts
pushd /mnt/md0/total-power
tar cf all_lsts.tar *.fits *.hkl
gzip all_lsts.tar
rm *.hkl *.fits
popd
rm *.fits *.hkl