next_group up previous contents
Up: DetCom Detector Control Previous: 8. Special Exposure   Contents

Subsections

9. Frequently Answered Questions

9.1 DetCom complains that "Readouts may fail because DetCom is not setuid root."

Log in as root and run the following commands on your detcom binary:


    chown root detcom
    chmod u+s detcom

Also, detcom should preferably be a on a local disk. If it exists on an NFS server, make sure the directory is exported with "no_root_squash" so it is possible to have setuid permissions.

For developers, if you want to rebuild DetCom and have it automatically installed with setuid-root permissions, make sure you have properly installed the "setuidinst" tool from the source tree. If this program has setuid-root permissions, it will automatically make detcom setuid-root each time you do a "make install" in the detcom source directory.

9.2 open("/tmp/detcom_memory_mapped_readout_buffer") fails

If you have problem with this file, it usually means the size or permissions of this file are wrong. Log in as root and remove it, then restart DetCom. DetCom will always create this file if it doesn't exist. (But first, make sure you are running DetCom with setuid root permissions. See question 1.)

9.3 DetCom isn't reporting filter position.

This will happen whenever there is no DSP code downloaded, no second (slave) controller, or if the slave utility DSP code does not define the symbol ACE_WVS. See also http://software.cfht.hawaii.edu/dspsymbol.html

9.4 DetCom isn't reporting the CCD temperature.

This will happen whenever there is no DSP code downloaded or the utility board DSP code does not define the symbol A_CCDT. To properly support detector temperature feedback in DetCom, DSP code should also define DETTEM_C1, DETTEM_C2, DETTEM_MIN, DETTEM_MAX. See also http://software.cfht.hawaii.edu/dspsymbol.html

9.5 DetCom isn't reporting DSP voltages.

This will happen whenever there is no DSP code downloaded or the utility board DSP code doesn't define one of: K_HV I_HV C_HV T_P15 K_P15 I_P15 C_P15 T_M15 K_M15 I_M15 C_M15 C_P5. See http://software.cfht.hawaii.edu/dspsymbol.html for details.

9.6 How do I view messages that have scrolled off the screen?

When running Director, the terminal's scrollbar will not function correctly (and should, in fact, be disabled.) Use the PageUp and PageDown keys to view previous messages. You can also resize your window to view more lines/columns at once.

9.7 Why are FITS files larger after upgrading to 3.56?

DetCom has always reserved at least 100 keyword slots using COMMENT lines at the end of each header unit. As of 3.56, this number has been changed to 200, but a new command ``reserve'' has also been added. See the section on reserve.

9.8 How can Instrument Configuration be scripted?

This is more of a Director question. Here is a summary of one way to do it. Let's assume that you have created a script or program that moves a filter. Let's assume the command is called filter, and it does two things. First, it can be used to begin moving a new filter. The syntax to select the V filter, for example, might be:


filter V

Second, if you can make your filter command non-blocking, motion of the filter can be overlapped with other operations (such as reading the detector or slewing the telescope) and a command to wait should exist. For example:


filter wait

Again, this filter command can be a C program, a Perl script, etc. To make filter a command recognized by the director shell, simply copy it into this directory:


$HOME/.director/bin/

Now you'll want to do one final thing to ensure that the filter is not moving when you tell DetCom to go. The way to do that is to make go itself a script, instead of a command sent directly to DetCom. The go script will look no different to the user than the previous DetCom go, if it contains something like this:


#!/bin/sh
#
# go - replacement for DetCom's internal go.
#
clicmd filter wait     # Make sure filter is not moving.
clicmd detcom.go "$@"  # Continue by executing detcom's go.

clicmd is a utility that gets installed with Director. Install this script as:


$HOME/.director/bin/go

and make sure it is executable. Next time the user types go, it will run this script instead of sending go to detcom directly.

9.9 How can Instrument Keywords be added?

At CFHT, keywords are collected in a Status Server shared namespace. A slightly slower but simpler way to get your own keywords into DetCom's FITS headers involves DetCom's nheader command. This command should be used before a go. Suppose that the filter command in the examples above was able to report the current filter position if invoked with no arguments. In that case, the go replacement could be modified to look like this:


#!/bin/sh
#
# go - replacement for DetCom's internal go.
#
clicmd filter wait     # Make sure filter is not moving.
FILTER=`clicap filter` # Read current filter position.
clicmd nheader -1010.1 FILTER \"$FILTER\" \"Comment for header\"
clicmd detcom.go "$@"  # Continue by executing detcom's go.

The choice of the floating point number 1010.1 is arbitrary (but controls the order in which keywords appear in the final FITS header.)

The negative sign on 1010.1 means this keyword will only go into the next FITS file. You may wish to drop the '-' and the keyword will be added until nheader reset is used to clear them all.

The argument after the number is the FITS keyword name (up to 8 characters).

The third argument is the filter position, as reported by your filter command, captured by clicap in the line above.

The fourth argument is an optional comment string for the FITS card.

The backslashes before the quotes are necessary because the /bin/sh shell eats one level of quotes.

9.10 How can Telescope Keywords be added?

You will first require an implementation-specific way to get current telescope information into script variables. Once you have that, exactly the same method used above to get a FILTER keyword into the header can be used, by adding to the go script:


#!/bin/sh
#
# go - replacement for DetCom's internal go.
#
clicmd filter wait     # Make sure filter is not moving.
FILTER=`clicap filter` # Read current filter position.
TCS_RA=`get_tcs ra`    # Query TCS for RA
TCS_DEC=`get_tcs dec`  # Query TCS for DEC
clicmd nheader -1010.1 FILTER \"$FILTER\" \"Comment for header\"
clicmd nheader -522.1  RA     \"$TCS_RA\" \"Object right ascension\"
clicmd nheader -522.2  DEC    \"$TCS_DEC\" \"Object declination\"
clicmd detcom.go "$@"  # Continue by executing detcom's go.

See comments in the filter question, and also the section on nheader itself for more hints.

9.11 What mechanisms exist for post processing steps of FITS?

Using the go script above, it is trivial to add post processing steps to the end of this script. Those steps, however, can take up value observing time since Director is single threaded and will not allow the user to start the next go.

To get around this, director looks in $HOME/bin/ for a different script, called endgo. If this script exists, it will be executed once per FITS file created. The name of the FITS file will be passed as an argument, and the current working directory will be the one where the FITS file was saved by DetCom. This endgo script runs asynchronously to observations, and can take as long as it wants to process the file.

At CFHT, endgo is used to display the image, pass the file on to the Elixir processing pipeline, and start the process to make a tape backup of the image.


next_group up previous contents
Up: DetCom Detector Control Previous: 8. Special Exposure   Contents
Sidik Isani
2004-11-12