c2r

This OTW code takes the position (RA,DEC center in units of DEGREES) and the size of a field (radius in ARCMINUTES) and predicts the Ra,Dec boundary limits.


% c2r.sh 122.334554 32.54123 25.0  
 121.840293884  122.828819275   32.124561310   32.957897186
    RA_min         RA_max          DEC_min       DEC_max

Usage: c2r.sh 122.334554 32.54123 25.0 
arg1 - RA in DEGREE units 
arg2 - DEC in DEGREE units 
arg3 - search radius in ARCMIN units
Using c2r.sh in a script I typically redirect the output to a file (ptools.3) that I can then read to set variables within the bash script. For example:
 
c2r.sh $radeg $decdeg $Rmin >ptools.3
read rmin rmax dmin dmax < ptools.3
In the final example above, the shell variables read from ptools.3 (rmin,rmax,dmin,dmax) can be used by a variety of other scripts.




Back to SCO CODES page