xycirc

Generate a set of XY points that lie around a circle whose middle is located in the center of an image of size Xsize,Ysize pixels.

Usage: xycirc.sh 1992 1992 36 10.0 
arg1 - X size (pixels)
arg2 - Y size (pixels)
arg3 - number of points per side (10)
arg4 - angle step size in degrees (1.0)

%  xycirc.sh 1992 1992 5 10.0 
      996.0000        996.0000
      996.0000       1792.8000
     1134.3629       1780.6948
     1268.5217       1744.7471
     1394.4001       1686.0490
Note that sometimes it is useful to be able to generate these points and then view them on a ds9 rendering of an image. To this, I also have xycirc.sh generate a fixed-name output file that contains the X,Y values and a running-integer name. I can use the routine "text_file_ds9.py" to generate a region file:
 
%  xycirc.sh 1992 1992 5 10.0 >dat.xy  

The output file named "XY_for_text_file_ds9_py" is created. 

%  text_file_ds9.py XY_for_text_file_ds9_py red 9 > xycirc.reg  
Now I can use "xycirc.reg" to plot red circles (radius = 9 pixels) for every X,Y I have just generated.




Back to SCO CODES page