pafind

This OTW script reads the X,Y,Ra,Dec values collected by previously run scripts and derives the image position angle (PA). This is the angle measured in degrees counter-clockwise (CCW) from the +Y axes to the NORTH vector of the image.


% pafind.sh A.final 

arg1 = name of input [name,x,y,r,d] file (see *** below)  
A typical run on a real image:
 
% image_pa dss_bsc5-0747.fits 
 355.5000   85.5000   -4.5000

% cat image_pa.explain 
paN paE (f9.4)
paN = angle in degrees CCW from +Y of North direction
paE = angle in degrees CCW from +Y of East direction
dPA = small angle relative to +Y (+ is CCW, - is CW)

I usually generate a circular set of points on a fine angular grid to produce the input file (named A.final above) for pafind.sh. Here is the way I do this in the script name image_ps:

 
# create the (circular) set of X,Y values
xycirc.sh $Xwid $Ywid 360 1.0 >dat.xy

 Compute the Ra,Dec values (in degrees)
xy2sky -d $fitsin @dat.xy > dat.RaDec

# Get the file for psfind.sh then run it
xy2sky_float_2_psfind.py dat.RaDec > A.final
In the example above, Xwid and Ywid are the image size in pixels units (read from the image header with "ccdsize"). I generate (in this example) 360 points on the circle with a spacing of 1 degree. I use the wcstools routine "xy2sky" to compute Ra,Dec values in units of degrees (the "-d" flag establisheds the degree format). The "xy2sky_float_2_psfind.py" python code makes a file that can be read here by pafind.f.




Back to SCO CODES page