Skyprobe Support
This page explains the components of the SkyProbe system, and
discusses trouble shooting.
Overview
The SkyProbe camera is mounted on the Caisson Central and controlled
by a iopener computer in the nearby cabinets. This computer reads
from the camera and writes the output to a location on the summit
computers. The image is then copied to a machine in Waimea, where
analysis of the image is performed. The final measurement is the
transparency of each image, which is added to a database in Waimea. This
database is used to generate a plot of the resulting transparency
which is made available on the web and within the Elixir display
tool.
A daemon running on a machine at the summit requests an image from the
iopener once per minute. This same daemon is responsible for turning
the camera cooling system on at the start of the night, turning it off
at the end of the night, and checking that the data directory for each
night is created. A separate daemon running on a machine in Waimea
generates the skyprobe plot, and saves a copy of the plot in the
archive at the end of each night.
The host computer for skyprobe at the summmit is 'wekiu'; in Waimea
the daemon and the processing are run on 'milo'.
Camera Control
The iopener which controls the skyprobe camera runs the program
sp_ccdcontrol which communicates with the skyprobe camera
directly. This program is in turn called by a program from the summit
computers. The general command to run the camera is
sp_command, which takes several options:
[skyprobe@wekiu:~/] sp_command -h
USAGE: sp_command init (path)
USAGE: sp_command cool (temp)
USAGE: sp_command warm
USAGE: sp_command test
USAGE: sp_command dark (exptime) (filename)
USAGE: sp_command expose (exptime) (filename)
The init command checks for the data directory and creates it
if needed. The cool command tells the camera to cool to the
specified temperature, usually set to -20C. The warm command
turns off the cooling system. The test command runs a
detailed test suite, discussed below. The dark command takes
a single dark exposure of the specified exposure time, writing the
output to the given file. Finally, the expose command is
used to take a single image of the specified exposure time, saving the
output to the specified file. Any of these commands can take an
optional flag -iopener name@address. This option tells
sp_command to send the commands to a different host computer,
with both the machine ip address and the camera account specified. In
addition, the expose command can take an option
-noprocess, which tells sp_command NOT to send the
image to the analysis system. The sp_command program is
usually run by the skyprobe daemon on wekiu at the summit.
The sp_command test suite performs a variety of useful checks
on the skyprobe camera: it checks that the iopener is alive, it turns
on the cooling system, waits 1 minute for the camera to cool somewhat,
takes a single dark frame, checks that the temperature information is
consistent with a cooling camera, checks the flux in the dark frame,
takes a single light frame, and measures the flux in the light frame.
The entire process runs for about two minutes. This should normally
be run during the daytime, when skyprobe will not be controlled by the
daemon. Although no harm will come by running the test when the
daemon tries to take an image, the results will likely be
mis-interpreted. If it is necessary to run the skyprobe test suite at
night, it is best to halt the skyprobe daemon for the duration (see
below). A typical output from the test suite is given here:
[skyprobe@wekiu:~/] sp_command test
starting skyprobe test suite
this will take about 2 minutes
iopener is OK
cooling camera & waiting for 1 minute
taking 1 sec dark frame test.dark.fits
progress: Exposure complete (100%)
progress: Writing FITS data to stdout00%)
logonly: Wrote 390150 pixels, min=84, max=234
progress: sp_ccdcontrol done.
temperatures: camera: -19.5, outside: 16.3
camera temperature OK
dark flux: 104
taking 0.1 sec light frame test.light.fits
logonly: ccd_status=2 controller (100%)
logonly: ccd_status=2
logonly: ccd_status=2
warning: Exposure took an extra 0.15 seconds
progress: Exposure complete (100%)
progress: Writing FITS data to stdout00%)
logonly: Wrote 390150 pixels, min=2726, max=36145
progress: sp_ccdcontrol done.
light flux: 13996.2
expected ranges:
NNNN for dark dome
NNNN for dome lights on
NNNN for dome open daytime
Skyprobe Daemon
The skyprobe daemon which runs the camera is called skyprobe
and is run by the user 'skyprobe' on the computer 'wekiu' at the
summit. This daemon is automatically started when this machine boots.
The skyprobe daemon uses the Elixir nightd daemon
system to run regular events during the night, as well as initial and
final nighttime events. The skyprobe daemon (simply a link
to the nightd daemon) is defined by the .skyproberc file in
skyprobe home directory. This configuration file is given here:
HOME /h/skyprobe
DATA_PATH $HOME/data
PID_FILE $HOME/.skyprobe.pid
LOG_FILE $HOME/sp_daemon.log
CCD_TEMP -20
EXPTIME 30
INIT_COMMAND sp_command cool $CCD_TEMP
INIT_COMMAND sp_command init $DATA_PATH/&DATE
MAIN_COMMAND sp_command expose $EXPTIME $DATA_PATH/&DATE/sp_&DATE_&TIME.fits
DONE_COMMAND sp_command warm
NIGHT_START 18:00
NIGHT_STOP 06:00
PERIOD 60
TIMEOUT 300
In this configuration file, there are a few keywords which are
required to define the daemon, and the rest simply define values to be
used elsewhere in the file. The required keywords are:
INIT_COMMAND - command executed at the start of the night
MAIN_COMMAND - command executed regularly during the night
DONE_COMMAND - command executed at the end of the night
NIGHT_START - local time of the start of a night
NIGHT_STOP - local time of the end of a night
PERIOD - MAIN commands are started on module PERIOD seconds
TIMEOUT - processes which don't complete in this time are killed
PID_FILE - process ID file, used for locking and communication
LOG_FILE - process log file.
Multiple entries of the three _COMMAND keywords are all
performed in sequence at the appropriate time. A single day runs for
24 hours from 12:00 noon local time. The special variables &DATE and
&TIME are converted by the daemon to the current value of the date
(the UT date for 09:00 of this 'day'; ie, if it is after 12:00 local
time, &DATE will reflect the UT date at 09:00 the next morning).
&DATE is provided in the format YYYYMMDD. &TIME is the current local
time in the format HHhMMm. In the case of skyprobe, these two are
used to generate unique names for each image.
The skyprobe daemon can be easily started and stopped using the
following command-line options:
skyprobe start : start the daemon
skyprobe stop : stop a running daemon
skyprobe status : check the status of a running daemon
skyprobe config : reload the configuration file
Skyprobe plotting daemon
The daemon which generates the skyprobe plots is called srt
and is run on the machine 'milo' in Waimea. Currently it is run as
user 'eugene', soon to be moved to a more appropriate user, either
'elixir' or 'skyprobe'. This daemon is based on the nightd
system with the following configuration file .srtrc
INIT_COMMAND sp_plots init
MAIN_COMMAND sp_plots plot
DONE_COMMAND sp_plots done &DATE
PID_FILE /data/milo/elixir/log/srt.pid
LOG_FILE /data/milo/elixir/log/srt.log
NIGHT_START 18:00
NIGHT_STOP 06:00
PERIOD 60
TIMEOUT 300
Skyprobe analysis
After sp_command has succesfully taken a picture and obtained
TCS and logger information, the image is sent to Waimea for
processing. This is perfomed by the program sp_phot. This
program performs a few major tasks:
the raw image is copied to Waimea
(/data/milo/skyprobe/rawdir/DATE).
the raw image is flattened by the program skyproberedccd
(rawdir/DATE/filename.fits to
smpdir/DATE/filename.flt)
photometry is performed on the flattened image by
sp_sexphot, a script which calls sextractor.
astrometry is performed on the resulting list by gastro
using the Tycho database. The output file is smpdir/DATE/filename.flt.
the stellar photometry is matched and compared to the Tycho
photometry, and a zero-point is measured (addstar). These
measurements are added to the photometry database
(/data/milo/skyprobe/catdir).
These programs are part of the Elixir system and are discussed in
other pages.
Odds and Ends
TCS and data logger information are added to the skyprobe header using
the /cfht/bin/tcsh and /cfht/bin/loggerh programs.
These programs, part of the general CFHT observing software system,
add specified information to the FITS header of an image defined by
the environment variable FFTEMPLATE.
Logs from most of the programs go to the skyprobe home directory. Log
messages from the skyprobe daemon are written to
~skyprobe/sp_daemon.log. Output from sp_command
expose is written to ~skyprobe/sp_expose.log, unless the
-noprocess option has been chosen. Output from the image
analysis (sp_phot) is written to
~skyprobe/sp_phot.log. The exception is output from the
plotting daemon, which is sent to
/data/milo/elixir/log/srt.log.