Project Support

config script

The contents of config are automatically included by the other "demo" command scripts. This file is special in the following ways:

  • Most users do not edit config
  • This file provides the internal mechanism to set common variables for all commands.
  • This is not a command itself. It is basically a settings file for the camera/system.

The config file is interpreted by bash. Lines beginning with # (hash character) or any characters after a # are interpreted as commands. If more than one instance of a variable is uncommented, the last one takes effect.


Most configurations actually have the following variables defined in a separate file, config.$USER where $USER is the account name under which the camera control system operates. config.$USER is automatically included by config.


The BOARDSETS variable contains a space-delimited list of IP addresses or hostnames of STARGRASP controllers. Small camera systems with single boardsets will have only one IP or name here. On appropriately configured systems with support for simulation, the following:


indicates that the system will operate in simulation mode. Larger cameras may use a chassis ID system and rely on getting a list of IP addresses belonging to the camera from "statserv". Use of IP addresses in general eliminates the reliance on name resolution and may be preferable in some situations. The statserv method automatically selects "all" boardsets belonging to a particular camera, and automatically excludes those which do not have a current uptime reported in statserv. In other situations, it may be desirable to select a subset of those. For example, one quadrant of a gigapixel camera may be selected by setting BOARDSETS as follows:

BOARDSETS="gpc1D gpc1E gpc1F gpc1G"

A TCP port number of "915" is implicit in this specification. This is default (and only) port which is used internally by camera software to issue low-level commands to the controller.

Some systems have a controller command which replaces the value of BOARDSETS from the command line. For example


selects simulation mode while

controller sg

selects a single boardset with hostname/alias "sg". Not all configurations have the controller command.


The variable STAGE2 tells the command stage2 where to find the controller's embedded code image file. After powering on the controller, it boots with a set of minimal functions and must have other code loaded to be able to control a detector. This code is contained in s-record format in a file pointed to by STAGE2. One or more versions of code appropriate for the camera is typically stored in the internal account home director in a subdirectory called PON (for "Power ON".) A typical STAGE2 setting looks like this:



Once stage2 code has booted on the controller(s), voltages need to be applied to the detector(s). This is handled by the pon command, which in many cases requires a previously acquired FITS file or set of FITS files from the detector. As a STARGRASP convention, all voltages and clocking patterns are stored in the FITS header, and thus the complete operating point from a previous FITS file can be restored by the pon command. On systems where this applies, those reference FITS files are stored together with the controller STAGE2 code:



On systems equipped with a camera shutter, the SHUTTYPE config variable specifies the type of shutter. It is used for telling the expose command? the control method for the shutter. The following types are possible:

  • bonn - Bonn University shutter used on PS1. Requires SHUTSERV to be set as well.
  • grasp - Shutter driven directly with the TTL output from the controller.
  • otb - OTA Test Bench "heat & light box" usually employed on TC3.


The SHUTSERV setting contains the IP address or hostname of the PC running the STARGRASP Bonn shutter control server. This setting only applies when SHUTTYPE is bonn.


The VIDEODEST variable specifies the destination as seen from the camera system for output generated by the video command. User software retrieving the FITS data generated by video will connect to the same server but may see the server at a different IP address because of internal port forwarding setups. The STARGRASP conventional port for video data is TCP 9999, and "default" is the name of the "feed". If there is only one video feed, some name still has to be give so "default" is used.