#Script to take u band Sky flats # E. Falco 09/29/10 # script doesn't prompt, takes 11 exposures binby2 starting at 10 sec # FOLLOWING 5 LINES CALCULATE CURRENT MONTH echo 'h' > /tmp/skycalc.input echo 'Q' >> /tmp/skycalc.input chmod 777 /tmp/skycalc.input set LOC="`/home/falco/bin/skycalc < /tmp/skycalc.input | grep 'local time'`" /usr/bin/rm -f /tmp/skycalc.input set MON="`echo $LOC | cut -f3 -d' '`" set TIM="`echo $LOC | cut -f6 -d' '`" # make sure abort stuff is in place if (!(${?rts2dir})) then set rts2dir = $HOME/RTS2-F endif if (!(${?nabortfile})) then set nabortfile = $rts2dir/.NABORT endif echo "Starting u skyflats...type skyabort in any xterm to abort loop." if (-e $nabortfile) then echo "ABORT u sky flats" source $rts2dir/rts2.nabort goto done endif # get telescope ready, aim West tele coversup tele domeon tele elaz 45 270 tele trackon #No. of exposures set nrep=11 #Enter initial exposure: set iexp=10 echo "NOTE: use binning x2" set nbin=2 # add 5 sec to "read out time" to account for time to offset # still need to adjust this if ($nbin == 2) then set nrot = "5" endif #use u filter set OFILT="u" set SFILT=`grep -n $OFILT /Realtime/lib/filt.dat | cut -f1 -d:` # remove the second letter in filter name (not needed?) set NFILT=`echo $OFILT | awk '{printf "%1s",substr($1,1,1)}'` tele filter $SFILT # set name of flats set NAME='FLATSky'$NFILT # some variables to control looping set reps = 0 set areps = 0 set OFFS = 0 set left = $nrep if (-e $nabortfile) then echo "ABORT u sky flats" source $rts2dir/rts2.nabort goto done endif while ($left > 0) if ($TIM >= 12) then @ reps++ else @ reps-- endif @ areps++ @ left-- echo $iexp > /tmp/twilight.input echo $nrot >> /tmp/twilight.input echo $MON >> /tmp/twilight.input echo $reps >> /tmp/twilight.input set expt="`/home/falco/scripts/twilight`" if ($expt == 0) then goto exit endif echo "***No. " $areps " of " $nrep " EXPTIME " $expt " sec" object $NAME setcom kepccd Object $NAME ccd gowait $expt "$NAME" if (-e $nabortfile) then echo "ABORT u sky flats loop" source $rts2dir/rts2.nabort goto done endif dstore tele offset -50 0 @ OFFS += 50 end # /usr/bin/rm -f /tmp/twilight.input tele offset $OFFS 0 echo " " echo "Skyflats done\!" echo " " goto done exit: # error message echo " " echo "ERROR, Please report any messages\!" echo " " done: echo " "