#  This is the sample code to reproduce the bug in the radial profile
#  script using the wedge.

# Exit the script in the case of failure
set -e

# To avoid floating points like '23,45' instead of '23.45'.
export LANG=C


# Creat a model
echo "500 500 20" \
    | awk '{print 1,$1,$2,1,100,0.5,25,0.9,$3,5}' > cat.txt

astmkprof cat.txt --mergedsize=1000,1000 \
	  --zeropoint=25 --output=mock.fits
	   

# Compute radial profile of model with wedge
astscript-radial-profile mock.fits -h1 \
			 --mode=img --rmax=500 \
	    		 --center=500,500 \
	    		 --measure=mean,std --undersample=15 \
	    		 --positionangle=90 --axisratio=1 \
			 --azimuth=340,20 --keeptmp \
	    		 --output=radial-profile.cat
