Derek Ives, Tony Bennett, Vik Dhillon
Royal Greenwich Observatory, Cambridge, UK
2. High smear drift mode
3. Low smear drift mode
4. Defining the setup
5. Drift mode in practise
6. Archiving data
7. Timing and overheads
8. Known problems and limitations
Very small dead times on CCD exposures are in some cases essential to achieve the scientific objective of observing programmes, particularly for high-speed time-resolved observations. For instance in the study of close binary stars or flare stars, long time series with exposure times of the order of a second are required. The period between exposures has to be kept as short and regular as possible in order for the experiment to be efficient, or even feasible.
A standard CCD exposure on the WHT data acquisition system introduces approximately 9 seconds of dead time for chip clearing, shutter control, file creation, system communication etcetera. This time loss is in addition to the time it takes to read out the CCD. Such a delay renders high-speed time-resolved work very inefficient. For exposure times of the order of a second or less an additional problem is encountered in the fact that the mechanical shutter is relatively slow to respond. This results in a variable exposure across the field. Apart from this, large numbers of short exposures, as is usually required in high-speed observations, would cause severe mechanical wear to the shutter.
The standard data acquisition system on the William Herschel Telescope on La Palma has been upgraded with the drift mode readout , which is specifically designed to allow very fast continuous readout of a windowed area of the CCD with minimal dead time. The basic principle behind the drift mode readout is that instead of reading out the CCD in one go, the readout occurs in smaller steps, called 'drifts', between the exposures (see Jorden and Maclean, 1994, RGO internal technical note). The shutter remains open during this process. Between drift readouts, i.e. during exposures, the charge collected during previous exposures remains on the chip for some time.
This process of drift-mode exposures is much faster than the standard CCD readout mode since only small chunks of data are handled between exposures. Furthermore, the CCD is not cleared between exposures, there is less system communication, and only one large data file is created for a sequence of exposures.
The description below gives a more detailed account of the practical aspects of using the drift mode readout. This high-speed readout mode can be used for imaging and spectroscopic observations. The following description will concentrate on the situation for spectroscopy.
2. High smear drift mode (HSD)
In this CCD readout mode a stepped clocking scheme forces electrons which have collected at a certain point on the chip (e.g. a star image or a spectrum) to 'vertically' drift down to the serial readout register while the shutter remains open. Instead of clocking out the full CCD array, as at the end of a normal CCD exposure, in drift mode only a small fraction fo the array is read out at a time after each exposure. A sequence of drift-mode exposures will start with clearing the chip to get rid of residual charge on the CCD. Next, the first exposure of a series is started by opening the shutter. After the exposure time has passed, electrons are shifted down on the CCD while light from the object continues to expose the same physical pixel area. The source always exposes the same part of the CCD, but the electrons that are collected in the pixels drift down, using the CCD itself as a temporary storage buffer.
Once the electrons arrive at the readout register they are clocked out 'horizontally', the signal is digitized, and the data is stored in a file. At the end of the set number of exposures the shutter is closed.
This process of drift exposures can carry on indefinitely, in principle. However, the data from the CCD controller is temporarily stored in the Detector Memory System (DMS) and the available memory in the DMS limits the maximum number of exposures.
3. Low smear drift mode (LSD)
Since in the drift-mode readout the shutter does not close while charge on the CCD drifts down, some smearing of the image will occur. The sky adjacent to the object of interest will be mixed in with the signal of the object, and the object signal itself will be smeared out to some extent. The effect of the smearing depends mainly on the time it takes for the charge to shift down, relative to the exposure time. Hence for short exposures the smearing will be more pronounced.
This smearing can be dramatically reduced in the following way. First, the sky region that is not of interest must be masked off to prevent light from other parts of the sky, or from other objects, to 'drift' into the region of interest. In the ISIS spectrograph this can be accomplished by using an aperture mask which only allows light from a small part of the slit to reach the detector. The standard dekker slides located immediately above the slit can be used for this purpose.
Second, a low-smear drift mode CCD clocking scheme (LSD) greatly reduces the effect of charge smearing over the high-smear drift mode (HSD which was described in the previous section) by clocking charge in and out of the sky aperture more quickly. If the charge on the CCD could be shifted down extremely fast then smearing would be negligible (or rather just be limited by the charge transfer efficiency of the CCD). The vertical shifts of charge can indeed be conducted very fast (typically 360 micro seconds for one vertical clock cycle of a TEK 1k x 1k pixel device). However, during a normal readout each vertical shift takes place in conjunction with readout and digitization of the charge in the serial readout register, which is much slower than the vertical shifts (80 ms for 1124 pixels on a TEK CCD at standard readout speed). The relatively slow digitization process effectively sets the speed by which charge collected in the sky aperture can be shifted down in HSD mode.
The way around this problem is to not digitize the charge from the serial register while the charge is quickly shifted in or out of the sky aperture. Clearly this results in part of the information on the CCD, i.e. the block of data closest to the serial readout register, being lost. However, the vertical and horizontal clocking can be orchestrated in such a way that both the charge in the aperture is shifted in-and-out of the aperture quickly, and is digitized as well, and hence not lost. The fast vertical shifts effectively act as the 'shutter', and in between the two fast vertical shifts data closest to the serial register is clocked out, digitized, and stored. Figure 1 shows in essence the low smear drift mode in a graphical way as a time sequence of blocks of charge on the CCD.
Figure 1: graphical representation of a LSD drift mode sequence. The image block on the CCD, marked I, is clocked down towards the readout register. In this process, the second image area, I+1, is exposed in the aperture. The image areas are separated by two blocks of data that are not digitized.
The LSD mode has a number of limitations which have to do with the sequence of fast vertical clock cycles and slow digitization cycles. The most important limitation is the position of the sky aperture and the corresponding window on the CCD. Between the bottom of the window and the serial readout register there has to be space for a minimum of four windows (see Figure 1). Furthermore, the LSD mode has a somewhat larger overhead than the HSD mode since it involves more clock cycles per exposure.
4. Defining the setup
The first step in using drift mode readout is to define the area-of-interest on the CCD. The area outside this region has to be masked off. In the case of ISIS the masking is best done with a dekker aperture. There are a large number of dekker masks available for ISIS, with aperture sizes ranging from 1.4 to 20 arcsec, or a special mask can be made.
Next, one has to determine where the physical aperture is projected onto the CCD. Note that in defining the window one must take into account that due to a ramp-up in the readout electronics the first line of each windowed exposure cannot be used. Furthermore, when setting up a single window the Xsize of the window must be equal to the full Xsize of the CCD.
In high smear drift mode (HSD) the only limitation as to where the window is located on the chip is that the number of rows between the bottom of the window and the readout register (Yoffset) must be an integer multiple times the width of the window (Ysize). In low smear drift mode (LSD) the window size and position has to allow for sufficient free area on the CCD between the bottom of the window and the serial register, as described above. In order to acertain that a choice of window is valid the program checkwin on the data acquisition Sparc (machine lpss3) can be used:
% checkwin < y size > < y offset > [ < aperture size > ]
checkwin reports whether the setup is valid and how
many drifts will
be taken before the first usefully exposed data comes out of the chip.
The aperture size parameter is optional in case you already know what
the size of the aperture mask is in pixels. The checkwin
programme will warn you in case the aperture is larger than the window
it recommends (as this will cause smearing).
Note that the Ysize and Yoffset parameters refer to the unbinned
window. Furthermore, due to a limitation of the Sparc real-time display,
currently the window
size on the CCD has to have a minimum of 10 rows and consist
at least of 200 pixels in total.
It is possible to define two windows in drift mode, but again certain
restrictions apply: In LSD mode the envelope of both windows
has to be taken into account to define the validity of the window
Both windows have to be of the same Xsize (which in this case can
be different from the Xsize of the CCD).
The windows must not be positioned in such a way that their Y ranges
overlap, with the exception of the situation where there is exact
overlap in the Y values between the windows.
5. Drift mode in practise
The following description specifies which steps have to be taken to activate the drift mode. All commands described here have to be issued at the ICL user interface, unless stated differently. To activate the drift mode readout one first has to issue the MODE command to set the readout mode to CONTINUOUS :
MODE < channel > CONTINUOUS
You will be asked to select either Low or High smear drift mode (LSD or HSD); LSD is recommended.
Next, one has to define the window (see previous section) of interest on the CCD, binning, and readout speed through the SETUP command. Once a suitable window has been defined set up the channel by typing
SETUP < channel >
The following parameters are required: Xsize and Ysize of the CCD, the number of planes (this sets the maximum number of drift exposures that can be taken per sequence), binning factor in X and Y, the window definition, and the readout speed. Note that:
Then to start a sequence of exposures type:
RUN < channel >
You are prompted for the exposure time and the number of integrations. Valid integration times are between 0.2 and 15 seconds. The number of integrations must not exceed the maximum number of runs specified in the SETUP command.
Once the integration has started, the data is read out into the DMS one exposure at a time. For each exposure the time is reported on the ICL user interface. At the end of the run, the data is saved onto the Sparc disk, together with headers from the system computer. While the drift exposures are going, the data also appears on the real-time display on the Sparc, and can be assessed there. Further exposures with the same setup can just be started with the RUN command.
An example of what a data frame looks like is shown in Figure 2. The first couple of readouts do not contain any relevant information since the charge that is clocked out first has not been in the sky aperture. Also a ramp-up in the background light level occurs in the first few exposures, as the charge has dwelled progressively longer on the CCD.
There are a number of operational restrictions when using drift mode: Binning and windowing can only be accomplished through the SETUP command, and not by using the usual BIN and WINDOW commands. Furthermore, commands used in standard mode such as PROMOTE, GLANCE, KEEP, WINK, MULTRUN, ABORT and NEWTIME must not be used in drift mode. The DARK command may be used, but the shutter does not open. Note that a DARK run in drift mode cannot be interrupted prematurely.
Figure 2: Example of a drift mode readout. Each bright line represents a continuum spectrum exposed for 1 second.
To interrupt a drift run one may use the FINISH command. The sequence of drift exposures will stop and the DMS will time out. It may take up to approximately a minute until the system has recovered. This method of stopping a sequence is not robust, and generally it's safer to leave a sequence of exposures to end naturally.
Calibration exposures such as arc frames and flat fields can be taken either in drift mode or in standard readout mode, whatever is considered most suitable. It is considered best practice to do the calibration exposures in the same readout mode as the science exposures.
With drift mode experiments it is common to require (relative) photometric calibration of the data on short time scales. This can be accomplished by monitoring a second star on the same science frame. However, when a second star can not be accommodated two options are available to achieve correction for variable slit losses and sky transparency variations. When the slit width is matched to (or smaller than) the seeing, variations in the recorded counts will be dominated by seeing variations. A way to correct for this would be to correlate the FWHM of the star image with the total flux in each spectrum. This will give a curve which relates seeing to slit losses, which can subsequently be used to correct each exposure for slit losses. Alternatively, one could use the automatically logged autoguider data to later correct for sky transparency variations. The success of these corrections will depend on a combination of (sometimes time variable) factors such as seeing, sky transparency, telescope tracking and guide errors, and slit width. It is advisable to conduct some experiments to find the most suitable solution.
The autoguider relative transparency (and the seeing) is measured approximately every 10 seconds, and the information is stored on DISK$WHTDATA2:[SEEING] in an ASCII file Ayymmdd.WHT . One may ftp that data for later use.
6. Archiving data
Data is saved to directory /scratch/lpss3/yymmdd on the Sparc. The directory name is shown at the bottom of the Sparc real-time display. Note that in drift mode the data will not be saved to the VAX, as is the case with normal readouts. The fact that the data is only stored on the Sparc in IRAF format implies that the standard archiving software cannot be used, since that currently still operates on the VAX. Tapes have to be written from the lpss2 observer account using fitsinit and IRAF wfits command.
The start time of each exposure in a sequence is stored in a file Rnnnnnn.DAT on the Vax in the normal data directory DISK$WHTDATA2:[OBSDATA.yymmdd] . Archiving these files must be done separately.
7. Timing and overheads
Timing of the drift exposures is done by the CCD controller internal clock. This internal clock tends to drift a few seconds every day relative to true UTC, but is automatically synchronized with the time service once every day. If absolute timing is important one may synchronize the CCD controller clock using the SYNCHRONIZE < channel > command.
The first exposure of a series will start on a whole second always. Although the controller is capable of sampling time with a resolution of a few milliseconds, the actually reported time has a resolution of only 100 ms. Hence the practical lower limit of exposure times in drift mode is about 0.2 sec RMS. Furthermore, for a yet unknown reason about once every 50 exposures the timing of the exposure is much shorter than expected.
The table shown below specifies the actual dead time measured for exposures with a TEK 1k x 1k CCD with a window of 1124 x 20 pixels centered on the CCD. Dead time is defined as the difference between the actual time between exposures, and the requested exposure time.
|dead time [s]
|dead time [s]
These dead times are governed by the time it takes to digitize the 20 x 1124 pixels, and therefore these numbers approximately scale with window size and binning. For instance, the dead times would reduce by approximately a factor 4 in case of a two times smaller window that is also binned by 2 pixels in X or Y. Also the dead time depends on the type of chip that is used, as the clocking speed is optimized for each detector type.
The deadtime between two series of exposures is about 15 seconds, which includes the time to type the new command.
Finally, due to a time-out period set on the DMS, the maximum allowed exposure time per drift is 15 seconds. For longer exposures one must use the traditional RUN or MULTRUN command.
Although the resolution of the timing file is only 0.1 sec, the actual timing repeatability of the CCD clock is much better than that. Experiments have shown the timing to be repeatable to better than 0.2 %. If this is critical to the experiment, then it is advisable to check the repeatability using lamp exposures taken with the same setup as the science exposures.
8. Known problems and limitations