# # do_grid.pro # # Usage: call do_grid # # execute an nxm grid with offsets size1 (E-W) and size2 (N-S). Take a picture # at each position and return to the starting position when done. The grid # begins in the SW corner and procedes in successive rows, ending in the NE # corner. This script is patterned after the wfire tcl script do_grid. # # RDB. 15 Feb 99 # yorn 'Disable the Tip Tilt guider during offsets' if (yorn==1) usetip=1 else usetip=2 end_if ask 'Enter number of positions to take in E/W direction: ' ewnum ask 'Enter number of positions to take in N/S direction: ' nsnum ask 'What is the E/W separation between pictures in arcsec?' size1 ask 'What is the N/S separation between pictures in arcsec?' size2 call askpars totpics=ewnum*nsnum printf 'Positions: E/W = %i6' ewnum printf ' N/S = %i6' nsnum printf 'Separations = %f7.1 %f7.1 arcsec' size1 size2 printf 'Total Positions = %i6' totpics if (totpics>100) alert 'I hope you know what you are doing!' 2 1 end_if yorn 'Are the OBSERVE params OK and TELESCOPE centered' if (yorn~=1) printf 'Aborting sequence: reset parameters/center telescope' printf 'and try again' return end_if iew=((ewnum-1)/2.0)*(-size1) ins=((nsnum-1)/2.0)*(-size2) if (usetip==1) call ttd end_if offset ra=iew dec=ins twait=0 if (usetip==1) call tte end_if do i=1,nsnum do j=1,ewnum avego $coad if (j