Background
Instruments and other telescope systems at Keck employ
keywords to control the state of the system. Keywords
can be thought of as ``variables'' that define some aspect of
the instrument or system. Example of keywords:
- NIRES has a keyword called OBSERVER which
contains the name of the current observer.
- The telescope keyword RA contains the current
Right Ascension of the telescope.
Each system has its own set of keywords, known collectively as a
library. Examples of libraries:
- The Keck I telescope library is known as DCS.
- The primary mirror control system's library is
ACS.
- NIRES has two keyword libraries, one for the slit viewer parameters called nids, one for
the spectrometer detector parameters called nsds.
The basic keyword commands show and modify
allow you to query and change the state of the instrument using
simple commands, issued either at the command line or from a
shell script.
Getting keywords values with show
The show command will return the value of one or more
keywords from the specified library. The full syntax is:
show [-binary] [-debug] [-terse] [-timestamp] -service library [keywords]
where:
- -binary specifies that the command should
return a numeric value instead of a string value when
possible
- -debug causes show to return
additional diagnostic information, including data type,
along with the requested keywords values
- -terse omits all extraneous characters and
causes show to return only the keyword value
(very useful for scripts)
- -timestamp causes show to return a
the date and time at which the keywords values were read
- library is the keyword library to use, such as
nsds or DCS
- keywords is a list of one or more
keywords belonging to the specified library whose values are
to be returned, such as numfs or DEC
Under NIRES accounts, the s command is shorthand for
show -s nsds
and the si command expands to
show -s nids
These may be used as shortcuts to show keyword values on the
command line, as shown below.
The show command may also be used to return a list of
all known keywords belonging to a particular library, simply by
substituting the special word keyword in the show
command. For example, to show all of the LRIS keywords,
type:
show -s nsds keywords
or, more simply,
s keywords
Changing keywords values with modify
The modify command will change the value of one or more
keywords from the specified library. The full syntax is:
modify -service library [keyword=value keyword=value ...] [nowait]
where:
- library is the keyword library to
use, such as nsds or DCS
- keyword is the name of a keyword
belonging to the specified library whose values are to be
changed, such as numfs or OBSERVER
- value is the new setting the keyword
should have, such as 1 for CDS or
Einstein for OBSERVER
- nowait specifies that the command should
return immediately after issuing the request; the default is
for the command to wait for the change
to complete before returning
Under NIRES accounts, the m command is shorthand for
modify -s nsds
and the mi command expands to
modify -s nids
These may be used as shortcuts to set keyword values on the
command line, as shown below.
Examples
- To show the current exposure time on the spectrograph, type the following command at a
niresserver prompt:
s ttime
- To change the exposure time on the spectrograph to 100
seconds, type:
m itime=100
- To show the current exposure time on the spectrograph, type:
s itime
- To return the current exposure time on the LRIS blue
sideNIRES spectrograph without any additional characters, type:
show -s nsds -terse itime
- To change the exposure time on the NIRES slit viewer to 100
seconds, type:
mi itime=100
- To show all valid keywords for the NIRES spectrograph, type:
s keywords
- To return a list of all NIRES keywords with the string TIME type:
s keywords | fgrep TIME
- To show all valid keywords for the Keck II telescope drive
and control system, type:
show -s dcs keywords
See Also