more get_rproj stuff

From: Ben Maughan (bjm@star.sr.bham.ac.uk)
Date: Fri Feb 02 2001 - 04:22:56 EST


Hello all,
 To follow up the mail I sent yesterday, here are a couple of lines (if
anyone is interested) that can be added to the get_rproj script so it
outputs a table of radius coordinates and counts per pixel with errors,
which can be put straight into Chips (or any other plotter) to get a
radial profile.

After the line
printf " ------ ------ ---- --- -------- -------
-------\n"
(line 109) add the lines...

if test -f radprof.dat #test if radprof.dat exists, and remove it if so.
then
 rm radprof.dat
fi

and after the line
    neterr=`echo "sqrt($errsq)" | bc -l`
(about line 150 after the previous lines are added) add...

    region="`cat $srcreg`"
    rad="`echo $region | awk -F, '{print (($3+$4)/2.0)}'`" #calculate radius
    # as midway between the inner and outer radii of the annulus.
    echo "$rad $net $neterr" >> radprof.dat #append file radprof.dat

This will then create a file radprof.dat and write 3 columns to it,
containing the midpoint radius of each annuli, the counts per pixel, and
the error in counts per pixel.

The command
curve radprof.dat x 1 y 2 yerr 3
in Chips will plot a radial profile.

Note that each time the script is used it will overwrite any file called
radprof.dat, so rename any that you want to keep!

Ben Maughan



This archive was generated by hypermail 2b29 : Thu Dec 13 2012 - 01:00:04 EST