FIES and STANCAM SEQUENCER Script Reference
FIES setup scripts
FIES exposure scripts
Examples of using FIES scripts
FIES-related STANCAM target-acquisition scripts
STANCAM/FIES miscellaneous scripts
STANCAM/FIES DS9 and Analysis scripts
FIES instrument-setup scripts (fies.script in user scripts)
These scripts use the FIES status database to check whether instrument
items need to be moved or not. In general, the overheads will be
smaller when using these scripts, than when using the basic sequencer
commands.
If any of these setup scripts are started while a FIES integration is
ongoing, the script will wait for the integration to finish, and will
start moving things around during readout.
- lampsoff
Will switch off all lamps, i.e. lamps 1, 4, 6, 7.
NB: as an exception this script does not read the database settings:
it commands the lamps to be off even if they are supposedly off.
- setup-ccddefaults
Sets up the CCD parameters and some administrative parameters to default
values, as they are set when restarting the observing system.
Equivalent to the commands:
fies.clearobject;
fies.gainhi;
fies.ampl B;
fies.resetxy;
fies.autosave_on;
fies.remsave_off;
fies.rempath /data/service;
fies.remsystem verushka
- setup-fib1-star [-v]
setup-fib2-star [-v]
setup-fib3-star [-v]
setup-fib4-star [-v]
Sets up necessary FIES items (mask, arm, lamps) for a FIES science
(object or sky) exposure and for FIES/STANCAM target acquisition,
for the indicated fiber. All lamps will be switched off. Use the
[-v] flag for verbose output on the sequencer command
terminal.
- setup-fib23-star [-v]
As above for simultaneous sky
mode, on med-res fibers 3 (target) and 2 (sky).
- setup-fib1-thar [-v]
setup-fib2-thar [-v]
setup-fib3-thar [-v]
setup-fib4-thar [-v]
Sets up necessary FIES items (mask, arm, lamps) for FIES
ThoriumArgon wavelength calibration for the indicated fiber. The
ThAr lamp will be switched on, and all other lamps switched off.
Use the [-v] flag for
verbose output on the sequencer command terminal.
- setup-fib1-halo [-v]
setup-fib2-halo [-v]
setup-fib3-halo [-v]
setup-fib4-halo [-v]
Sets up necessary FIES items (mask, arm, lamps) for a FIES Halogen
flatfield or order-definition exposure for the indicated fiber. The
Halogen lamp will be switched on, and all other lamps switched off.
Use the [-v] flag for
verbose output on the sequencer command terminal.
- setup-fib5-thar [-v]
setup-fib5-halo [-v]
Sets up necessary FIES items (calshutter, calmove, lamps) for FIES
ThoriumArgon/Halogen calibration of the calibration fiber (the fiber
used for simultaneous ThAr mode). The indicated lamp will be
switched on; the calibration shutter will be set to open. Use
the [-v] flag for verbose output on the sequencer command
terminal.
FIES exposure scripts (fies.script in user scripts)
Note that these scripts do not set any CCD parameters.
- exp-fib1-star [-v] [-f] [-nobell] exptime ["objectname"]
exp-fib2-star [-v] [-f] [-nobell] exptime ["objectname"]
exp-fib3-star [-v] [-f] [-nobell] exptime ["objectname"]
exp-fib4-star [-v] [-f] [-nobell] exptime ["objectname"]
Scripts to take a FIES object/sky spectrum using the indicated fiber.
The scripts go through the following sequence:
- execute the appropriate setup-fib?-star script (see above)
- set the object name if specified on command line
- take a FIES spectrum, with exposure time as specified on command line
The object name needs double quotes if it contains spaces.
Use the [-v] flag for verbose output on the sequencer
command terminal.
Use the [-f] flag for fast mode: the script will return the
prompt when read-out starts, such that new setup commands can be issued
while reading out the CCD.
Use the [-nobell] flag to suppress the alarm bell at the
end of the exposure.
- exp-fib1-thar [-v] [-f] [-nobell] exptime ["objectname"]
exp-fib2-thar [-v] [-f] [-nobell] exptime ["objectname"]
exp-fib3-thar [-v] [-f] [-nobell] exptime ["objectname"]
exp-fib4-thar [-v] [-f] [-nobell] exptime ["objectname"]
Scripts to take a FIES ThoriumArgon wavelength-calibration spectrum
using the indicated fiber. The scripts go through the following
sequence:
- execute the appropriate setup-fib?-thar script (see above)
- set the object name if specified on command line, or else "ThAr"
- set the image type to "WAVE"
- take a FIES spectrum, with exposure time as specified on command line
- switch off the ThAr lamp afterwards
The object name needs double quotes if it contains spaces.
Use the [-v] flag for verbose output on the sequencer
command terminal.
Use the [-f] flag for fast mode: the script will return the
prompt when read-out starts, such that new setup commands can be issued
while reading out the CCD.
Use the [-nobell] flag to suppress the alarm bell at the
end of the exposure.
- exp-fib1-halo [-v] [-f] exptime ["objectname"]
exp-fib2-halo [-v] [-f] exptime ["objectname"]
exp-fib3-halo [-v] [-f] exptime ["objectname"]
exp-fib4-halo [-v] [-f] exptime ["objectname"]
Scripts to take a FIES Halogen flat spectrum
using the indicated fiber. The scripts go through the following
sequence:
- execute the appropriate setup-fib?-halo script (see above)
- set the object name if specified on command line, or else "Halogen"
- set the image type to "FLAT"
- take a FIES spectrum, with exposure time as specified on command line
- switch off the Halogen lamp afterwards
The object name needs double quotes if it contains spaces.
Use the [-v] flag for verbose output on the sequencer
command terminal.
Use the [-f] flag for fast mode: the script will return the
prompt when read-out starts, such that new setup commands can be issued
while reading out the CCD.
- fies-calibs [-noFIEStool] [-nflat N] [-nbias N] [-amp B/AB] [-bin 1x1/2x1/2x2] [-fib 1-4]
This is a script to take a default set of 1 ThAr, 7 bias, and 21
halogen frames, which constitutes a good set of calibration frames
for normal use of FIES without the simultaneous-ThAr mode. This set
of calibration frames can be used for FIEStool: the script can setup
links such that FIEStool can easily find the new
calibration data, and subsequently lets FIEStool pre-reduce the new
calibration data into master calibration frames to be used the next night.
If less than 7 bias or 21
halogen frames are requested the FIEStool links will not be made,
and pre-reduction will not be executed.
If no command-line arguments are given, the script prompts the user
to specify the FIES fiber and other relevant parameters.
If any command-line arguments are given, then the -fib argument is
mandatory.
Binning mode 1x1 and amplifier B are set by default.
In case the binning is chosen as 1x1, and either the med-res or
high-res fiber is selected, then also 1 ThAr and 1 halogen will be
obtained using fiber #5, which provides a minimal set of calibration
files for the simultaneous-ThAr mode. Nevertheless, for
simultaneous-ThAr mode additional calibration frames might be
necessary.
The script can be run in the afternoon and takes about 45 minutes to
complete, or less if CCD binning is requested.
The exposure times for the ThAr and halogen frames are determined in
the script by automatically taking and analysing windowed test
images. The exposure time of ThAr frames is scaled to get 15000 ADU
peak count level in the bright 4764.8 Ar line. The exposure time of
halogen frames is scaled to get a peak count level of 35000 ADU.
- easythar [-f] [-o "objectname"] [-nthar N] [-factor expFactor]
easyhalo [-f] [-o "objectname"] [-nflat N]
the command syntax of the -o flag
was changed Dec 2010.
Scripts to make a ThAr wavelength calibration frame or a halogen
flat-field frame, respectively. These scripts do not do any
instrument setup: use the setup-fibN-thar or
setup-fibN-halo scripts prior to using the 'easy' scripts.
The exposure times for the ThAr and halogen frames are determined in
the 'easy' scripts by automatically taking and analysing windowed test
images. The exposure time of ThAr frames is scaled to get 15000 ADU
peak count level in the bright 4764.8 Ar line. The exposure time of
halogen frames is scaled to get a peak count level of 35000 ADU.
For high-accuracy radial-velocity work, the ThAr exposure level can
be scaled up with the [-factor] option. The exposure time will
be multiplied by the user-supplied factor.
Use the [-f] flag for fast mode: the script will return the
prompt when read-out starts, such that new setup commands can be issued
while reading out the CCD.
The default object names are "ThAr" and "halogen", respectively.
The default number of exposures is 1, which can be altered with the
[-nthar] and [-nflat] flags respectively.
Note that the lamp is left on after the script has finished.
- simulthar [-f] exptime lamptime
Script to take a FIES spectrum in simultaneous-ThAr mode.
The ThAr light will be inserted into the spectrograph in 10 short
pulses, which are equally distributed in time over the full
CCD exposure time exptime.
This is done by opening and closing the calibration shutter.
The parameter lamptime
specifies the total time that the ThAr light will enter the
spectrograph, which is typically only a few seconds.
This script goes through the following sequence:
- execute the setup-fib5-thar script (see above)
- determine the timings of the ThAr pulses
- set the COMMENT header with this ThAr timing info
- take a FIES spectrum, with exposure time as specified on command line
- close the calibration shutter afterwards
Use the [-f] flag for fast mode: the script will return the
prompt when read-out starts, such that new setup commands can be issued
while reading out the CCD.
Note that the ThAr lamp is left on after the script has finished.
Examples using basic FIES sequencer commands and FIES sequencer scripts
1) To do the FIES setup for target acquisition on high-res fiber #4:
setup-fib4-star
and after the star is put on the fiber (using StanCam),
take a 12-minute spectrum and a 10-second ThAr calibration spectrum:
exp-fib4-star 720 "my target star"
exp-fib4-thar 10 "ThAr at my target star"
2) Now for target acquisition on the med-res fiber #3:
setup-fib3-star
and after the star is put on fiber #3, take a 12-minute spectrum
with simultaneous ThAr calibration in fiber #5, with 4 seconds exposure time for the ThAr lamp:
object "my target star"
simulthar 720 4
3) Now the lines of a high-level script for obtaining a 1800-second spectrum using low-res fiber #1,
sandwiched by ThAr calibrations:
autosave_on
resetxy
ampl AB
bin 2
exp-fib1-thar 10 "first ThAr"
exp-fib1-star 10 "my target"
exp-fib1-thar -f 10 "last ThAr"
Note that with amplifier mode AB the readout time is halved, but the central order
of the echellogram is lost.
4) Take 21 two-second flats in the afternoon with med-res fiber #3:
setup-fib3-halo
object "flat Halogen"
mexpose 2 21
5) Use easythar for med-res fiber #3, to make a ThAr exposure at night:
setup-fib3-thar
easythar "ThAr HD12345"
FIES-related STANCAM target-acquisitioning scripts (stancam.script in user scripts)
These scripts should be executed in the STANCAM sequencer.
- acquisition [-e] [-hicut xxxx] fiber expotime
| -e | test flag: don't execute, only echo the commands |
| -hicut | DS9 high cut in ADU |
| fiber | fiber specifier [1,2,3,4] |
| expotime | expo time for unbinned acquisition image |
Script for FIES target acquisition. Will first make a binned full-frame acquisition image, does fiboff,
and will then go into movie mode using an unbinned window around the fiber.
This script makes sure that the mask and arm are positioned
correctly for each step in the target acquisition.
Exits with full-frame unbinned CCD settings, and
autosave_on.
The sequence of STANCAM sequencer commands in this script is: stopmovie,
camera-probe-stancam, autosave_on, resetxy, bin 2, object "FIES
target acquisition", expose, resetxy, fiboff,
camera-probe-fies, setup-fibN-star, fork-fibNmovie .
-
fiboff fiber
Calculates the telescope offset required to bring a target onto a given fiber
(number 1 to 4) and performs the required telescope offset.
The script uses the currently loaded StanCam image in the DS9 display and assumes
this corresponds to an acquisition image of the field the telescope currently is pointed at.
The target is identified interactively by the user through an imexam session.
-
fibmark [yes|no]
Creates a DS9 region file consisting of the fiber positions corresponding to
the StanCam image currently loaded into DS9. The fiber positions will be marked
on every image displayed until the script is run with the 'no' option. This script is
mainly useful for the movie display mode. Default 'yes'.
- fib1window
fib2window
fib3window
fib4window
Sets up a 100x100 pixel window around the fiber in question.
Should be used with STANCAM in fiber-viewing mode (camera-probe-split).
- fib1movie exptime hi-cut
fib2movie exptime hi-cut
fib3movie exptime hi-cut
fib4movie exptime hi-cut
Starts up STANCAM movie-mode in a 100x100 pixel window around the fiber in question.
Should be used with STANCAM in fiber-viewing mode (camera-probe-split).
Argument exptime specifies the exposure time to be used,
and argument hi-cut specifies the colour cut on the image display.
Note that the movie has to be stopped by pressing CNTR-C or by stopmovie, and that it sets
autosave_on at exit, and resetxy at exit to go
to full-frame unbinned readout.
- fork-fib1movie exptime hi-cut
fork-fib2movie exptime hi-cut
fork-fib3movie exptime hi-cut
fork-fib4movie exptime hi-cut
Forks the movie in a separate SEQUENCER window. This is useful
when invoking the movie-mode from a script, which can then subsequently
start a FIES-spectrum exposure.
The comments on the previous item (fibNmovie) also apply on fork-fibNmovie.
- stopmovie
Will stop the ongoing movie mode (i.e. fibNmovie, fork-fibNmovie).
Sets resetxy at exit to go to full-frame unbinned readout.
STANCAM/FIES miscellaneous scripts (stancam.script or fies.script in user scripts)
-
log-comment "Comment in quotes" [file1 file2 file3 ...]
Adds a remark to the FITS headers of an existing data file, in the
LOGCOMME keyword.
When invoked with just the comment, it will be applied to the latest
available image with a prefix for the current night (which starts at
noon) and the sequencer's instrument.
If image names are provided, the program will test the existence of
ALL them before applying the change.
Eg.
$ stancam.log-comment "This is a comment"
$ fies.log-comment "Comment for two" FIug170154 FIug170155
Notice that there's no need to add the ".fits" after each image's name
If no arguments are provided, a usage message is displayed
StanCam/FIES DS9 and Analysis scripts (stancam.script or fies.script in user scripts)
Staff-only scripts
- fies.fies-FS
Staff-only script for obtaining flux-standard QC.
-
stancam.fibposcalib fiber expotime
Interactive script to calibrate the position of the fibers for StanCam
direct imaging (camera-probe-stancam/camera-probe-ccd).
Runs stancam.acquisition to let the user center the star on the fiber, then
swaps back to camera-probe-stancam and lets the user determine the star's (X,Y) coordinates.
Updates the fiber position definition file fibposccd.def ; a backup of the old fibposccd.def
is created.
-
stancam.qc-script (Stancam)
Takes a sequence of two bias frames and two (dome) flat fields and calls
gainron (see below) to calculate gain and read-out-noise.
-
stancam.gainron [file] (Stancam)
Computes detector gain and read-out-noise based on a sequence of two bias frames
and two flat fields. The filename must be the last in the sequence.
If no filename is given, the last obtained image name will be used.
Calculated values are being compared to previous values before being uploaded to
database. If the deviations from previous results are found to be too large,
the script can be terminated without uploading results.
-
killpostprocess
Terminates all FIES sequencer commands and the StanCam/FIES DS9 display.
Note that this will terminate any running observing scripts.
|