#!/bin/csh -f #+ # bxy5 -- acquire images in 5-pos box pattern in DETECTOR coords # # Purpose: # Acquire a sequence of images using a 5-position box # pattern in which the offsets are made in DETECTOR # coordinates. The pattern employed is: # 2 3 # 1 # 5 4 # # Usage: # bxy5 x y # # Arguments: # x = half-width of the box in the "x" direction [arcsec] # y = half-width of the box in the "y" direction [arcsec] # # Output: # # # Restrictions: # # Exit values: # 0 = normal completion # 1 = wrong number of arguments # 2 = arguments are not valid numbers # # Example: # #- # Modification history: # Date unknown RWG Original version # 2000-Jul-11 GDW Added documentation # 2002-Jun-06 GDW Adapted for DEIMOS #----------------------------------------------------------------------- set buf = $0 set cmd = $buf:t set usage = "Usage: $cmd x y" # verify args... if ( $#argv != 2 ) then printf "$usage\n" exit 1 endif # grab arguments... set x = $1 set y = $2 # verify float-ation... is_float $x $y > /dev/null if ( $status ) then echo "ERROR -- x and y must be valid numbers" exit 2 endif # define the array of offsets... set xoff = ( 1 -2 0 2 -1) set yoff = (-1 0 2 0 -1) # save starting location... markbase onintr last @ i = 1 @ n = $#xoff while ( $i <= $n ) # take image... echo " Position $i of $n..." goi # offset telescope... set dx = `calc "$xoff[$i] * $x"` set dy = `calc "$yoff[$i] * $y"` mxy $dx $dy # increment... @ i++ end last: gotobase printf "Done." bells 3