CGS4 Execs
   
Up:
CGS4Handbook
How to write EXECs
Almost all CGS4 observations are taken by running an EXEC. EXECs are
ascii files which contain high level commands to control the telescope
and instrument and take data. You can write an exec to do an entire
nights observing, including calibration observations, loading source
coordinates for the telescope operator, taking data while nodding the
telescope along the slit or to blank sky and instructing the data
reduction system to use specified reduction sequences. However since
observing usually has natural breaks, e.g. to check finding charts, or
fine tune the telescope pointing on near-stars, it is most efficient
to write several execs and then modify them as the night progresses.
Most observers write an exec for flats, arcs, darks (which can be run
while the operator slews the telescope) and one or more for standard
stars and sources. This method keeps the Exec to a readily editable
length.
Execs can be nested - for example there is a standard pre-defined exec
called "quads" which does two pairs nodding the telescope between object
and sky. If you want to do 10 pairs your exec can say
DO 5 QUADS.
There are commented examples of EXECS at the end of this document.
1. How to write an EXEC :
Run up UKIRT_PREP and use the enter key to go into the CGS4... menu.
Go into the menu Edit_EXEC
Enter the name of the EXEC you would like edit. The name does not
need any extension. This can be either the name of a pre-existing
EXEC, or any name you choose for a new EXEC. If you wish to edit a
pre-existing EXEC and save it with a new name then enter an output
name in the second row of the menu. If this name is left blank then
the output version of the EXEC will be saved with the same name as the
original. If you are new to CGS4 observing it helps to start with one
of the system Execs detailed below. After entering the names use the
PF1 key to exit the menu. Make sure the names do not have any
leading spaces in them.
This puts you into the EDT text editor. Now edit a file containing
your EXEC commands.
If you are unfamiliar with the Vax editor the following may help. You
can move around with the arrow keys. Use the return key to move to
the next line or insert a line. The PF4 key can be used to delete a
whole line. EXEC commands are not case sensitive.
When you have finished editing your exec, exit from the editor by
doing control-Z.
2. The SYSTEM EXECS
Several "standard" execs which can be used or modified by all
observers have been written. You can use EDIT_EXEC to modify a system
EXEC by entering the name of the system EXEC in the EDIT_EXEC menu -
it can be saved with the same name, as your own version of it, or with
a different name. If you save it with the same name as the system
EXEC then whenever you call up that EXEC you will get your user
version of it and not the standard one.
Two SYSTEM example execs which contain examples of EXECs to do
calibration observations and source observations have been written.
For normal observing you can make your own versions of these using your
chosen CONFIGS, number of pairs to observe, etc. These EXECs are
called EXAMPLE_CALIBRATE and EXAMPLE_SOURCE and they contain the
following commands:
! EXEC example_calibrate
CONFIG EXAMPLE_K
FLAT
ARC
SET OBJECT
and,
! Example_K, for observing point sources in the K-window, does 4 pairs.
CONFIG EXAMPLE_K
SET OBJECT
BREAK (to peak up in the slit)
STARTGROUP
DO 2 QUAD_SLIDE
ENDGROUP
The usual observing technique for point sources is to nod the
telescope frequently between two positions on the slit and subtract
the data in pairs to get good sky subtraction. For extended sources
you will need to nod to blank sky. Three SYSTEM EXECS have therefore
been written which nod the telescope between two positions and which
you should use to take several obj-sky pairs of observations of your
source. These are EXECS are called QUAD_SLIDE, QUADS and
QUADS_NOGUIDE. You should make your own versions of them after
measuring at the telescope the offset between the rows you want to
center your source on. These standard EXECS take data in the following
sequences :
The EXEC QUAD_SLIDE reads the position angle of the slit on the sky
and nods the source a specified number of arc seconds up (in detector
rows) the slit, and it contains the following commands
!QUAD_SLIDE nods along slit 26 pixels
object
slide slit 30.5
sky
sky
slide slit 0
object
If you peak up with a source spectrum on row 121 this will nod so that
for the "sky" observation the spectrum is on row 146 if the short
camera is in use. The data reduction will form object-"sky" pairs and
coadd them, resulting in an image which has both positive and negative
spectra of the source - these may then be extracted and combined.
If you want to nod more or less than 26 pixels make your own version of
QUAD_SLIDE by editing it from the EDIT_EXEC menu. Note that a positive
value in "slide slit" will move UP the slit in row numbers.
If you are using the Echelle, the pixel scale is a strong function of
grating angle and in this case it is best to measure the nod distance
for your configuration and then edit QUAD_SLIDE accordingly.
The "slide slit" command will check whether or not the autoguider is
turned on. If you are autoguiding then to execute the nod it will turn
off the autoguider, move the crosshead and the telescope the specified
amount, turn the autoguider back on and wait a second or two for the
image to settle. If you are not autoguiding then only the telescope
is moved appropriately.
The EXEC QUADS can be used to observe extended source by nodding the
telescope to blank sky. The telescope operator can define any
distance and angle of nod for you. If you want to nod to blank sky be sure
to tell the TO where you want to nod to. The EXEC contains the following
commands to nod the telescope.
! QUADS nods to sky, autoguides on source position only.
object
tel offset
sky
sky
tel main
object
It does two pairs nodding the telescope between the main and
offset beam using the telescope nod vectors (setup by the telescope
operator). Include this exec in your exec for observing extended
sources, or if you want to chop and nod perpendicular to the slit.
It assumes that you are autoguiding when in the main beam, but not
when in the offset beam.
The EXEC QUADS_NOGUIDE is the same as QUADS except it
assumes that you do not want the autoguider turned on at all.
3. Useful EXEC commands
A ! at the beginning of a line allows you to enter comments
The most commonly used exec commands are:
CONFIG name - recall the config called name
FLAT - drive the motors to the positions specified by the
most recently recalled config, and take a flat observation using the
sampling, lamp and exposure times defined in the flat information in
the config.
ARC - drive the motors to the positions specified by the
most recently recalled config, and take an arc observation using the
same sampling as for your object and the lamp and exposure times
defined in the arc information in the config. If the Echelle is in
use and the config contains a different CVF position for the arc then
this will be set as well. If you are taking low resolution data with
a central wavelength of 2.8um or longer then the blocking filter will
automatically be set for observation of the 1.4-2.5um lamp lines in
second order.
SET OBJECT - drive the motors to the positions specified by the
most recently recalled config, and set the corresponding exposure
times/coadds/sampling for the object etc. Does not start data taking.
OBJECT - take an object observation (after driving the motors to the
config positions if necessary).
SKY - take an observation as above for OBJECT, but flag it as SKY
for the data reduction.
BREAK - interrupt the exec here and wait until told to resume. When a
break is executed the terminal will beep.
STARTGROUP - flag following observations as belonging to a group of
object-sky pairs. This is necessary so that the data reduction
recognises that it needs to subtract observations in pairs and
then add the pairs.
DRCONFIG drconfigname - tell the reduction system to use a
previously defined reduction configuration.
BIAS - drive the motors to the positions specified by the
most recently recalled config, put the blanks in and take a bias
observation using the default bias settings. These are exposure time
0.12 seconds, 30 exposures per integration and 3 integrations per
observation. Bias observations can only be taken in STARE mode. The
CGS4 bias level is very stable - you do not normally need to take bias
observations other than the one that its taken at the begining and end
of the night when the array_tests EXEC is run.
DARK - drive the motors to the positions specified by the
most recently recalled config, put the blanks in and take a dark
observation using the same exposure time, exposures per integration
and integrations per observation as defined in the CONFIG for object
observations. If you are observing by nodding CGS4 for background
subtraction you do not normally need to take darks, because the dark
current is also subtracted when "object-sky" pairs are formed.
Full details of all the EXEC commands are given in the EXEC
documentation included in the handbook, kept at the summit, HP and JAC.
4. Examples of EXECs.
There are three examples of EXECs documented here. Each command in the
exec is preceded by a comment line, marked by !, explaining what it
does. Two of them are the system EXECs, Example_calibrate and
example_source and the third is a modified version of example_source
to show how you might change it if you wanted to observe a very faint
source by nodding to blank sky instead of along the slit.
4a) Sample exec for taking calibration observations.
! EXEC example_calibrate
! Recall the configuration defining the desired wavelength and
! exposure times etc, in this case for low resolution K spectra.
CONFIG EXAMPLE_K
! take a flat using this configuration
FLAT
! take an arc using this configuration
ARC
! set up ready to take object observations.
SET OBJECT
Notes :
The flat observation is taken first, so that it is available for the
data reduction to use to flat field the arc observation.
The last command gets CGS4 all set up ready to take data or for the TO
to peak up. It also makes sure that the lamps get turned off.
No dark or bias observations are taken because they are not necessary
for observing object-sky pairs or for the flat/arc because the
exposure times for these are short and the dark current is <~ 1 e/s.
4b) Sample EXEC for taking observations of a relatively bright star.
! System example of an Exec for observing point sources
! in the K-window, does 4 pairs.
!
! Recall the configuration defining the desired wavelength and
! exposure times etc, in the case for low resolution K spectra.
CONFIG EXAMPLE_K
! set up ready to take object observations
SET OBJECT
! stop the exec so that you can peak up
BREAK (to peak up in the slit)
! tell the data reduction to start a new group of pairs.
STARTGROUP
! Use the EXEC that moves between two positions on the slit. Each
! QUAD_SLIDE does two pairs, object/sky/sky/object. Do 4 pairs.
DO 2 QUAD_SLIDE
! tell the reduction that this set of pairs is finished.
ENDGROUP
4c) Sample EXEC for taking observations of a faint extended source.
! Recall the configuration defining the desired wavelength and
! exposure times etc, in this case for low resolution K spectra.
CONFIG EXAMPLE_K
! set up ready to take object observations
SET OBJECT
! stop the exec so that you can peak up
BREAK (to peak up in the slit)
! tell the data reduction to start a new group of pairs.
STARTGROUP
! Use the EXEC that moves between object and blank sky. Each
! QUADS does two pairs, object/sky/sky/object.
DO 40 QUADS
! tell the reduction that this set of pairs is finished.
ENDGROUP
Note : This is a faint source so the EXEC has been written to take
80 pairs - You can stop the EXEC at any time when sufficient signal to
noise has been obtained. If you wish to observe a faint source by nodding up
and down the slit you can write a similar EXEC that has in it DO 60 QUAD_SLIDE instead.
Last Modification Date: 1998/07/31 - Last Modification Author: Tom
Kerr
Tom Kerr (tkerr)
|