The full RUN script
#!/bin/bash
#
# Usage: RUN 5 70 115 175
# Arguments are the 4 PA values for ellradius
#
if [ -z "$1" ]
then
printf "RUN 5 70 115 175\n"
printf "Arguments are the 4 PA values for ellradius \n"
exit
fi
# Make radius images to test ellipse conventions
# idim jdim xo yo a b/a pa
ellradius.sh 400 400 100 100 50 0.3 $1
mv rad.fits in.fits
thresh.sh -0.001 1 1
mv out.fits pa_75.fits
# idim jdim xo yo a b/a pa
ellradius.sh 400 400 300 100 50 0.3 $2
mv rad.fits in.fits
thresh.sh -0.001 1 1
mv out.fits pa_85.fits
# idim jdim xo yo a b/a pa
ellradius.sh 400 400 300 300 50 0.3 $3
mv rad.fits in.fits
thresh.sh -0.001 1 1
mv out.fits pa_115.fits
# idim jdim xo yo a b/a pa
ellradius.sh 400 400 100 300 50 0.3 $4
mv rad.fits in.fits
thresh.sh -0.001 1 1
mv out.fits pa_175.fits
#
# Now build one image for testing
ls -1 pa_*fits >stacker.in
STACKER
mv o.fits PA_test.fits
# Clean up some
\rm in.fits junc pa*fits runner stacker*
#
# PA_test.fits "on" pixels have values of I=0.25 (not)
# Since the STACKER routine takes an AVERAGE
#
cp PA_test.fits in.fits
thresh.sh 0.2 1 1.0
mv out.fits bitmap.fits
#
# Make the mask image
cp bitmap.fits in.fits
ccl4.sh 1
mv pass2.fits mask.fits
#
# Run the momcat routine to measure labeled targets
momcat.sh PA_test.fits mask.fits 0.0
#
\rm -f a A bitmap.fits fitsr2048.header_copy header.info in.fits junc pars.in
\rm -f pass1.equiv pass1.fits runner Unique_label.set
#
printf "\n\nThe ellipse results (from just_ellipse.list): \n"
cat just_ellipse.list
#
# Make reg file
printf "physical\n" > legend.reg
printf "# text(100,22) color=white font=\"helvetica 16 normal roman\" text={pa=$1}\n" >> legend.reg
printf "# text(293,22) color=white font=\"helvetica 16 normal roman\" text={pa=$2}\n" >> legend.reg
printf "# text(308,369) color=white font=\"helvetica 16 normal roman\" text={pa=$3}\n" >> legend.reg
printf "# text(100,369) color=white font=\"helvetica 16 normal roman\" text={pa=$4}\n" >> legend.reg
Back to ELLIPSES page