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: Each system has its own set of keywords, known collectively as a library. Examples of libraries: 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: 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: 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

  1. To show the current exposure time on the spectrograph, type the following command at a niresserver prompt:
    	s ttime
  2. To change the exposure time on the spectrograph to 100 seconds, type:
    	m itime=100
  3. To show the current exposure time on the spectrograph, type:
    	s itime
  4. To return the current exposure time on the LRIS blue sideNIRES spectrograph without any additional characters, type:
    	show -s nsds -terse itime
  5. To change the exposure time on the NIRES slit viewer to 100 seconds, type:
    	mi itime=100
  6. To show all valid keywords for the NIRES spectrograph, type:
    	s keywords
  7. To return a list of all NIRES keywords with the string TIME type:
    	s keywords | fgrep TIME 
  8. To show all valid keywords for the Keck II telescope drive and control system, type:
    	show -s dcs keywords

See Also