cd 20120610
!echo "-12.8" > zshift.tbl
!echo "-10.3">> zshift.tbl
!echo " -7.8">> zshift.tbl
!echo " -5.3">> zshift.tbl
!echo " -2.8">> zshift.tbl
!echo " -0.3">> zshift.tbl
!echo "  2.2">> zshift.tbl
!echo "  4.7">> zshift.tbl
!echo "  7.2">> zshift.tbl
!echo "  9.7">> zshift.tbl
!ls 2012*-?.fits | cut -c-14 | uniq | sed -e 's/^/ls /g' | sed -e 's/$/-?.fits \> tmp0 \&\& paste -d\" \" tmp0 zshift.tbl \>/g' > tmp1
!ls 2012*-?.fits | cut -c-14 | uniq | sed -e 's/$/.tbl/g' > tmp2
!paste -d" " tmp1 tmp2 > tmp3
!csh tmp3

!echo "681 502"  > rayfit.dat
!echo "639 519" >> rayfit.dat
!echo "646 514" >> rayfit.dat
!echo "656 511" >> rayfit.dat
!echo "706 493" >> rayfit.dat
!echo "713 491" >> rayfit.dat

!ls 2012*-?.fits | cut -c-14 | uniq | sed -e 's/^/..\/rayfit /g' | sed -e 's/$/.tbl \>/g' > tmp1
!ls 2012*-?.fits | cut -c-14 | uniq | sed -e 's/$/.dat/g' > tmp2
!paste -d" " tmp1 tmp2 > tmp3
!csh tmp3

!ls 2012??????????.dat | sed -e 's/^/sed -e '\''s\/spot\//g' | sed -e 's/.dat/\/g'\'' ..\/spot.sm \> tmp.sm \&\& sm \< tmp.sm/g' > tmp1
!csh tmp1

!ls 2012??????????.ps | sed -e 's/^/..\/pstogif -density 150 /g' > tmp1
!csh tmp1

!convert -delay 100 -loop 0 2012??????????.gif ../20120610spot.gif
!rm 2012*-???.fits

!ls 2012??????????.dat > 20120610dat.tbl
imdel ../20120610.fits
!../splin2_grd 20120610dat.tbl ../20120610.fits > 20120610.dat
!sed -e 's/spot/20120610/g' ../spot.sm | sed -e 's/\#\#//g' > tmp.sm && sm < tmp.sm
!../pstogif -density 150 20120610.ps
!mv 20120610.gif ../20120610spav.gif

cd ..
!tar cvf 20120610dat.tar 20120610/2012*.dat
!rm 20120610.gif
export 20120610.fits 20120610.gif gif outban='setcmap(zscale(i1,-1,1),"heat")'
