Subject: How to do drift-scanning with SPICAM

From: strauss@astro.Princeton.EDU

Submitted: Sat, 31 May 1997 22:57:46 -0400 (EDT)

Message number: 48 (previous: 47, next: 49 up: Index)

This is a quick writeup of my understanding, based on a half-night of
observing, and lengthy discussions with Chris Stubbs, of how to take
drift scans with SPICAM on the APO 3.5m.  This is *not* an official
manual, but I distribute it with the hope that it will be useful to
			-Michael Strauss

  Fire up REMARK on the Mac interface, and 
(logon as spicam, with the obselete visitor1 password)

On a separate window, 
(logon as visitor1, using the current password).

  We will control the slewing of the telescope and the rotation angle
of the instrument from the Mac (REMARK), the operation of SPICAM from
the first window, and the scanning of the telescope from the second.

  From the dryrot window, invoke spicam by simply typing the
line, spicam. 
Typing ? will give a list of all available commands. 
typing help <command> will give you more details. 

Most of these commands are very straightforward, e.g., bias takes a
bias, comment sets the comments line in the fits header, filter sets
the filter, and so on.  For many of the commands, following them by a
question mark will tell you default values.

  In drift scan mode, the data stream is written out as square
1024x1024 frames (with the default 2x2 binning), with no overlap
between them, and with an extra 100 columns of overscan (for
stare-mode observations, there are also 100 rows of overscan). 
  Keep in mind that the first output frame is the ramp frame, and can
look very strange, especially if the camera starts before the
telescope is stable. 

The software thinks of driftscanning as keeping the telescope boresite
fixed, and moving the CCD along the focal plane.  This is of course
not what really happens, but it means that the position written to the
header will be the same for all frames in a given scan (and it means
that while you're scanning, REMARK will not update the position of the
telescope).  The number of the frame is in the header, but (unless the
user enters it explicitly on the comments or name line) not written to
the header.  So careful note-taking is necessary to make sure that you
can reconstruct the position of any given frame.
  Also, the header does not record if any given exposure is stare mode
or drift-scan mode. 

  With object rotator angle set to zero, columns are aligned with N-S;
with SAOimage, the frames have South up and E to the right.  In
general, if you want to scan at position angle (E from N) theta, set
the object rotator angle to theta - 180. 
  If you always drift-scan N-S, then N-S is always along the columns.
If you drift-scan in any other direction, the direction of N-S will
rotate on the chip.   But there is no need to change the rotation
angle as a function of time.  These scans will of course not be along
great circles. 

  So to driftscan, rotate to the appropriate angle, and move telescope
to initial position.  Launch telescope at fixed rate in instrument
coordinates in y direction.  Simultaneously, start reading out camera
at the same rate. 

  It is not clear how one can refocus during a drift-scan.  Given the
fact that the telescope focus occasionally glitches, this is a real

  The driftscan command, from the spicam window, looks like:

drift 10240 0 6 -notcc

The 10240 tells it how many (binned) pixels long this exposure is.
This example says that the exposure is 10 1024 frames long.  The
maximum the software seems to accept is 64 1024 frames long, or
roughly 5 degrees long. 

The 0 is the scan rate in the x direction.  This should always be

The 6 is the scan rate, in arcsec/sec, in the y-direction.  Sidereal
rate is 15 arcsec/sec, so this is 0.4 sidereal.  This number is
currently limited between 2.58 and 6.45 arcsec/sec.

  Before hitting return, however, you've got to get things ready with
the telescope.  In the tycho window, type (when you first log in). 
unsubscribe status    !These two lines suppress the verbosity of the mc
unsubscribe monitor
pri 1

Using remark, slew to your initial position, set your rotator angle appropriately,
and type
tcc offset inst/pabs 0,0,0,0.001666666667

This says to set the telescope off in the y-direction in instrument
coordinates at the appropriate number of degrees/sec (not arcsec/sec!)
Lots of decimal places are indeed appropriate; this must agree with
the rate of the CCD to high accuracy...  Note that because you are
setting this in instrument coordinates, there is no further need to
specify rotation angle here.  Note also that these scans are *not*
along great circles, which requires more integration between the
camera and the tcc than exists now.  But this is on the list of things
to do! 

The game is then to hit the tcc and drift commands as close to
simultaneously as you can, and off you go!  A counter will come up,
which will tell you how many frames you have read out thus far.  The
path, ext and file commands will set what these files are called. 

  There is no way to stop a drift-scan early, without physically
resetting the instrument.

  When a drift-scan finishes, stop the telescope with the command:
tcc offset inst/pabs 0,0,0,0
(or for short:
tcc offset inst/pabs
the 0's are the default values)
This stops the scanning, and in fact returns you to your original
position, tracking on the sky, which is very convenient, e.g., if you
want to scan again in another filter. 

  When a drift-scan finishes, the counter of frame number skips one,
so you will have a gap of one to confuse you slightly. 

  The bias is thought to be negligible (after subtracting overscan, of
course); we'll have to test that.

  If you are the first person doing drift scan in a while, tell the
mountain people ~1 day early to "rezero the rotator". 
APO APO APO APO APO  Apache Point Observatory 3.5m  APO APO APO
APO  This is message 48 in the apo35-dsc archive. You can find
APO  the archive on
APO  To join/leave the list, send mail to
APO  To post a message, mail it to