# # oalign.pro OSMOS mask align script # # Usage: # call oalign.pro SLITNUM FILT1 FILT2 TARGNAME # where # SLITNUM slit number with the desired mask # FILT1 desired filter1 position for acq image # FILT2 desired filter2 position for acq image # TARGNAME name of the target # # Paul Martini # 15 May 2011 # # Recommended procedure is to update the telescope pointing and # acquire a guide star before starting this script # # Initialize some variables, do some setup # parameter SLITNUM FILT1 FILT2 string=TARGNAME set I=2 set SOPEN=6 set DOPEN=6 set F1OPEN=6 set F2OPEN=6 set ETIME=15. #call init4x1k.pro printf 'This script assumes that open wheel positions are' printf ' slit: %i1' SOPEN printf ' disp: %i1' DOPEN printf ' filter1: %i1' F1OPEN printf ' filter2: %i1' F2OPEN printf 'And will take %f4.0 second exposures' ETIME printf 'Is this correct?' wait 'Press RETURN to continue or Ctrl-C and then RETURN to abort' bell # # Take a slit image # slit $SLITNUM disp $DOPEN filter1 $F1OPEN filter2 $F2OPEN string MASKNAME '{TARGNAME} Mask Image' printf 'About to take the mask image' ETIME object '{MASKNAME}' exp %ETIME go # # Take the first direct image # slit $SOPEN filter1 $FILT1 filter2 $FILT2 string ACQNAME '{TARGNAME} Acq Image' printf 'About to take the first acquisition image' object '{ACQNAME}' exp %ETIME go # printf 'Now use oalign.py in another terminal to calculate the rotation' printf 'and translation offsets from the alignment stars. ' wait 'Press RETURN when ready to continue (or Ctrl-C to abort)' bell # # ITERATE: printf 'About to take acquisition image %I2' I go printf 'Now use oalign.py to calculate the rotation and translation offsets' wait 'and press RETURN when ready to continue [Ctrl-C to abort]' yorn 'Perform another iteration without the mask in the beam?' if (yorn) set I=(I+1) goto ITERATE else printf 'Completed iterations without the mask in the beam' end_if # # Take a final image through the mask # yorn 'Take a final image through the mask?' if (yorn) filter1 $F1OPEN filter2 $F2OPEN slit $SLITNUM go printf 'oalign.pro is complete and the mask is in the beam' else printf 'oalign.pro is complete and the mask is NOT in the beam' end_if #call init4k printf '*** oalign.pro finished ***' end