Nod and Shuffling

This document introduces the "Telecope nod and shuffle" technique now available in the AAT Observer CCD system.  Basically, this technique allows you to combine CCD charge shuffling with telescope offsets.  This allows you to combine sky and object data on the one CCD readout.

Update (10-Jun-1999)

We believe we have fixed a problem in the non-axis mode. Please re-generate any relevant change shuffling files.

We now have some gif files available which demostate the timings of the operations. These gifs print best on A3 paper. See for the axes mode timings and See for the non-axes mode timings. These files have a fair bit of technical information available but should still be useful to most people trying to get an understanding of the timing relationships.

We have fixed the problem where by shuffle files are not downloaded if the file name does not change, even through the file itself has changed. The file is now always downloaded.

All the prompts to the NS now remember and use as defaults the previous values entered. As a result, you can repeat a shuffle by just hitting return at all the prompts.

Hardware prepration

The Nod and Shuffle scheme uses the instrument sequencer microprocessor.  This micro uses the CCD "external sync" output pulse to determine when to offset the telescope.  The instrument sequencer micro is located in the bottom of a control room electronics rack, the one which contains the XMEM.  You should ensure this is pluged in as follows.

Three connections are required to the instrument sequencer.  First, the instrument sequencer console RS232 port S1 must be connected to the AAOD2Q terminal server port 4, via the cable marked "ISconsole" at both ends.   This connection is used to to command the instrument sequencer.

The second connection from from the Instrument Sequencer S3 serial line to the AAOD2A teminal server port 8, via the cable marked "ISapplic" at both ends.   This is used by the instrument sequencer to send commands to the telescope via the VAX.

The third connection is for the CCD sync pulse.  This involves a connection normally used in the TAURUS charge shuffline mode.  There is a 55 way connection which normally plugs into the instrument sequencer I1 lemo connector and the S2 connector.  In the cass cage, the Lemo connector on the other end of this plugs in to the "sync out" port of the CCD controller to be used.  The other connections are not used (they are for TAURUS).

Note that Nod and Shuffling is fully compatible with TAURUS and a future version of TAURUS will use this scheme as well.  The cabling is the same,but with the addition TAURUS connections plugged in in the cass cage.


This program is run from the VAX NIGHT account to accept telescope commands (from the instrument sequencer).  Log into the night account and enter the following commands at the $ prompt.
define instseq_sif IRISTEST_SIF:
The TEL_CONTROL program continues to run from this terminal.  To exit it at the end of the night, type Control-Y and then logout.

(Note, we may remove the requirement for the define command at some stage soon).

Telescope commands sent by the instrument sequencer will  be logged whilst the program runs.

OBSERVER account

The Nod and Shuffle mode makes use of a minor modification to the standard Observer RVICL command technique.  Most people use the RVICL technique to generate mosaic runs.  Instead of "RVICL", you use "RVNODSHUFFLE" (which can be abbreviated to "RVNOD").  Currently, you need observer version "6OCT" or later.

For example, assuming you want to run CCD 1 from X-terminal AATXTK.  Login into the VAX OBSERVER account and type the following commands.

version 6oct
xon aatxtk
rvnod ccd_1
Observer will now start up (in a separate window), as will the instrument sequencer program.  You will receive the ICL> prompt.

You can do all normal CCD operations, either from the Observer window or the ICL> prompt.

Nod and Shuffle operations

There are two nod and shuffle modes.  The first requires you to have programmed your base position into telescope axis A and your offset position into telescope axis B.  This mode allows you to autoguide in both positions, but restricts the possible offset.  You must know the approximate time required to switch axes for your given positions.  See the "Generating CSX files"  section for how to use this information to obtain two items of interest, as well as the CSX file.  The items are For the second mode, you must know the offset in arc seconds on the sky between  the base position on the offset position.  In this mode, you can use any practical offset value, but can only autoguide in the base position.   You must also know the time taken to do the offset, which is again used below to get the  timer resolution and external device delay.  Note that this mode is less efficent then Axis mode due to restrictions in the CCD controller.  The problem is that extra Telescope operations are required, to Thaw and Freeze the autoguider.  These operations occur immediately, but the CCD must allow the same delay for all external operations. So instead of the CCD having two offset length delays in each cycle, there are four such delays.

To run a nod and shuffle operation, you use the "NS" command at the ICL> prompt. This will prompt you for various values, being

TRUE/FALSE Is the run to be a bias RUN.  Defaults to FALSE.
CSX Filename
Here you specify the name of your charge shuffling description file.   See "Generating CSX files"  below.  The default location is  DISK$USER:[OBSERVER.CS_FILES] and the default file type is "CSX".
Timer Resolution
Used to determine the resoultion of the exposure and other timers in the CCD controller.  This is required as the range of the timers are much more limited then the range you may desire.  A common value here is "3", which indicates a resolution of 1 milli-second but limits you to an exposure plus an offset time of about 65 seconds. See "Generating CSX files" below.
External Delay
This is the amount of time the system must wait  for the external device (telescope to offset).  This value is given in terms of the timer resolution.  See "Generating CSX files" below
Cycle count
The number of observation cycles.  1 to 65535.
Use Axes
TRUE/FALSE.  If TRUE, then you want to do a Telescope AXIS mode.  Otherwise, a standard offset run.   Defaults to TRUE.  Note, the CSX file must be appropiate (but the software cannot check this)  See "Generating CSX files" below
RA Offset
Only requested if not using AXES.  The RA offset
Dec Offset
Only requested if not using AXES.  The Dec offset
Finally, the system will output a summary and prompt you for confirmation. If you confirm, the run is started.  Note, it can take a while to start a charge shuffling run, but you should see messages every few seconds during this time.

Going back to normal CCD observation

When you want to retun to making normal CCD observation, type "METHOD DEFAULT" in the Observer window or at the ICL> prompt.

Generating CSX files

At the moment, a simple and low tech program exists to write appropiate charge shuffling files.   This program is run from the OBSERVER account using the NODSHUFFLE command.

Before running this command, you need to determine the following

  1. Are you using the axes or offset mode.
  2. The time required to offset the telescope (required for both modes)
  3. The "Base position" exposure time
  4. The "Offset position" exposure time (defaults to base position  exposure time)
  5. The time required for the shutter to operate (defaults to 100ms)
  6. The number of rows to be shuffled.  For example, the default is 341 rows representing 1/3 of a 1024 chip.
Command options are
If specified, we are using the axes.
-offtime n
Specifies the offset time in seconds (real number)
-exptime n
Specifies the base exposure time in seconds (real number)
-offexptime n
Offset exposure time in seconds (real number)
Shutter time in seconds (real number)
-shift n
Rows to shift, (integer)
-output file
Specify output file. The default is standard output

The program writes to STDOUT the charge shuffling file.  It writes to STDERR the timer resolution index value and the external device delay value. For example, assume an axes mode operation, exposure time of 10 seconds in both positions, offset time of 2 seconds and shift of 300 rows.  The command is as follows

nodshuffle -axes -exptime 10 -offtime 2 -shift 300
This produces
The timer resolution value is "3"
The external device delay is "2000"
PR 0,65535,10000,12100,1,300,0,0,1
PR 0,65535,10000,12100,65535,300,0,0,2
PE 0,65535,1,2100,0,65535,0,0,1
PE 0,65535,1,100,0,65535,0,0,0
If I want to catch the charge shuffling file in a disk file, then I need to redirect STDOUT.  E.g
define/user_mode sys$output myfile.csx
nodshuffle -axes -exptime 10 -offtime 2 -shift 300
The timer resolution value is "3"
The external device delay is "2000"
And the file myfile.csx  which contains
PR 0,65535,10000,12100,1,300,0,0,1
PR 0,65535,10000,12100,65535,300,0,0,2
PE 0,65535,1,2100,0,65535,0,0,1
PE 0,65535,1,100,0,65535,0,0,0

Potential problems

ABORTS are not handled well by the CCD controller.  You may get a system failure and have to to a "RESET HARD" to recover.

Future possibilities

The CCD charge shuffling scheme has many features.  You should talk to people such as John Barton and Joss Hawthorn for more information.

The Telescope control software also supports telescope FOCUS control, so it should be possible to write charge shuffling scripts to do FOCUS runs.


The OBSERVER CCD software works as normal, and it is suggested that you first do a normal CCD GLANCE run to check the CCD system is working.

If the instrument sequencer task is not powered up or not communicating with the VAX, then you should expect the following just after entering the RVNOD command

INSTSEQ initialising
!! No error to report (improper use of EMS)
!! OBEYW error from task INSTSEQ - action INITIALISE TAURUS_CCD
ADAMERR   %SYSTEM, device timeout
In Procedure: NS_LOAD
If you get this error, physically check the instrument sequencer micro. Ensure there are three lights down the left hand side (+5V, +12V and -12V). Ensure is is cabled correctly (see "Hardware Prepration" section). Hit the reset button.

Exit ICL and then start it again (you need only type ICL this time, although doing the full "RVNOD ccd_1" command does no harm)

You can log communications with the instrument sequencer micro by entering the following command at the ICL> prompt.

obeyw instseq log_level inst-s
This will log all information to the ICL window as well as the Observer log file.  For example, consider issuing the command "SS 0".
ICL> obeyw instseq MICRO "SS 0"
Output to  INSTSEQ -> aa.
Input from INSTSEQ -> aa.
Input from INSTSEQ -> ? - Unknown Command.
Output to  INSTSEQ -> SS 0.
Input from INSTSEQ -> SS 0.
You can see SS command output and the echo of it returned.  But what is the "aa" command about.  This is just the way the instrument sequencer task checks if the micro is listening.  If a run was aborted incorrectly, the micro may not be listening, in which case, the task needs to send a Ctrl-E character to grab it's attention. But, if it is listening, the Ctrl-E character causes a crash, so the software has to check first.  The "? - Unknown Command." string is the expected response from "aa".

So just what is sent during a run.  This varies a touch based on the type of run.  There are two stages, one prefixed by "Down-loading commands to instrument sequencer" and the other prefix by "Down-loading phase table to instrument sequencer"

The commands send during the first stage are something like these

SS 0
IM 2
DC 256
AC 3 "OFFSET 10 20"
AC 4 "OFFSET 0 0"
The SS command selects serial port for the Telescope.  The IM command specifies that we are running the telescope (as against running TAURUS).  When the IM command is send, the system tries to talk to the Telescope by issuing a "WHERE" command to the telescope interface.  You should see this echoed on the Night account terminal running TEL_CONTROL.

The AC commands specify the Telescope commands for each phase.  The last number in each phase table line indicates which of these commands is selected.  The command is sent to the telescope at the begining of the phase and you should see it echoed on the Night account terminal

The command sent during the second stage are something like these

PR 0,65535,5000,8100,1,341,0,0,1
PR 0,65535,1,3100,0,65535,0,0,2
PR 0,65535,5000,8100,65535,341,0,0,3
PR 0,65535,1,3100,0,65535,0,0,4
PE 0,65535,1,3100,0,65535,0,0,1
PE 0,65535,1,100,0,65535,0,0,0
cs 3
Where the phase table was downloaded verbatim, and then followed by the "cs" command which causes the run to start and specifies the number of cycles.

Tony Farrell
Lew Waller
Steve Lee