-
Notifications
You must be signed in to change notification settings - Fork 7
/
do_psfconvolve_tests
executable file
·66 lines (52 loc) · 1.61 KB
/
do_psfconvolve_tests
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
65
66
# !bin/sh
FAILED_TEXT=" ** Test failed. **"
echo ""
echo "Running tests for psfconvolve ..."
# simple tests
./psfconvolve tests/gaussian_5x5.fits tests/deltafn_5x5.fits convolve_out_new1.fits --printimages &> test_dump1
./psfconvolve tests/deltafn_5x5.fits tests/gaussian_5x5.fits convolve_out_new2.fits --printimages &> test_dump2
# more complex test using HST image
./psfconvolve tests/n5419f555w_pc_derot_cutout.fits tests/n5419_sin100_psf_pc2scale.fits convolve_out_hst.fits &> test_dump3
echo ""
echo -n "*** Diff comparison with archives: first convolution... "
if (diff --brief test_dump1 tests/psfconvolve_out1.txt)
then
echo " OK"
else
echo "Diff output:"
diff test_dump1 tests/psfconvolve_out1.txt
fi
echo -n "*** cmp comparison of output FITS file... "
if (cmp convolve_out_new1.fits tests/convolve_out_gauss5-c-deltafn.fits -i 724)
then
echo " OK"
fi
echo -n "*** Diff comparison with archives: second convolution... "
if (diff --brief test_dump2 tests/psfconvolve_out2.txt)
then
echo " OK"
else
echo "Diff output:"
diff test_dump2 tests/psfconvolve_out2.txt
fi
echo -n "*** cmp comparison of output FITS file... "
if (cmp convolve_out_new2.fits tests/convolve_out_deltafn-c-gauss5.fits -i 724)
then
echo " OK"
fi
echo -n "*** Diff comparison with archives: HST-image convolution... "
if (diff --brief test_dump3 tests/psfconvolve_out3.txt)
then
echo " OK"
else
echo "Diff output:"
diff test_dump3 tests/psfconvolve_out3.txt
fi
echo -n "*** cmp comparison of output FITS file... "
if (cmp convolve_out_hst.fits tests/convolve_out_n5419.fits -i 724)
then
echo " OK"
fi
echo ""
echo "Done."
echo ""