# # olsalign.pro OSMOS longslit acquisition script # # Usage: # call olsalign SLITNUM FILT1 FILT2 ETIME TARGNAME # where # SLITNUM slit number with the desired longslit # FILT1 desired filter1 position for acq image # FILT2 desired filter2 position for acq image # ETIME desired exposure time for acq image # TARGNAME name of the target # # Paul Martini # 15 May 2011 # oalign.pro # # rstoll 15 May 2011: modified for longslit acquisition # # 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 ETIME string=TARGNAME #set I=2 set I=1 set SOPEN=3 set DOPEN=6 set F1OPEN=6 set F2OPEN=6 #set ETIME=15. 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 'It assumes you are already guiding, and will take 4x1k roi exposures.' printf 'Is this correct?' wait 'Press RETURN to continue or Ctrl-C and then RETURN to abort' bell # # Take a slit image # call roi4x1k slit $SLITNUM disp $DOPEN filter1 $F1OPEN filter2 $F2OPEN string SLITNAME '{TARGNAME} Slit Image' printf 'About to take the slit image' ETIME object '{SLITNAME}' exp 10 go # # Take the first direct image # slit $SOPEN filter1 $FILT1 filter2 $FILT2 string ACQNAME '{TARGNAME} Acq Image' object '{ACQNAME}' exp %ETIME #printf 'About to take the first acquisition image' ITERATE: printf 'About to take acquisition image %I2' I go # printf 'Now use osctrtask.py in another terminal to calculate the' printf 'translation offset. ' wait 'Press RETURN when ready to continue (or Ctrl-C to abort)' bell yorn 'Perform another iteration without the slit in the beam?' if (yorn) set I=(I+1) goto ITERATE else printf 'Completed iterations without the slit in the beam' end_if # # # Take a final image through the slit # yorn 'Take a final image through the slit?' if (yorn) filter1 $F1OPEN filter2 $F2OPEN slit $SLITNUM go printf 'The slit is currently in the beam and the disperser is NOT.' else printf 'The slit and disperser are NOT currently in the beam' end_if printf '*** olsalign.pro finished ***' end