MDM's facility CCD cameras are controlled using Leach GenI controller electronics, operated from Sun Sparcstations using the ccdcom package. When ccdcom is started up it will initialize communications with the parallel interface, allocate memory into which to read CCD images, and read enough from the DSP memory to get an idea of the status of the DSP code. ccdcom will try to determine whether the DSP is running the default code from ROM (which will not work for any of our CCD's), and will inform you if you should download appropriate code. ccdcom also initializes itself for CCD readout size and binning parameters from the numbers it reads from the DSP, so ccdcom can be terminated and then restarted without disturbing the DSP.
Currently five facility CCD cameras at MDM are operated using ccdcom:
ccdcom recognizes a number of commands. Any unique abbreviation will work, and ccdcom will prompt you if you enter an ambiguous command. When you first start ccdcom you should be aware of two self explanatory commands:
After power-up or a hardware reset of the CCD electronics, you will need to initialize the DSP processor in the Leach electronics because its cold-reset state does not know how to readout any of the MDM CCD cameras.
To initialized the DSPs for your CCD, you need to read in a file of compiled DSP code and then download it to the DSP. This must be done each time the power is cycled or the DSP box is reset. Note, however, that you do not need to re-load code to the DSP if you exit and re-start ccdcom, since the DSP runs independently. If the power to the box been turned on or cycled, you will also need to initialize the utility board to start the temperature regulation (see the utility board commands below).
setenv LODPATH .:./mydspcode:/opt/local/pkg/ccd/dspExamples:
df wilbur (Current DSP code for Wilbur)
df charlotte (Current DSP code for Charlotte)
df nellie (Current DSP code for Nellie)
ll /opt/local/pkg/ccd/dsp/wilbur.lodNote: the DSP assembler code in a .asm file is compiled by the a56 compiler into binary code stored in a .lod file. For example,
ll /opt/local/pkg/ccd/dsp/charlotte.lod
a56 mdm2048will read and compile the asm file "mdm2048.asm" and write the lod file "mdm2048.lod".
Observers will never have to compile .lod files, they are already pre-compiled and ready to go.
The default mode is safe mode disabled. This command is new since version 1.26 of ccdcom.
An example of a typical startup session with the CCD named templeton would be:
df templetonThe util init command needs to be run whenever the CCD is being started up the first time, or when the power has been cycled on the CCD system (e.g., after a power failure). The safe command issued at the end locks down the df, dl, and ll commands so you don't accidentally wipe out any subsequent CCD format setup you do with the sf command.
util init
safe
The Leach utility board is used to regulate the CCD temperature. In order to use it, you must download DSP code which will talk to the utility board (currently wilbur, charlotte, and nellie). The commands provided in ccdcom for using the utility board are all of the form
utility xxxas follows:
Utility board status:The CCD temperature is -90 C, and the heater is maintaining it there by application of 24% of its maximum voltage (6% of its maximum power of 4 W). The temperature inside the electronics box is 37 C. We do not use the utility board for exposure timing, so that part of the display is not useful.
+40 V at +40.1 CCD temp at -89.9 Elapsed time 0.000
+15 V at +15.3 CCD set temp at -89.9 Requested time 6.000
-15 V at -15.0 Electronics temp at +37.4
+5 V at +4.87 Heater percentage 24 Heater rate 0x1000
First, the commands which tailor the sequence that will be executed by the next go command are given. Not all of these steps may be taken by a particular command, and the actual sequence executed depends on how the "automatic actions" are set, as described below.
There are a number of ways to set the parameters which govern what ccdcom does. Six commands are available which can be used to set integration time, object name, object type (a FITS header item), and default automatic actions. None of these does anything more than setting parameters to be used later.
Setup the Type of Image to Take
There are six commands that define the type of image to be acquired:
#wipe Shutter ReadoutExamples:
1 on on
object 300 N3031 (set integration time to 300 sec
and object name to N3031)
object 0.18 (set integration time to 0.18 sec
and keep the object name unchanged)
object (set image type to object, leaving
integration time and name unchanged)
#wipe Shutter Readout
1 on on
Another command useful in conjunction with taking flats is istat.
#wipe Shutter ReadoutNOTE: "bias" sets the exposure time to 0.0 seconds. If you follow a "bias" with an "object", "flat", "dark", etc. image, you need to remember to set the exposure time!
1 off on
#wipe Shutter Readout
1 off on
#wipe Shutter ReadoutThe procedure for a sequence of focus images of 10sec each is thus
0 on off
focus 10 beginning focusA single image will be readout with the N separate focus images.
[first telescope focus setting...]
go
[second focus setting, offset telescope...]
go
...
[last focus setting, offset telescope a bigger step to mark it]
go
rc
#wipe Shutter ReadoutExamples:
1 on on
comp 1.0 Hg-Ne (set integration time to 1.0 sec and the object
name to Hg-Ne)
comp (set integration time and name to last comp values)
"name" is a potentially confusing command. It only changes the object name loaded next into the image header, irrespective of the names that are associated with each of the six image types (object, flat, comp, bias, dark, and focus). If you use "name", the next commands can only be "et" (or "ep") to set the exposure time, and go to start an exposure. If you follow "name" with any of the image type commands above, the object name set by "name" will be deleted and substituted with the object name associated with that image type. Confusing? Yes. If you don't like this, try not to use "name".
The automatic actions are:
Set Exposure Time & Readout Format
These commands are used to set the exposure time and the CCD readout format (binning, overscan, and subregions).
In general, "ep" is rarely used.
sf binx biny skipx skipy readx ready overscanIf you type "sf" without arguments, you will be prompted for each of the 7 inputs.
NOTE: "sf" uses the convention that locations are specified in terms of unbinned pixels, and numbers of pixels to be read are specified in terms of binned pixels. Examples (for a 2048x2048 CCD):
sf 1 1 0 0 2048 2048 32 - read full, unbinned 2048x2048 + 32 bias
sf 2 2 0 0 1024 1024 32 - read full, binned 2x2 + 32 bias
sf 1 1 512 512 1024 1024 32 - read 1024x1024 subimage centered on the CCD
sf 4 4 1024 1024 256 256 32 - read upper right quadrant of
the CCD binned 4x4 pixels
ccdcom creates filenames of the form:
prefix###.fitswhere
prefix = text string prefix (e.g., ccd, bias., 20001214, etc.)The file prefix may end with an optional ".", to make files like
### = 3-digit running file number assigned by ccdcom, starting
with 001
.fits = FITS file extension ("suffix"), which identifies the
file format to IRAF, XVista, etc.
prefix.###.fitsThe choice in the filename syntax is up to the tastes of the observer.
Each of the three elements of the ccdcom FITS filename is set by the commands below:
foo.###.fitswith a dot (.) separating the prefix from the file counter, use
fp foo.noting the "." at the end. Otherwise, filenames of the form
goo###.fitsare created by using
fp goowith no "." at the end.
Note that if you have to quit ccdcom and restart it, the file prefix is reset to "ccd." automatically. Beware!
ccdcom uses the current file number as a prompt ("###>"), and automatically increments the file number as each file is written.
Important!
If you quit and then restart ccdcom, it will reset its internal file counter to "001", which could overwrite earlier images. You will need to reset the file counter to the correct sequence number using "fn" (and also "fp" if required) before taking new data.
Miscellaneous Exposure Commands
Frame: 002 File prefix: 'ccd.' File suffix: '.fits'This shows that the next image (if you were to type go next) will be a bias image named "Beginning Bias" which will be written to a file named "ccd.002.fits".
Format: origin (0,0), size (2048,2048), binned 1x1, 32 bias
Object name: 'Beginning Bias' type BIAS
Exposure: Set 0.00, Total int. 0.00 (Unix)
Autowipe: 1, shutter off, readout on, write on, idle off
Specifically, this the FITS header parameter BZERO is set to 32768, and the image is written as a FITS-standard 16-bit integer data file. IRAF et al. use the value of BZERO in the FITS header to restore the pixel values to those provided by the camera.
By contrast, the old "not IRAF" format images stored pixel data as unsigned 16-bit integers, resulting in a non-standard FITS format image (a "ushort" image in IRAF parlance) that most FITS readers cannot read without special handling.
By default, "IRAF" format is assumed so that no additional processing will be required to display/analyze raw ccdcom images with IRAF, XVista, or whatever. You must explicitly issue the "iraf" command to switch back to the old format. We do not suggest this unless you have very good reasons for writing your data as non-standard unsigned integers.
NOTE: This is a change from previous versions of ccdcom. As of 2000 July 15 the default is IRAF format.
When you are ready to begin an exposure, issue the "go" command:
An exposure which has been started with "go" and Unix timing (et) may be interrupted by typing "Ctrl+C". This will close the shutter and return you to the ccdcom command level. You can then alter any parameters while the exposure is paused. For example, you can
You can also resume the exposure (or not) in a number of ways:
go 5will take five exposures with the current parameters one after another.
Note that istat works on the current image stored in the camera memory; it does not work on previous images that have long since been written to disk.
clobber/noclobberThe "clobber" and "noclobber" mode names set or unset the "clobber" flag, which prevents ccdcom from overwriting an existing file,
fits/nofitswhich sets whether or not the .fits suffix is added to output FITS files (e.g., as in the fits command),
iraf/noirafsets whether or not files are written in the default FITS-standard integer format (short), or the old-style non-standard FITS unsigned integer (ushort) format (e.g., as done by the iraf command
safe/nosafewhich sets or unsets the observing safe mode.
Examples:
set noclobber - don't overwrite existing files [default]
unset clobber - same
set clobber - silently trash existing files
set iraf - make standard FITS integer files [default]
unset iraf - make old-style unsigned FITS
set fits - add .fits to all output images [default]
unset fits - suppress adding .fits (old-style)
set nofits - same
unset safe - disable observing safe mode [default]
set nosafe - same
set safe - enable observing safe mode
A source file can invoke another source command, but source will not return to the original file when it finishes the second file (there is no way to "return" from the second source file). However, tail recursion does work (i.e. "source bingo" can have "source bingo" as its last line, creating an infinite loop which you interrupt with Ctrl+C as usual.
A common use of "source" is to create one-line source files containing the sf command to setup a particular CCD format. For example, you might have two source files, one named "small" to set a 1024x1024 subregion in the middle of a 2048x2048 CCD:
sf 1 1 512 512 1024 1024 32and another named "full" to restore the full-frame readout:
sf 1 1 0 0 2048 2048 32You would then type
source smallto set the CCD to the subframe readout, and
source fullto restore full-frame readout.
The telescope command explained below is helpful in making useful macros. Note that ccdcom reads and executes the source file line by line, so don't change the file while ccdcom is executing it!
telescope <[command [args]]>The various possibilities for "command" and "args" are as follows:
Note: At the 1.3m, the remote finder mirror control is broken, and operated by a manual toggle switch in the control room.
The following is a sample FITS header produced by ccdcom:
SIMPLE = T / STANDARD FITS
BITPIX = 16 / BITS/PIXEL
NAXIS = 2 / NUMBER OF AXES
NAXIS1 = 1056 / NUMBER OF COLUMNS
NAXIS2 = 1024 / NUMBER OF ROWS
BSCALE = 1.0000000E+00 / PHYSICAL = BSCALE * DATA + BZERO
BZERO = 32768.
DATE = '2006-02-13' / UT Date of file creation (CCYY-MM-DD)
ORIGIN = 'ccdcom v1.31.2' / FITS file creator
OBSERVAT= 'MDM ' / Observatory Site
LATITUDE= 31.9500 / Latitude (degrees N)
LONGITUD= -111.6150 / Longitude (degrees E)
TELESCOP= '2.4m Hiltner' / Telescope used for observation
INSTRUME= 'Direct + Echelle CCD' / Instrument used for observation
FRAME = 1 / Frame number of observation
CCDPICNO= 1 / Frame number of observation
OBJECT = 'test ' / Name of object
IMAGETYP= 'OBJECT ' / Type of observation
EXPTIME = 1.001 / Integration time (seconds)
DARKTIME= 4.102 / Dark current time (seconds)
TIMESYS = 'UTC ' / Time System
DATE-OBS= '2006-02-13' / UTC Date of observation (CCYY-MM-DD)
TIME-OBS= ' 21:59:49.00' / UTC at start of exposure
JD = 2453780.416539
RA = ' 00:09:23.68' / Telescope RA at Equinox
DEC = ' 31:56:09.64' / Telescope Dec at Equinox
EQUINOX = 2006.112 / Equinox of RA and DEC
HA = '-00:00:51.95' / Hour angle at start
ST = ' 00:08:31.72' / Sidereal time at start
ZD = ' 00:11:03.22' / Zenith distance (degrees)
AIRMASS = 1.000 / Airmass at start
FILTPOS = 7 / Filter Wheel Position
FILTER = 'GG420 ' / Filter ID
GPROBE = ' 13067.00 4000.00' / MIS Guide probe X Y
COMPLAMP= 'Flat Hg-Ne ' / MIS Lamps illuminated
GAIN = 2.700 / Nominal gain (e-/ADU)
CCDBIN1 = 1 / On-chip column binning (fast dir)
CCDBIN2 = 1 / On-chip row binning (slow dir)
ROTANGLE= 1.01 / Rotation angle (deg)
TELFOCUS= 861 / Telescope focus
GPROBE = ' 4337.00 3647.00' / Guide probe X Y
DATASEC = '[1:1024,1:1024]' / Image area of frame
CCDSEC = '[801:1824,513:1536]' / Image area relative to full chip
BIASSEC = '[1025:1056,1:1023]' / Overscan area of frame
END
We follow the IAU standards for denoting time in the headers as ISO-8601 format date and time specifications. The relevant header keywords are:
TIMESYS = 'UTC ' / Time SystemThese refer to the time at the start of exposure, and are based on reading the system time clock just before opening the shutter. Times are always expressed in UTC. The computer system time is synchronized to the Kitt Peak mountain GPS time server, and should give start times accurate at the 1-2 second level. Not much more accuracy than that is possible without specialized timing hardware for the ccdcom shutter system. The Julian Date (JD) is computed from the UTC time at start of observation.
DATE-OBS= '2006-02-13' / UTC Date of observation (CCYY-MM-DD)
TIME-OBS= ' 21:59:49.00' / UTC at start of exposure
JD = 2453780.416539
Before each image, the TCS is queried to get basic pointing information, stored as the following keywords:
RA = ' 00:09:23.68' / Telescope RA at Equinox
DEC = ' 31:56:09.64' / Telescope Dec at Equinox
EQUINOX = 2006.112 / Equinox of RA and DEC
HA = '-00:00:51.95' / Hour angle at start
ST = ' 00:08:31.72' / Sidereal time at start
ZD = ' 00:11:03.22' / Zenith distance (degrees)
AIRMASS = 1.000 / Airmass at start
ROTANGLE= 1.01 / Rotation angle (deg)
TELFOCUS= 861 / Telescope focus
At the 2.4m, the TCS only reports RA, DEC, EQUINOX, ROTANGLE, and TELFOCUS. All of the other quantities (HA, ST, ZD, and AIRMASS) are computed from the time and position info. At the 1.3m, the header will store only a placeholder for ROTANGLE.
The relevant instrument configuration info for your setup is stored as the following keywords:
FILTPOS = 7 / Filter Wheel PositionFILTPOS records the filter wheel position, which takes values of 1 through the max number of filter slots, FILTER records the filter ID of this filter, defined in the telescope config files when your instrument is setup (for the MIS, this should be the same as the filter ID given on each of the filter-select buttons on the xmis control panel).
FILTER = 'GG420 ' / Filter ID
GPROBE = ' 13067.00 4000.00' / MIS Guide probe X Y
COMPLAMP= 'Flat Hg-Ne ' / MIS Lamps illuminated
GPROBE records the X,Y position of the guide probe (if used). Units are device encoder units. This could help you recover a particular guide star on later observations.
COMPLAMP lists the MIS spectral comparison lamps that were illuminated at the time of the exposure. If no lamps were lit, this header card is omitted.
WARNING:
Neither of these modes has been used much (if at all) since the departure of MIT from the MDM Consortium, and there is no guarantee that they will work with the Solaris port of ccdcom. In fact, nobody could remember how they worked before so we could not test them with the new version of ccdcom as of December 2000. We include them here for historical interest, but suggest you stay away from them unless very curious and willing to spend your own telescope time to test them out.
The DSP is such a flexible way of running a CCD that we are starting to implement new modes of use. It is currently possible to do drift scanning (TDI) with the Loral and STIS chips. Using this mode requires some care and a special configuration; you should contact an old ccdcom expert if you're interested (otherwise that knowledge is arcane and not current). The pertinent command is:
Another optional readout mode is "shutterless video". This is a means of getting a fast readout of a small patch of the chip without using the shutter. The way this works is to select a small area to read out, open the shutter, and
This can lead to ghost images, because the patch loiters down near the serial register while it is being read out, and if there happens to be a bright star in the sky whose light falls on this spot it will create new charge in addition to the charge from the object you were staring at.
It is also possible to get ghost images if your star is located at a horizontal offset from the region which you selected to display. The reason for this is that ccdcom cannot clear the entire serial register and maintain high speed. Thus when ccdcom reads out its little patch it also loads up the serial register with an entire horizontal strip. If a bright star is found in that strip it will eventually show up in the image several frames later when it gets shifted to the amplifier. The quick way to make sure that you are not looking at a horizontal ghost is to move the star to the left across the chip and if no new image appears at the right of the display, you have the correct image. The sure way to ensure you are not looking at a ghost is to read out a complete image in the usual way and make sure that the star is found in the region you are reading out with shutterless video.
Operationally this mode has been used by some experts (e.g., the MIT astronomers who originally introduced ccdcom) for focusing and examining the state of collimation and how the seeing is distorting the wavefront. Nobody in recent memory has used this mode with success since the departure of MIT from the MDM consortium.
Shutterless video requires that you download appropriate DSP code, select an area to examine with sf, and then use the two video commands.
The upper left window shows what the CCD is seeing. You may adjust the display of this using the "palette" button (lower center) which cycles through a rainbow palette, black and white, and inverse BW. The stretch for the display (values for threshold and saturation) is selected by the long, skinny, horizontal bar which stretches through the middle of the display. There are logarithmically spaced ticks and a colored bar which covers the range between threshold and saturation. You can change the threshold by clicking the left mouse button within the palette bar, and you change the saturation by clicking the right button within the bar.
The upper middle window is a display of the centroid of the current and previous frames. The most current points are white, the next most current points are bright green, and the oldest points are dark green.
The upper right window is an average of previous images. This is implemented as a leaky average (exponentially decreasing contribution from old frames), and you can reset the averaging ("Zero Ave") or change the leak time (exponential decay rate) by using the two buttons immediately below the window. (The left mouse button decreases and the right button increases the value of the leak time.) A leak time of zero (0) means average forever, until you restart the average with the zero average button. Under these two buttons is found the PSF button, which does a full-up Gaussian fit to the average image and displays the results within the button. The "Raw Leak" button lies on the bottom right, and when clicked it toggles to "Ctr Leak". The action of this is to center each incoming raw image before adding it to the leak.
The lower left window is a FWHM bar graph. The purple ledger lines represent units of CCD pixels (perhaps binned), and the pinkish lines represent arcseconds (if ccdcom is providing the information). You may increase or decrease the number of ledger lines by clicking with the right or left buttons within the graph.
Each incoming frame has its FWHM displayed as a tiny green dot in the FWHM display. Occasionally there is a small, vertical red line drawn which is the FWHM of the leaky image on the right. The vertical extent of the red line shows the major and minor axes of the leaky image, and the rate at which the red lines appear is determined by the leak time. If you click on the PSF button under the leaky average window to get a full-up Gaussian fit to the average image, the resulting FWHM will be shown as a yellow line in the FWHM display. Over on the lower right is a button labeled "Raw FWHM", which can be toggled to "Ave FWHM". This changes the FWHM display to one which has been smoothed by a Gaussian whose FWHM is approximately the leak time.
The display window can exert a little bit of control over ccdcom and the ccd readout. In the lower center are two buttons labeled "Bin:" and "Time:". If you click the mouse on these (left to decrease, right to increase) you can change the CCD binning factor (by one per click) and integration time (by 0.05 sec per click). Since ccdcom is extremely busy, the communication from the display back to ccdcom is quite slow and you need to be patient (click-ahead works, though). There is currently no way to change the origin or size of the readout; video must be killed with Ctrl+C and the "sf" command used.
Lastly, the bottom line shows some information: frame number, frames lost (not harmful), time between frames (larger than exposure time from readout overhead), FWHM of the current image (in pixels), RMS of the centroid motion shown in the center window (in pixels), sky value, and maximum brightness in the current frame (in ADU).
In order to use shutterless video, you will usually go through the following steps:
We recommend that you restrict yourself to 64x64 because the time to read out more pixels degrades the quality of the video. It is also a good idea to use a small value for the X-axis origin, because the charge can be shifted out more rapidly. If you want a large field to locate stars, use a binning factor of 6x6; if you want to focus, use a binning factor of 1x1. Generally speaking, you should take the trouble at the start of a run to learn where the default video area lies in the finder so you can acquire a star with no hunting around.
Example:
oc HGN (set DSP to high gain = 1.94 e/adu [default])
oc LGN (set DSP to low gain = 3.85 e/adu.
Note that this will probably not be satisfactory
because the bias level will probably drop below
zero. You would need to use a different .lod
file [e.g. lowgain.lod] and download it to adjust
both the gain and bias level.)
0 = no debug information [default]
1 = basic debug printing on CCD and file I/O.
2 = very verbose debug output, especially during CCD readout,
used primarily to debug the s16d readout code.
-3 and -4 do the
following.
At the ccd camera and
press the hardware reset button.
For an error code of -4
you have to turn off
the gold power supply, the
one with the
instructions on the
bottom, for about 30 to 40
seconds then turn the
power supply box back on.
It is wise to exit ccdcom
and re-enter when error code is
encountered.
ccd_aread: timed out *** Error encountered in asynchronous read: data suspect
Failed, return code = 4227072, elapsed = 141.04
This is not really a problem. Another go of the ccd can be done and should readout fine.