1.2m Keplercam System Primer
Created: 08/02/05 by EF
Updated: 05/15/13 by EF
When you see this
icon, you can click on it to return to this point.
Click
here or on the image to see labels.
Table Of Contents
Introduction
This primer instructs users of the Keplercam CCD system on the
1.2-meter telescope. You should NOT operate the telescope
and Keplercam from accounts other than observer.
Click here for information on the
Keplercam CCD Chip. For a (warm) QE curve, click
here.
We keep the observer computer account unchanged, except
for necessary updates. If you make minor changes in any observer directory,
please advise us. The observer account is
restored semi-periodically from a frozen disk version.
If you don't like its setup, or wish to make lasting changes, please
ask for your own account, but do not use it to observe.
To Table Of Contents
Getting Started
There are 2 monitors on the main desk in the control room.
Log in to flwo48 (a Linux PC),
using the username observer. Your typing will first appear
on the monitor on your right.
The password is printed near the top of the monitor. You will
see several windows appear, including a blue one called Main Login,
a maroon one called Iraf, and various KDE icons
(at the bottom of the display). The blue and maroon windows are simply unix
xterm windows. You might use the second monitor to display your images
. Under KDE, the displays allow you to drag
windows from one display to the other, but it's best not to
fiddle in excess to avoid confusion. You also have two desktops
you can manage with KDE.
We use a 3-button mouse with several functions.
The location of the cursor driven by the mouse
brings focus, i.e. directs keyboard characters to the
appropriate window. You simply place the mouse cursor
(looks like a capital I) on the window you want to work in. Often, if
nothing happened after you typed a command, it was because the mouse
was not in the right window. A simple action you can achieve is
to click with the left button
on a window just about anywhere on it, except on the little
boxes at top right: that brings it to the foreground. Other actions,
such as clicking, dragging to select, and inserting, are standard X.
At the top margin of each window is a bar; clicking a mouse button there
once results in one of these actions:
- Left button on the bar, away from the boxes at its right,
brings the window to the foreground. If you hold the button down,
you can also drag the window around your desktop.
- Middle button on the bar, away from the boxes at its right,
brings up a menu of possible actions on the window (e.g., move, resize).
- Right button on the bar, away from the boxes at its right,
toggles the window between foreground and background.
- Any button on the cross at top right kills the window (CAREFUL!).
- Any button on the square near top right resizes the window.
- Any button on the dash near top right iconifies the window.
The window can be retrieved by clicking on the appropriate entry of the
icon stack, somewhere on your desktop.
Caution: clicking the left mouse button twice on the bar shrinks the
whole window into the
bar; repeating that on the shrunk bar restores the window.
The vertical bar on the left of each window is the scroll bar.
To Table Of Contents
Taking Data
First, the telescope PC must be running, as well as the guide PC. To start
these up, go to Startup and
TCS.
To start the Keplercam system, mouse the
cursor over to the Main Login window and type
- gokep
Three windows will appear:
- The Kep.err Window (small blue)
- The Telshell command Window (blue xterm)
- The Ntcs (Telescope Control System) Window
The Kep.err window is the error debugging output for all processes. It may
be useful when problems occur, but you may iconify it for now.
The Telshell (rtshell of old) window accepts all commands for system control
of the CCD, telescope, filters and guider. It has the basic functions of
tcsh (command line editing) as well as custom functions. It also has
commands built-in to control the telescope, filter positions and guider
functions, which duplicate many of the TCS gui functions.
The state of the CCD is controlled with command "ccd" and
several different parameters. You only need a few of these, and there
are aliases for the most frequently-used ones:
If you need to monitor the status of the CCD
start a vncviewer session to
the computer that controls the CCD, called kepccd. On
any xterm, type:
vncviewer kepccd.sao.arizona.edu:1
You will be prompted for a password (same as for observer)
and you may put the job
in the background once it's running. A window like this
snapshot
will appear on your screen.
The CCD temperature
must always remain near -97.0C, as displayed in the ntcs window and
saved in all image headers. Monitor the values in the
ntcs window. If you notice the temperature differs from -97.0C by
about 2C or more,
please contact staff as soon as possible.
The percentage displayed
next to the CCD temperature in the ntcs window is
the running time of the heater on the Lakeshore controller. If it is pegged
at 0%, the heater is off. To check, read the heater setting on the
display of the Lakeshore
box attached to the topbox. If it shows it's off,
press the "Heater Range" button (top, left)
and use the arrows on the right to scroll to "Low," the normal setting,
then press "Enter" (bottom, right).
If the CCD warms up, you or the next observer may lose
a night because the CCD will need to be pumped and cooled, a process
of several hours.
If the CCD temperature is displayed as +999.0C
do not panic, this is an indication that communications between the CCD
computer and the Lakeshore controller have failed; please inform the staff
immediately! If you see a
view similar to the snapshot, the system is behaving properly; otherwise
you should restart the system, as described
here
.
Startup aliases and definitions for the system are in the file
/home/observer/.kepccd.rtrc, which is executed when you type gokep.
If you want different aliases or conditions at startup, create a file in
your name, for example ted.cmd which contains the aliases you desire, and
then from the Telshell window issue the command "source ted.cmd".
You can always enter the binning commands in the Telshell window.
You must first decide what CCD format you want, binned 2x2 or
unbinned. In the Telshell window, type small, which will result in
2x2 binning, or type large, which will result in full
resolution. Small is the default on startup. If you desire large enter
that in telshell now.
By default, all 4 amps are read out. If you are interested in only
one of the amps, say 1, you should issue the command:
ccd selchan 1
and to return to normal
ccd selchan 0
(the default). You only save disk space
this way, not readout time. The binned (unbinned) pixels are about
0.67" (0.34") on the sky.
The default centering is for the centers of the field
and the CCD to coincide. You may change that
from the TCS window. You may
also select the amp from Telshell by typing:
tele ampcen X
where X=0-4 (0 being the center of the CCD). Once you select
the amp center by either method, the centering
persists until you change it again or you exit the system.
If the telescope is tracking, the centering is applied
immediately after you issue the command.
You can find out which amp is selected by typing
tele ampcen ?
and Telshell will return the amp number in its window. The
amp center is also shown in the "Tele Tasks" menu
on the main TCS window.
The images are stored in a directory named
/kep/yyyy.mmdd, for example /kep/2005.0901 for 2005 Sep 01.
The directory changes and appears automatically at noon MST.
Data are stored as FITS EXTENSION files (see chip characteristics).
CCD commands may be called either interactively or from scripts.
See the example scripts in the Telshell
link for proper scripting syntax.
The following are the interactive Telshell commands available
(comment, object and setcom are exceptions that
confirm the rule: they may be called from scripts):
- bias n
- Takes n zero-second exposures and names them ``BIAS''.
- total n
- Will do a fast clear of kepcam, open the shutter for time n,
where n is seconds, reads out the CCD and store the data. No prompt
will be made for comments - you must enter a name via "object" otherwise file
is named after last object name, or seqno.kepccd.fits if no object has yet
been set. If you loaded your object from a catalog through TCS, it will set theobject name as well.
Total cannot be used to change the exposure time in the middle of one
already in progress. To change an exposure time for an exposure already
in progress see the extend and istore commands below.
- extend N
- Add N seconds to the current exposure time.
- istore
- Stop the current exposure immediately and store the file.
- dark [ n ]
- Same as total except the shutter isn't opened. The exposure
is named ``DARK''. (Equivalent to the old "godark", which
still exists for old-timers.)
- flat [ n ]
- Takes an exposure of length n, labels it ``FLAT'', and
notes in the header that the exposure is a calibration flat field.
(Equivalent to the old "goflat", which still exists for old-timers.)
- repeat n XX m
- Repeats n times CCD command XX.
XX can only be one of these: total, dark or flat.
Argument m is the desired exposure time for XX. For example:
"repeat 7 flat 10" will acquire 7 10-second exposures
labeled FLAT (see above). Notice that
there is no feedback on the repetitions in the Telshell window, although
ntcs will show information about each exposure as usual.
- obs
- Prompts for a name and an exposure time (in seconds).
Performs a fast CCD clear, opens the
shutter for the specificed exposure time, reads out the CCD and stores
a fits file with the data.
Information contained in the comment block is automatically stored in the data
header.
- go [ n ]
- Performs a fast CCD clear, opens the shutter for time n.
The shutter will then close, BUT no storage occurs, so this command
will work for multiple exposures in one frame.
- abort
- Stops the current exposure (no readout)
or sequence of repeat commands.
- dstore
- Reads out the CCD and stores the image on disk. Use after ccd gowait to
store file.
- clear [ n ] (alias cc)
- Clear charge from the ccd n times
- comment
- puts you in the comment editor. If a change is
made, the updated info is stored as comments in the next fits file header.
- object name
- gives the next file a name, puts that name
in the FITS keyword OBJECT. This is already done if using catalogs.
- setcom kepccd Object name
- Puts that name
in the comment file field Object, but does not set the File name or
FITS keyword Object. Allows for two levels or Object reference.
To Table Of Contents
Comment Editor
The comment block can be edited by typing the command comment.
Here's how the comment-editing window appears:

When the window appears, move the cursor to the right side of the window
where the changeable parameters are. On the 1.2m, the coordinates, airmass,
times and filter are transferred from the telescope computer, so the only
things you might want to enter are a secondary object name, your name
and the weather conditions.
To Table Of Contents
Telescope and Top Box Control
The TCS window allows control of the movement of the telescope, telescope
focus, top box filter wheel and guider functions. It also displays the
current telescope position, focus and filter position, and telescope times
if the PC communication is on (set by clicking on the PC Comm button).
For a more detailed listing of the use of this window, see the
TCS manual . Here is a sample TCS window
that was captured while guiding:

- Filters
- Filters can only be loaded by Wayne, Ted, or other qualified people.
To move to a particular filter, simply click the left mouse button on that
filter button. The longest time required move to a filter is 15 seconds,
for a 4 position move. The filter currently over detector is displayed in
the TCS window. You should blow the dust off the filters using a canister
of dry air before your run begins, or perhaps even every afternoon. There
is an access port that makes this easy.
We have 4" UBVRI, Sloan and narrow-band
filters. Note that our
2" filters vignette at the edges of the CCD field, in a curious
way that causes astigmatic star images. NOT recommended with Keplercam.
- Telescope Focus
- Telescope focus uses the hexapod under control of the TCS program
on flwo48.
To change the focus manually, click the left mouse button on the
TCS Focus Move button. A smaller window will pop up with buttons for
movement in or out. The movement step size can be changed with the Focus Set
button. Larger numbers increase
the separation between the primary and secondary mirrors. The focus
position is displayed in the TCS window, and is stored in the data header.
The rate for focus changes is about 0.02 mm/sec (a typical change is
about 0.02 mm).
For instructions on how to measure and set the focus
with Keplercam, please follow this link.
- Slewing
- Use the TCS New Coords button to enter your next position, using
spaces or colons to separate h:m:s and d:m:s. The epoch
may be omitted, in which case 1950.0 will be used. The coordinates may also
be selected from a catalog (see the TCS manual).
Once coordinates are loaded, then click on the Slew Enable button. The
STOP button will abort a move or a new coords command, but hitting
the cancel button on the DFM rack is faster.
- Other Features:
- One can also offset the telescope from the present position an arbitrary
number of arcsec, change the track rates, set the time, and basically do
all of the TCS functions from the Telshell window as well as the TCS window
via special commands. See the TCS manual) for details.
The Telshell window also allows script control of the system, see the
Telshell Users Guide for further information.
To Table Of Contents
Telescope Focusing
To measure and set the focus, use the kfindfwhm script. It
is fully automatic, estimates the focus, sets it, estimates the
seeing, and records its results along with mirror temperatures to a
file we use to monitor the seeing.
The telescope focus changes with outside air temperature in a
predictable way (more at the
seeing link).
After slewing to extreme hour angles, the focus
may also change. If you see unusual changes in focus values, please
report that in detail, in the nightly logs.
You may also use the ancient, manual style of focusing the telescope,
as we describe here.
Guider Focusing
After focusing the telescope, put the guider on-axis, then in the guider's
acquire window adjust the focus value. The guider will remember ANY
change to the guider focus while on-axis, and store this to calculate
off-axis focus.
If the telescope focus was correctly set, you only need to change
the on-axis guider focus once. When the telescope goes out of focus,
just refocus the telescope, and the guider will be back in focus. Note
that changing the guider focus while guiding will stop the guiding.
To Table Of Contents
Scripts
The Telshell window allows many manual commands to be automated. For instance,
scripts have been written that will execute a sequence of commands
that will take flat field exposures in various filters. Likewise, scripts
can be written to move to a standard star and take exposures in several
filters. Check the scripts subdirectory in the observer directory for
sample scripts. For details on writing your own scripts, go to the
Telshell Users Guide for further
information.
It is not easy to kill a script, for the shell is occupied during the
script and will not accept commands like "kill". Typing CNTRL-C during
readout will sometimes kill each exposure individually, and thus is
useful if there are only a few exposures left. Otherwise, you must kill
the Telshell window (using the 3rd mouse button to bring up "Destroy
Window"), and then restart the Realtime system. This problem may be avoided
by putting in 5 second delays between each sequenced exposure in the
script used, during which
time one can type a CNTRL-C which will kill the sequence.
To Table Of Contents
Dome or twilight flats
Click
here for instructions.
To Table Of Contents
Data Archiving
Use unix tar in the data directory. The data are also archived
automatically via ftp to CfA in Cambridge. However, the CF does not
back up the archive in Cambridge to tape; only "snapshot" short-term
disk backups are available. To preserve your data, you may also want to
backup your files to tape at the CF. Please ask the staff for the name
of the directory.
- To write to a new DLT tape (and rewind when done)
use: tar cvf *.fits /dev/st1
- To write to a DLT containing files (positioned
at the end of the tape) use:tar cvf *.fits /dev/nst1
- To find the status of the DLT without rewinding it, use:
mt -f /dev/nst1 status
- To advance the DLT to the end of recorded data, use:
mt -f /dev/nst1 eom
- To use a DDS4 DAT, substitute st0 for st1 above.
To Table Of Contents
Purging Files
Eventually, you may need to remove your files from disk, either because
you are running out of room, or your run is over. To check the data disk
space available, in an xterm window enter the command df /rdata
(/rdata is the remotely
mounted disk from kepccd), which will produce the output:
Filesystem 1K-blocks Used Available Use% Mounted on
kepccd:/data 307663800 166030328 126005040 57% /rdata
and note the space available on the data disk, about 120 gigabytes
in this example.
The Iraf command to delete FITS files is imdelete. You may
wish to edit the parameter file for imdelete (epar
imdelete) to turn on its safety measures against accidental
deletion.
You can also use delete or rm for most
files including FITS files, and unix rmdir for directories.
Your data will be subject to deletion the afternoon following your
last night of observing. However, if there is ample space to start
your run, you might request postponing such deletion until it becomes
absolutely necessary (especially on weekends). You may want to check
the data disk to see what volume of data may be left over from the
previous observer.
To Table Of Contents
Exiting (gracefully and otherwise)
You don't have to logout, but if you want to, first exit the Realtime
system. Type exit in the Telshell window, or use the alias bye. The
windows will go away after a while. If you accidentally get out of the
Realtime system (by typing a lot of CTRL-C's for instance), you can re-enter
by typing gokep (after all windows are gone!).
in the login window, which is the official way to bring up the system.
After exiting Realtime system, you can exit the computer by pulling up
selecting Logout from the KDE (Large K with Gear) menu in the toolbar at
the bottom.
To Table Of Contents
Problems
If the CCD is stuck in the readout, or it produces unusually
noisy or incomplete images you may need to restart the CCD
system on the PC that controls Keplercam (kepccd).
First, however, if INST STAT in the ntcs GUI says "Partial" and nothing
else happens but you still have a response in the Telshell,
try typing "dstore" there, which may complete the stuck readout and
clear the problem.
If that fails or the problem is different,
you do need to take the following steps to restart the CCD:
- Start a vncviewer session to kepccd. On
any xterm, for example on the stelircam monitor, type:
vncviewer kepccd.sao.arizona.edu:1
You will be prompted for a password (same as for observer). A window like this
snapshot
will appear on your screen. If you see something similar to this
view, the system is behaving properly, otherwise
proceed with the steps below.
- From any xterm on flwo48 type:
xterm -e ssh -l restart kepccd.sao.arizona.edu
You will be prompted for the password (same as for observer).
The CCD system is restarted automatically when you
login. Watch the vncviewer window for activity. You should see the top
windows disappear and then reappear as before. The bottom right window will
do the same.
Once the vncviewer window is back to nominal, you should kill the new xterm
where ssh ran (e.g., click on the cross at its top right).
Then you MUST
either enter the command "ccd bin 2" in the
Telshell window, or restart the Realtime
system, which will also issue the command "ccd bin 2" on startup.
- Take a short exposure and verify that it looks normal.
In the unlikely event that the CCD system fails to restart, retry the last few
steps several times. If that fails
you may have to have kepccd
rebooted. At this point that requires intervention
from the 1.5m remote observer (Perry or Mike), or eventually a call to Ted.
If the Telshell window on flwo48 echoes gobbledygook when you type something
sensible, the cause is likely to be an attempt to stop a script while it
is still exposing by typing CONTROL-C at least once.
Another possibility is that tcs just becomes unresponsive on flwo48. Click here
for instructions to recover from either event.
If you get into bad trouble, for example the complete screen locks up on
you and you get no response for several minutes, you will have to
reboot the system. You may also have to do this to restart
after being shutdown because of maintenance work or power problems.
There are two possible ways to reboot:
- If you can still move the mouse (ON FLWO48!)
, access the KDE Logout button, (The K on gears in toolbar)
and select Restart from the logout menu. This will flush all
disk buffers to disk and shutdown as gracefully as possible. If the
computer has been crashing on its own, you may want to power down the
computer at this point (in the computer room), to reset various modules.
- As a last resort ONLY, turn the power off on flwo48, wait 5 seconds,
then back on. The power switch is located on the top of flwo48's case.
Possible file system corruption may occur, as disk buffers
are NOT flushed.
The number 1 method should always be attempted first, but if it won't work
try 2.
Within a few minutes, after a lot of messages, the login window should be back.
To Table Of Contents
Useful UNIX Commands
(aliases are put in parentheses) (arguments inside [] are optional)
ls -l[dirname] (dir) - lists the contents of a directory
rm file (del) - deletes file
mv file1 file2 - renames file1 to file2
cp file1 file2 - copies file1 into file2
cat file - lists the contents of a file
xpp filename - prints file named filename
xterm & - creates another window
vi[filename] - an editor
emacs[filename] - another editor
cd directory - change to directory directory
mail - To read your mail
mail name[@host.domain] - To send mail to user
ssh [user@hostname] - Connect securely to hostname
sftp [user@hostname] - secure file transfer program
Unix device names:
- 4mm DAT (DDS4) tape drive - /dev/st0
- DLT tape drive - /dev/st1
- Postscript Laser printer - lp60
Unix commands can be executed in the Telshell window,
but in general it is better to execute them in the login or other
windows.
It is wise to not use the login window for remote logins or
transfers via ssh or sftp.
To Table Of Contents
Using IRAF
Warning: avoid reducing images on flwo48, especially
if you are not experienced, and least of all during observations.
To learn about processing Keplercam CCD images, visit the NOAO IRAF
FAQ, search
for the keyword "Massey" and select "A user's guide to CCD reductions
with IRAF."
Once you have taken an image, move over to the IRAF window
to look at the data. In that window, type cd; ecl as usual. You
will need to cd to the data directory, for example
cd /kep/2005.0901. Type dimtool for ds9,
*the preferred display method*,
simtool or ximtool, then type flwo48:0 at the IRAF prompt to display on
the monitor. If you are displaying unbinned images,
you may need to change the stdimage in IRAF if you have
changed the default at login: type
set stdimage=imt2048 to view your full images.
If you want to use the left monitor to display images,
there are a few tricks. To use saoimage (ds9), type simtool
(dimtool) as above, but type flwo48:0 to the IRAF prompt. This will
place the saoimage (ds9) window on the left monitor. To use ximtool,
you must find an xterm in the left monitor (to open an xterm, move
the cursor there, and click on the left button). Start up IRAF, type
ximtool, and answer flwo48:0 to the prompt. You can now display
images from either that IRAF window, or one on the right monitor.
You may use mscdisplay (in the mscred package)
to display images, e.g., type "mscdispl 0004.M31 1." You must
first start ds9 or equivalent from the IRAF prompt, as above. The task
mscexamine supposedly
allows one to examine them (like imexamine but for
mosaics). Unfortunately, mscexamine appears to be unreliable:
it reports wild x,y pixel coordinates and erratically
dies with the message
"ERROR: invalid floating point operation."
Another approach is to
use imexamine on individual frames (see below for an
example). If you use ds9 you also have the option of loading the array directly
into it (use "File" menu, then "Open Other" then
"Open Mosaic IRAF..."), imexamine will work on the full array.
Make sure you have set stdimage=imt2048 (the default). Note: this all
works only if you have started up ds9 from IRAF, not standalone.
Other mosaic
commands can be found in the package "mscred" (loaded at startup).
Warning. A "feature" of mscred is that pixel coordinates are always
displayed in detector units, in this case one unbinned pixel. Thus, if you
take binned data, and use mscdisplay or mscexamine, the pixel values
shown in your imtool (ds9, saoimage, ximtool) and in your fwhm
from radial profile fits will seem to be twice as big as they
actually are. Note: in ds9, the WCS values are absent when the
images are displayed from IRAF. To avoid this annoyance and
those above, you should load your images directly from ds9, as described
above.
Single frames can be displayed thus: "display 0001.M31[1] 1", for example.
This method
is sometimes more useful since the pixel
coordinates displayed do reflect reality.
Many other commands can be executed on these files by using the image
extension value [1]-[4].
Help can be found in the TDC web page
in its "Data Analysis Software" section.
Click on saoimage's Color menu button and you will
enable the lookup table, altered
by holding a mouse key down and then moving the mouse.
The most useful iraf packages for analyzing your image are imexamine
or mscexamine
which place a cross shaped cursor on the image, allowing line and
column plots (l or c keys),
and radial profile plots of stars (r key).
These graphs will come up in a separate graphics window. Use
q to exit imexamine. The implot package also comes in handy.
If for some reason another saoimage, ds9 or
ximtool is still running, IRAF will not display in the new one.
If you suspect this has occurred, as evidenced by
display not doing
anything, go to the main login window and type ps auxw |grep -i
saoimage, ps auxw |grep -i ximtool or ps auxw |grep -i
ds9. Kill any processes named saoimage, ds9 or
ximtool with command kill -9 procnumber, then try
simtool, dimtool or ximtool again. If it won't
let you kill them (not owner), use godown to reboot.
Hardcopies can be printed by going to the etc menu, and clicking
on print.
To Table Of Contents
Reducing your data with mscred in IRAF
It is best to perform the necessary debiasing and flatfielding
of the Keplercam data with IRAF. You should use tasks in the IRAF package
mscred.
Within IRAF, type "help mscred" and "help mscguide" for detailed instructions
on the tasks you'll need to master.
The data archive of Kepler images is located on CF machines at /data/kepler/Archive/rawdata/kepcam. For further information about the archive please contact Bill Wyatt at CFA.
Once you've settled in your office with a nice thermos of piping hot water
for your mate, inside IRAF you should type a sequence like this one:
cl> cd your.data.directory
cl> mscred
mscred> zerocombine *BIAS.fits
mscred> flatcombine *FLAT*.fits
mscred> ccdproc *your.object*.fits
Some examples of parameter values for the 3 tasks to use for
reductions are here.
You may need to tweak some of these for your version of IRAF.
Once you have reduced your data, you will undoubtedly wish to analyze it.
A complete discussion is beyond the scope of this document, but you
may find the following items useful:
- You may need to assemble your 4 extensions into a single view.
One approach is to use the IRAF package
mscred and the task mscjoin therein.
- You may need astrometry beyond what the
WCS in each image provides. Please visit the
TDC WCStools page
for detailed information on refining your astrometry.
- You may need photometry of many objects in your fields.
A good package to use is SEXtractor, described in the
TDC SEXtractor
page, or resort to
IRAF daophot.
To Table Of Contents