#!/bin/csh -fX #+ # observe_flux_standard -- acquire spectra for monthly DEIMOS throughput test # # Purpose: # Take a series of exposures required for the DEIMOS monthly # throughput check using the current grating. # # Usage: # observe_flux_standard -q # # Arguments: # -q = query mode (ask before running) # # Procedure: # - verifies that the telescope is pointed to a known DEIMOS # flux standard star by checking DCS keyword TARGNAME # - check the current grating and build appropriate exposure list # - save current DEIMOS configuration # - check that SKYPA is correct for this star # - set pointing origin to SLIT # - configure for slitless spectroscopy # - acquire exposures # - restore configuration # # Restrictions: # - before starting the script, you must set the SKYPA to the # correct value for the star you plan to observe. See the following # table # - a grating must be in place when the script is started # # Valid targets: # Starname PA RA Dec Equinox # -------- -- ------------ ------------ ------- # G191B2B 0 05:05:30.600 +52:49:54.00 2000.0 # Feige34 90 10:39:36.700 +43:06:10.00 2000.0 # HZ44 90 13:23:35.400 +36:08:00.00 2000.0 # BD+33 2642 0 15:51:59.9 +32:56:55 2000 # BD+28 4211 90 21:51:11.100 +28:51:52.00 2000.0 # Feige110 90 23:19:58.400 -05:09:56.00 2000.0 # # Note: This information is in starlist # /kroot/starlists/0000_Throughput_standards.list # # Exit values: # 0 = normal completion # 1 = wrong number of arguments # 2 = current star is not a valid DEIMOS flux standard # 3 = no exposures defined for current grating # 4 = number of filters and wavelengths don't match # 5 = SKYPA is wrong # # Note: # SKYPA must currently be set manually prior to running the script, # since it is not possible currently to ensure that it can be set # automatically to a value not near the limits. # # Example: # 1) To acquire exposures on the star G191B2B with the 1200G grating: # - point the telescope to G191B2B (any pointing origin) # - set the SKYPA to the 0 deg (see table above) # - move the 1200G grating into position # - execute the command: # observe_flux_standard # Assuming that the GG400, GG455, and OG550 filters are installed, # the script will acquire 3 60s exposures: # 1200G/5000A + GG400 # 1200G/7000A + GG455 # 1200G/8000A + OG550 #- # Modification history: # 2003-Jul-31 GDW Original version # 2004-Jun-19 GDW Changed all references to BAL12 -> GG400 # (filter removed from service because of # scratching) # 2008-Dec-23 GDW Added -q option # 2009-Mar-30 GDW Added new star BD+33 2642 #----------------------------------------------------------------------- set buf = $0 set cmd = $buf:t set usage = "Usage: $cmd" set debug = 0 if ( $debug ) then set cmd = echo else set cmd = "" endif # parse flags... while ( $#argv > 0 ) # check for -no_init flag... if ( "$1" =~ \-q* ) then set do_query = 1 shift continue endif # exit flag check if no flags remain... break end # verify args... if ( $#argv > 0 ) then printf "$usage\n" exit 1 endif cat < $thresh ) then printf "WARNING: current SKYPA of $skypa is too far off of desired value $pa -- abort!\n" exit 6 endif $cmd poname Slit # configure instrument for slitless spectroscopy... $cmd modify -s deimot hatchpos=open $cmd lamps off $cmd slitmask None $cmd modify -s deiccd obstype=Object $cmd spectral $cmd tint $ttime # ensure shutter is working... cycle_shutter -10 if ( $status != 0 ) then printf "ERROR: couldn't open shutter -- abort\n" exit 1 endif # loop over configurations... @ i=1 while ( $i <= $#wavelengths ) $cmd filter $filters[$i] $cmd wavelen $wavelengths[$i] $cmd object DEIMOS flux standard $targname $grating/$wavelengths[$i]A + $filters[$i] $cmd goi @ i++ end # restore original configuration... $cmd restore_state exit