User's Guide for the UH 8K CCD Mosaic Camera

G. A. Luppino, Mark Metzger
Revised: September 5, 1996

A PostScript version of this document is available.

1 Introduction and General Properties

   The UH 8K CCD Mosaic Camera was designed and built to be used at the CFHT prime focus and occasionally at the UH 88-inch f/10 focus. The camera was built at the University of Hawaii, Institute for Astronomy Detector Laboratory by Metzger, Luppino and Miyazaki (see Metzger et al. 1996, PASP, submitted) in 1995 and saw first light at the CFHT in March 1995, and on the UH 88-inch in Aug 1995. The camera is now available to observers at the CFHT and UH 88-inch telescopes. This document describes the instrument and serves as an observer's manual. The remainder of this section lists the global properties of the instrument.

2 Data Acquisition

2.1 Getting Started:

2.2 Using mcdcom

                    MCDCOM COMMANDS

cd directory               Sets working directory where data will
                           be stored. This will need to be changed
                           periodically during the night as disk
                           partitions fill up with images.

?                          Lists mcdcom commands and syntax.

mosaic full                Downloads DSP code to CCD controller to
                           read out the complete mosaic -- unbinned.
                           The command should be executed whenever you
                           first enter the program or whenever the
                           controller electronics are reset (e.g. by
                           hitting the reset buttons or power cycling).

mosaic bin                 Downloads code to read full CCD mosaic binned 2x2.

mosaic bin4                Downloads code to read full CCD mosaic binned 4x4.

mosaic focus               Sets up for focus sequences. Downloads code
                           to read out the top half of chip 1 
                           (2048 x 2048 unbinned). 

mosaic find                Sets up for reading out top half of chip 1
                           binned 2x2. Only 30s readout time. 

object inttime name        Sets up normal exposure for an OBJECT.
                           Sets integration time to inttime.

flat inttime name          Same as object, but enters FLAT keyword into

dark inttime name          Sets DARK keyword. Disables shutter operation.

clear                      Flushes (erases or clears) charge from the
                           CCDs. Must be executed before a set of
                           focus plate exposures (see below).

go                         Initiates the exposure. ``go'' does different
                           things depending on the mode (e.g. object
                           or focus).
                           For example, go will do following: 
                             if ``object'' mode: 
                               - erase (or flush) CCDs
                               - open shutter for inttime seconds
                               - readout CCDs
                             if ``focus'' mode (see below):
                               - open shutter for inttime seconds

go n                       Takes n consecutive exposures.

focus inttime name         Mode for doing ``focus plates''. Observer
                           must first clear the CCDs using ``clear'',
                           then each time ``go'' is typed, the
                           shutter will open for inttime seconds.
                           Between exposures the observer should
                           adjust the focus by some increment, and
                           offset the telescope (by, say 10 arcsec).
                           When the desired set of exposures are
                           completed, the observer types ``rm'' to 
                           read mosaic manually (although only the 
                           top half of chip 1 will be read out).

Cntl-C                     Interrupts an exposure. Observer can
                           then manually readout the CCDs (rm),
                           resume exposure (go), or abort exposure
                           (simply flush the CCDs with clear and
                           start over).

et inttime                 Will change the exposure time (e.g. you
                           can modify the desired exposure while
                           within a paused state).  Time is in seconds.

fn frameno                 Sets CCD frame number (note: current frame
                           number is always shown in the prompt).

fp name.                   Sets frame prefix name. Files are written 
                           out as 8 separate FITS files:

filter n                   Changes filter slide to filter 0 or 1.
                           Note: upon reset or power cycling, the
                           filter slide will reset to position 1
                           but the computer will not know this.
                           After reset, explicitly set filter

telescope [command]        Send telescope command or
                           display current TCS information.

status                     Displays CCD readout status (e.g. binning,
                           readout type, frame size, etc.).

wf [file]                  Manually write file to disk. This is
                           needed of you run out of disk space while
                           writing to disk. The image is not lost,
                           it is stored in memory. You can change
                           directory within mcdcom (cd),
                           and then write the file out in the new
                           directory using wf. Note there may remain
                           a partially written set of files with the
                           same name in the old directory.

source script [line]       Will execute a set of commands listed
                           in file script. Useful for doing darks.

OTHER COMMANDS (output of the help ? command):
quit                       Quit
diag command [args]        Access diagnostics
ii                         Re-init I/O
device n                   Set current I/O device to #n
sync                       Resync communications
ll 'file'                  Read DSP code .lod file
dl                         Download DSP code
pl                         Print DSP code
df 'file'                  Read DSP file and download
dm                         Download full mosaic code
rm                         read mosaic
rc [Xnx Xny]               read CCD
iraf                       Toggle IRAF output format flag
idle                       Put camera in idle & recalibrate
ep seconds                 Set precise exposure time
set var [val]              Set variable
unset var                  Unset variable
clear [num]                Clear (wipe) CCD
sf                         Set format of CCD readout
auto                       Set automatic action
name objname               Set object name
comment comment            Set comment in FITS header
shutter (open|close)       Command shutter
bias                       Setup for bias
comp                       Setup for comparison
sound                      Toggle fancy sounds
drift                      Do drift scan
video [recd]               Shutterless Video
vexpose [exp]              Set video time
utility cmd [addr [value]] Send utility board command
istat                      Compute simple statistics

3 Quick Look Analysis:

The CCDs are read out as 8 separate FITS files with suffix 0-7. Their relation to each other in the focal plane is shown below.

                   8K MOSAIC LAYOUT

                |       |       |       |       |
                |       |       |       |       |
                |   2   |   3   |   5   |   4   |
                |       |       |       |       |
                |       |       |       |       |
                |       |       |       |       |
                |       |       |       |       |
                |       |       |       |       |
                |   0   |   1   |   7   |   6   |
                |       |       |       |       |
                |       |       |       |       |
                |       |       |       |       |

   * ==> readout amplifier => pixel (0,0)

   Note: When displayed separately, chips 2,3,4,5 will appear 
         ``upside down'' as compared to chips 0,1,7,6.

There is only limited quick-look capability. The observer must avoid trying to do too much on stego during an observing session. If too many memory intensive processes are running, the camera may lose data during a readout. It IS safe to have a few windows open, and to be writing data to one or both tape drives. However, it is NOT SAFE to launch an IRAF session or run SAOimage, for example. If possible, it is preferred that the observer use another computer (e.g. wiki at CFHT) to look at the data using her/his favorite display tool (e.g. SAOimage). The files can be ftp'ed to the wiki disk or, preferably, the stego disks are crossmounted onto wiki (the usual situation). If it is not possible (or very inconvenient) to inspect the data on another workstation, it is possible to do limited analysis on stego using the program mora. mora is started by typing mora at the unix command line and then commands are issued within the program environment. Images are read into buffers (at most, only two buffers should be used to keep memory use to a reasonalble level) and operations are performed on these buffers (e.g. arithmetic, display, psf analysis, etc.). A limited set of useful commands are listed below:

             Brief summary of MORA commands:

?                                Lists mora commands and syntax.

rd 1 filename us                 Reads fits file into buffer 1.
                                 us flag ensures data is read in
                                 unsigned format.

cvt 1 1 r4                       Converts buffer 1 to r4 -- needed for
                                 interactive photometry to measure

tv 1 lo high [flag]              Displays buffer 1. Stretch will be
                                 linear between lo and high unless
                                 flag specifies an alternative
                                 stretch (e.g. sqrt or log).

iphot                            Allows interactive measurements from
                                 image displayed by tv. Must be in r4
                                 format. The following commands are
                                 useful (cursor must be in image
                                     x    (prints stats of star --
                                           psf is lower left number 
                                           [you may need to toggle the 
                                     1 2  (prints stats in box defined 
                                           by pressing 1 at upper left 
                                           corner and 2 at lower right
                                     ?    (prints list of commands).
                                     e    (exits iphot)
OTHER COMMANDS (output of the help ? command):
history <> Show History
rfits <buf filename> Read FITS file
wfits <buf filename> Write FITS file
cd <dir> Change directory
ls <[opts]> List files in current directory
% <command> Execute shell command
@ <macro [opts]> Execute macro
end <> End macro
echo <[on|off]> Macro echo
cvt <buf1 buf2 conv> Convert type
create <buf typ size=nx,ny> Create blank buffer
buflist <[buf]> List buffers
head <buf> Show FITS header
fedit <buf [field code data]> Edit header entry
rm <b1 [b2...]> Remove buffers
copy <b1 [b2] [opts]> Copy buffer
box <[box# [x1 x2 y1 y2]]> Show/set box
aimage , si, mi, di <b1 b2 [b3]> Image arithmetic
aconst , sc, mc, dc <b1 [b2] const> Image arithmetic
trans <b1 [b2] [sqrt] [box=] > Transcendental functions
stat <buf> Image statistics
hstat <buf [opts]> Image histogram
debias <b1 [b2] [opts]> Debias image
flat <b1 b2 [b3] c1=x [opts]> Flatten b1 with b2
shift <buf nx ny> Offset image
tv <buf [range] [opts]> Display image
mark <> Mark image
psf <buf [opts]> Create PSF
genpsf <buf> Generate artificial PSF
iphot <> Interactive photometry
cscale <buf bufref [opts]> Scale one image to another
czap <buf1 ... bufn [opts]> Zap bad pixels in scaled image set
cadd <buf1 ... bufn bufd [opts]> Add scaled zapped images
cmed <buf1 ... bufn bufd [opts]> Median scaled zapped images
clip <buf [bufd] [lo=X] [hi=X] [band]> Clip data in image
filter <b1 bfilt [b2] > Filter image
map <b1 [b2] [box=] [boxd=] > Map image
mapmos <b1 [b2] [box=] [boxd=] [bb] map=> Map mosaic
quit <> Quit

4 Writing Tapes:

The observer can write images in any /local/uh8k* partition (/local/uh8k1, /local/uh8k2, ... /local/uh8k10). Each partition is 1.9 Gbytes. At CFHT, these directories are also visible from machines wiki and neptune.

There are 2 tape drives available on stego: a DAT and an Exabyte.

NOTE: These two devices are symbolic links to the correct /dev/nrst? devices. If you want to use exabyte compression or a version of a device that rewinds after an operation, list the links (for example, ls -l /dev/exabyte) and then check the man page for st for help on calculating device numbers.

For ease in accessing the images from tapes, we recommend writing each 8K group of images as a separate tar file. For example, the following command(s) writes filename.num.0 through filename.num.7 to the Exabyte (DAT).

        % tar cvf /dev/exabyte  filename.num.?  
        % tar cvf /dev/dat  filename.num.?  
Two csh scripts are provided to spool images off to tape, with each group of eight written as a single tar file. The scripts are wdat and wexa. The csh script for wdat is shown below:

# Usage: wdat startfile endfile rootname
set start=$1
set end=$2
set name=$3
set i = $start
setenv TAPE /dev/dat
while ( $i <= $end )
        set num=`awk 'BEGIN {printf "%03d\n",'$i'}' </dev/null`
        echo tar cv $name.${num}.?
        tar cv $name.${num}.?
        @ i++
To use this script, the observer types wdat followed by the starting and ending file numbers followed by the root name (all the files must have the same root name). For example:
        % wdat 003 035 ccd
will write all the files between ccd.003.? to ccd.035.? to the dat drive with each group of eight as a separate tar file. wexa works in the same manner.

5 Data Analysis Tips:

6 Software Support Tips:

7 Troubleshooting:

In general the instrument works reliably. There are a few places, however, where failures are more likely to occur. We identify the know problem areas here: Should insurmountable problems occur, or if there is ever any risk to the instrument, please contact:

         G. Luppino        off:  808-956-6365
                           lab:      956-7515
                          home:  808-739-5686
                         email: ger@hokupa.ifa.hawaii.edu

         Mark Metzger      off:  808-956-8701
                           lab:      956-7515
                          home:  808-533-0741
                         email: metzger@tiro.ifa.hawaii.edu

         Hubert Yamada     off:  808-956-6648
                           lab:      956-7515
                         email: yamada@galileo.ifa.hawaii.edu