|
|
ANGLO-AUSTRALIAN OBSERVATORY AAO Software Report Version |
Jeremy Bailey
23/07/02
IRIS2 Software System - Overview
Contents
1 Introduction *
2 Running the System *
2.1 Starting up the Observing System
*2.2 Reconfiguring
*2.3 If Something Goes Wrong
*2.3.1 Resetting
*2.3.2 Full Restart
*2.3.3 Resetting the VXWorks Systems
*2.4 Shutting Down the IRIS2 System
*2.5 Running a Test IRIS2 System
*2.6 Running the System in Simulation at the Telescope
*2.7 Running the System in Simulation at Epping
*2.8 Running with just the dewar mechanisms in simulation
*3 The User Interface *
4 The Real Time Display *
4.1 Displaying Data
*4.2 Multiple SkyCat Windows
*4.3 Saving Images
*4.4 Subtracting Bias
*4.5 Other Features
*4.5.1 Cut Levels
*4.5.2 Pick Object
*4.5.3 Pixel Table
*4.5.4 Graphics
*4.6 The Detector Menu
*4.7 The Telescope Interface
*5 The Sequencer *
5.1 Introduction
*5.2 Sequences
*5.2.1 A simple example
*5.2.2 Waiting for events
*5.2.3 Using Tcl
*5.3 Sequence Commands
*5.3.1 General Sequencer Commands
*5.3.2 DETECTOR Subsystem commands
*5.3.3 DETECTOR Subsystem events
*5.3.4 TELESCOPE Subsystem commands
*5.3.5 TELESCOPE Subsystem events
*5.3.6 IRIS2 Subsystem commands
*5.3.7 IRIS2 Subsystem events
*6 The Software System *
7 List of Tasks *
7.1 Run Control Task (RCT)
*7.2 Detector Control Task (DCT)
*7.3 Image Reconstruction Task (IRT)
*7.4 Data Processing Task (DPROC)
*7.5 Data Recording Task (DRT)
*7.6 Display Server Task (DSERV)
*7.7 PTCS SkyCat Interface (PTCS_SKYCAT)
*7.8 Portable Telescope Control System (PTCS)
*7.9 Real Time Display (SkyCat)
*7.10 Sequencer Task (SEQUENCER)
*7.11 IRIS2 Spectrograph Task (SPECTRO)
*7.12 IRIS2 User Interface (SPECTROGUI)
*7.13 System Loader Task
*8 Files used by the IRIS2 system *
8.1 setup.csh
*8.2 iris2.cfg and related files
*8.3 iris2startup.csh and related files
*8.4 Wheel definition files
*8.5 default.job
*8.6 DCT_Configurations
*8.7 Controller Files
*
Revisions:
28-Nov-2000: First Version.
31-May 2001 Update User Interface section
09-Jul-2001 Add File section
23-Jul-2002 Update for final system
Introduction
This document provides an overview of the IRIS2 Software System. It is intended to provide information which may be useful to support staff at the telescope, astronomers supporting the instrument, or anyone else who would like to know more about how the system works.
It is not intended to be a user’s guide for observers, though the information here may be of interest to advanced users.
The telescope PTCS system should already be running (it runs on machine aatssz), and the IRIS2 and CCD Controller VME machines need to be ready – reset them if necessary.
The steps are as then as follows:
This command starts the system loader task which is responsible for loading the rest of the system. As each task loads you will see its name change from red to green on the user interface. When loading is complete all the names should be green, the windows for the IRIS2 User Interface and the Real Time display should have appeared and the configuration dialog should appear.

IRIS2 System Configuration Dialog
This dialog specifies the data directories and other information needed to determine the data file names and the OBSERVER information for the FITS headers. Normally the defaults should give the correct directories for the current date and only the Observer(s) field needs to be filled in.
Once this is complete the System Loader window can be iconized. It is not needed during normal observing. The only time it will be needed again is to reset, reconfigure or exit from the system.
Once started the IRIS2 software system can continue running for many days and shouldn’t need to be restarted unless something goes wrong. However, at the start of each observing night it is necessary to reconfigure in order to set the correct data directories and observer information for the current night.
To do this bring up the System Loader window (if it has been iconized) and select Reconfigure from the Commands menu. This will bring up the system configuration dialog as shown above. The directory fields should be set automatically based on the current UT date. Normally only the Observer(s) field needs to be entered.
In most cases the reset command should recover from software problems. To do a reset bring up the System Loader window and select Reset from the Commands menu.
During a reset each task in turn is checked. If a task has crashed or shut down it is reloaded. Otherwise it gets sent a reset command. The overall effect should be to return the system to its state just after startup. The System Configuration dialog comes up just as during a normal startup of the system.
If reset fails then a full restart can be done as follows.
The RESET or Full Restart above will recover from problems with the UNIX side of the system. If problems occur in either of the two VxWorks systems, aatvme6 which runs the controller (DCT task) or aatvme7 which controls the dewar mechanisms (SPECTRO task), then these need to be reset before restarting.
The controller system, aatvme6, can be reset by typing the command:
~devccd/newccd/vmeReset
when logged into aatvme10.
The dewar system, aatvme7, is reset by means of its red reset button. It is the second unit from the top in the electronics rack in the Cassegrain cage.
After resettting either or both systems, wait about a minute for the reset to complete. Then do a RESET, or Full Restart of the Unix side of the system as described above.
Bring up the System Loader window and select Exit from the File menu. The tasks will then shut down in sequence and a progress dialog will report as they are closed down.
If any problems occur during shutdown (e.g. error messages, or the shutdown fails to close down all the tasks) you should then type cleanup to ensure all the tasks are removed.
To test the IRIS2 hardware without interfering with observing — for example if another instrument is in use, the instructions are basically the same but we use account iris2tes in place of aatobs. This will ensure that we don’t attempt to communicate with the telescope.
First start up the controller VxWorks system (aaovme5). There are instructions on how to do this next to the aaovme10 console. When it is ready:
The tel command brings up a simulation version of the telescope system. This step can be omitted if you don’t need to test any of the features which involve telescope communication.
To run a simulation version of the software system — that is one that simulates in software the IRIS2 hardware and the CCD controller — use the following steps.
The tel command brings up a simulation version of the telescope system. This step can be omitted if you don’t need to test any of the features which involve telescope communication.
Currently the simulation system at Epping can be run on either aaovme9 or aaossj. The steps are as follows:
It is also possible to run the system with just the dewar mechanisms in simulation, but running the actual detector system. To do this use the command iris2dsim instead of iris2 or iris2sim.
The figure below shows the user interface as at 31/05/01. Some features still need to be implemented. Its use should be fairly straightforward. The upper center panel controls the IRIS2 dewar configuration. The selected configuration is also shown in the mimic display on the left. The lower center section controls the detector system and is used to specify and start an observation. The right hand panel is used to execute and edit sequences.

For this purpose we use the ESO real time display software in the form of the SkyCat application.
When the IRIS2 software is started the SkyCat application will be started (unless it is already running). The SkyCat version started from the IRIS2 software uses two AAO supplied plug-in components which appear as the Detector and Telescope menus.
The SkyCat application can be used to display data from a number of sources including the following:

It is possible to have more than one SkyCat window open at the same time. To open a new window choose New Window from the File menu. Alternatively if you want to open a window on a different display log in to the IRIS2 machine as aatobs and type skycat. Thus it is possible to have one window displaying processed data, another displaying a data file and a third displaying the DSS image of the field.
Alternatively multiple windows could be used to display additional copies of the observation for the Night Assistant or at other locations.
Any image displayed on the SkyCat display can be saved as a FITS file by using the Save As… option in the File menu. This can be useful for temporarily keeping idle or glance data. However, the files will not have the full header information that is recorded with the final IRIS2 data files.
SkyCat includes a feature which allows a bias image to be subtracted from the image before display. This is accessed through the Bias Image… option in the File menu. It is possible to specify up to five bias images here which can be selected from as required.
A number of useful features of the application can be accessed from the menus. Some of the more useful features are as follows:
The Cut Levels… item in the View menu provides sophisticated control of the low and high scaling levels for the display. It is also possible to enter low and high levels in the panel to the left of the image.
The Pick Object… item in the View menu allows measurement of the position and size of a star image.
The Pixel Table… item in the View menu brings up a table of the data values for a grid of pixels, and optionally some statistics on these values.
The Graphics menu provides options for drawing graphics and text on top of the image. The graphics will correctly zoom and scroll with the image.
The Detector menu is used to select a data source for the real time display. In the case of the IRIS2 system the options will be IRIS_PROC, for real time data from IRIS observations, or IRIS_IDLE for IRIS idle mode data. The Disconnect menu item will stop real time data being displayed.
The SkyCat application may lose its connection with the IRIS2 software if the IRIS2 system was restarted after starting SkyCat. If that happens the Reset Server Connection menu item should reestablish the connection.
The SkyCat application runs with a telescope plugin which allows interaction with the telescope as follows:
The SkyCat application may lose its connection with the telescope software if the telescope system was restarted after starting SkyCat. If that happens the Reset Server Connection menu item should reestablish the connection.
This section describes the sequencer task for the IRIS2 system. This task is responsible for executing sequences of operations which involve coordinated use of different subsystems, typically the detector, telescope and IRIS2 ‘spectrograph’.
The sequencer is designed to be sufficiently flexible to be used for other instruments based around the new AAO CCD controller.
Sequences are specified in the form of text files. The main action of the sequencer task is the RUN action which executes a specified sequence. Sequences can be selected, edited and executed from the Sequences section of the IRIS2 user interface.
Here is an example of a simple sequence file
# Sequence to take two K band imaging runs at two telescope
# positions
DETECTOR config iris_obs2
IRIS2 config k_imaging
TELESCOPE offset 0 0
DETECTOR run
TELESCOPE offset 0 20
DETECTOR run
TELESCOPE offset 0 0
The sequence consists of a series of commands. The first word in the command specifies the subsystem which the command applies to. There are three subsystems in the IRIS2 system.
DETECTOR — Commands involved in taking data from the detector are sent to this subsystem.
IRIS2 — Commands to setup the configuration of the wheels in the IRIS2 dewar are sent to this subsystem.
TELESCOPE — Commands to move the telescope are sent to this subsystem.
The first two commands in the sequence are config commands which specify configuration files for the data taking, and for the dewar mechanisms.
You must have a config command for the detector before doing any other detector operation. The file specified is an observation description file specifying the IRIS 2 data taking mode, exposure time, cycles, window etc. You make one of these files using the Save As… button on the Detector section of the user interface.
The config command for the dewar is optional, but if used it sets the positions of all the dewar mechanisms. These files can be created using the IRIS2 user interface using the Save As… button in the dewar section of the interface. .
The remaining commands specify a series of telescope offsets and data taking runs. A run is taken, the telescope is then offset 20 arc seconds and another run taken. The telescope is then returned to its initial position.
While the above sequence will work, it won’t do so with optimum efficiency. The reason for this is that it will wait for each step in the sequence to complete before starting the next one. In the case of a run command, the run does not complete until the data file is written to disk. However, we could actually start offsetting the telescope as soon as the exposure has completed. This can be achieved with the following version.
# Sequence to take two K band imaging runs at two telescope
# positions – optimized version.
DETECTOR config iris_obs2
IRIS2 config k_imaging
TELESCOPE offset 0 0
DETECTOR run –nowait
DETECTOR wait exposure_end
TELESCOPE offset 0 20
DETECTOR run –nowait
DETECTOR wait exposure_end
TELESCOPE offset 0 0
In this example the –nowait option is specified on the run command which causes this command to start the run and then return immediately. It is followed by a wait command which waits for a specific event, in this case exposure_end.
This mechanism allows two or more operations to be performed concurrently. For example:
IRIS2 filter K –nowait
TELESCOPE offset 10 10 –nowait
IRIS2 wait ready
TELESCOPE wait tracking
This will perform the filter movement and telescope offset concurrently and then wait for both operations to complete.
Note (9/07/01) – Using the –nowait option on a DETECTOR run command doesn’t seem to work reliably at present.
Note that the default behavior (if –nowait is not specified) is always to wait for completion of any operation. This is safe if not necessarily optimum.
The sequence files used by the sequencer task are actually in the Tcl language and are run by a Tcl interpreter incorporated in the task. Thus any Tcl features can be used within them. Here is an example which uses Tcl procedures and looping constructs.
# Sequence to take two K band imaging runs at two telescope
# positions and repeat 3 times.
proc nod {n} {
DETECTOR config iris_obs2
IRIS2 config k_imaging
TELESCOPE offset 0 0
set i 0
while {$i <= $n} {
DETECTOR run –nowait
DETECTOR wait exposure_end
TELESCOPE offset 0 20
DETECTOR run –nowait
DETECTOR wait exposure_end
TELESCOPE offset 0 0
incr i
}
}
# Execute the above procedure with n=3
nod 3
|
Command |
Parameter(s) |
Purpose |
|
MESSAGE |
string |
Output a message on the Sequencer dialog |
|
PAUSE |
string |
Output a message and pause until the user hits the CONTINUE button |
|
Command |
Parameter(s) |
Purpose |
|
config |
Name of observation description file |
Specify the observation description to be used for subsequent runs. This is the .sds form of the observation description file which can be generated from the text file by the OBSGEN utility. |
|
run |
obstype (optional) |
Start a run as specified by the current observation configuration. Obstype specifies the type of observation (BIAS, DARK, ARC, FLAT, OBJECT, SKY) |
|
recipe |
Name of an ORACDR reduction recipe |
Specify a reduction recipe to be used for subsequent runs in the sequence. |
|
startgroup |
maxgrp (optional) |
Start an ORAC DR reduction group. The optional maxgrp parameter is the maximum number of observations in the group. The group is ended by an endgroup command or another startgroup. |
|
endgroup |
— |
End a group started with startgroup |
|
fits_real |
Keyword, value, comment |
Add a real FITS header entry for the next or current run. |
|
fits_integer |
Keyword, value, comment |
Add an integer FITS header entry for the next or current run. |
|
fits_logical |
Keyword, value, comment |
Add a logical FITS header entry for the next or current run. (value can be TRUE or FALSE) |
|
fits_string |
Keyword, value, comment |
Add a character string FITS header entry for the next or current run. |
|
comment |
Comment string |
Add a FITS comment record for the next or current run. |
|
object |
Object name |
Specify an object name – used for all subsequent runs until changed. |
|
exposure |
Exposure time in seconds |
Specify a new exposure time overwriting the value in the observation description. |
|
cycles |
Number of cycles |
Specify a new number of cycles overwriting the value in the observation description. |
|
reads |
Number of reads |
Specify a new number of reads overwriting the value in the observation description. |
|
expose |
— |
For a multiple exposure CCD run, start a new exposure (Not implemented for IRIS2) |
|
readout |
— |
For a multiple exposure CCD run, start the readout (Not implemented for IRIS2) |
|
Name |
Event |
|
exposure_start |
Start of exposure (i.e. opening of the shutter for a CCD, or initial read for IRIS). |
|
exposure_end |
End of exposure (i.e. closing of the shutter for a CCD or final read for IRIS). |
|
readout_end |
End of readout |
|
run_end |
End of run. This means all activity associated with the run has completed, including writing the data file to disk. |
|
Command |
Parameter(s) |
Purpose |
|
offset |
EW and NS offsets (arc seconds) |
Offset the telescope by the specified amount. The offsets are relative to a base position, and are in J2000 gnomonic projection. |
|
offset_xy |
X and Y offsets (mm) |
Offset the telescope by a spcified amount in mm in the focal plane. The XY system is defined so that it is fixed relative to the detector however the instrument is rotated. |
|
axis |
Axis name (A, B or REF) |
Change the telescope pointing axis. |
|
control |
ON or OFF |
Turn telescope control on or off. This is needed before using either of the offset commands. |
|
Name |
Event |
|
tracking |
Telescope is tracking (i.e. has completed any movement) |
|
Command |
Parameter(s) |
Purpose |
|
config |
Name of IRIS2 configuration file |
Configure the IRIS2 mechanisms using a configuration file |
|
slit |
Slit position name |
Move the IRIS2 slit/aperture wheel to a named position. |
|
filter |
Filter position name |
Move the IRIS2 filter wheel to a named position. |
|
coldstop |
Coldstop position name |
Move the IRIS2 coldstop wheel to a named position. |
|
grism |
Grism name |
Move the IRIS2 grism wheel to a named position. |
|
focus |
Focus offset in steps |
Move the IRIS2 detector to a new focus offset. |
|
Name |
Event |
|
ready |
Instrument is ready (i.e. all mechanisms have completed any requested movements). |
The main tasks involved in the software system are shown in the diagram below. A full list and brief description of each task is given in the next section.
Most of the software runs on a dual processor VME system which contains both a 680x0 processor running VxWorks, and a Sparc processor running Solaris. The DCT task which has the direct connection to the detector runs on the VxWorks processor with the rest of the system running on the Sparc processor. The telescope and IRIS2 systems each have their own VME machine, and the PTCS software runs on aatssy.

This section describes the various tasks involved in the IRIS2 software system.
The RCT is responsible for the overall control of the sequence of events involved in taking a run. It does this by coordinating the operation of the DCT, IRT, DPROC and DRT tasks. It is also responsible for informing all tasks that provide information for the FITS header of the start and end of an exposure, so that they can forward their header data to the DRT.
The DCT is the task which is in direct communication with the CCD controller via the fibre optic link. It is responsible for downloading information and commands to the controller and receives the image data back from the controller. It passes the data on to the IRT.
The IRT receives the data from the DCT and has the job of combining the data received from the four quadrants of the detector and reconstructing an image of the correct format for the window being used. It then passes the data on to the data processing task.
The DPROC task performs any data processing required for the observing mode in use. For example subtracting the start and end reads in two read mode, or fitting of a straight line in multiple read mode as well as combining the cycles. The processed data is passed to the real time display task for display, and to the data recording task for final recording.
The DRT receives the final data from DPROC and is responsible for writing the data files. It also has to collect from all relevant tasks the information needed to construct the FITS headers for the file.
The DSERV task provides an interface between the real time display (SkyCat) task and the data processing task. It maintains a list of named image sources which the display can be connected to by selection from its Detector menu.
This task provides an interface between the real time display (SkyCat) task and the telescope control system. It supports the functions in the Telescope menu of the display task.
The Portable Telescope Control System (PTCS) provides the interface to the telescope control computer, and enables the IRIS2 system to request information it needs for the FITS headers as well as send commands to offset, beamswitch etc.
Initially we are using an interim system in which a modified PTCS task interfaces with the existing Interdata telescope control computer. At some time in the future we will probably move to a system in which the telescope is directly controlled by the PTCS (this is planned as part of the Observatory Infrastructure project). Since the interface will be unchanged this should have minimal impact on the IRIS2 system.
This task provides a real time display of data from the detector (replacing the XMEM display in the old AAO system). It has not been written at AAO. Instead we are using the real time display RTD system developed by ESO. The RTD has an extensible structure and has been built in to a number of applications. The one we are using is the SkyCat application which adds some catalogue access capabilities to the basic RTD. We also use two plug-ins of our own to enable the RTD to interface to our detector and telescope systems. These show up as additional Detector and Telescope menus on the application.
The SEQUENCER task performs coordinated high level control of the entire IRIS2 system. It can control observational sequences which includes commands executed by the RCT, the PTCS and Spectrograph tasks. Sequences are programmed in the form of text files.
This task performs direct control of the mechanisms in the IRIS2 dewar. There are four wheels plus the detector focus mechansism.
This task provides the overall graphical user interface for the instrument.
This task is responsible for loading all the other tasks in the system (except for the PTCS task which is expected to be already running). It also sends appropriate initialization and configuration commands to each task and can be used to reset the system.
This section lists configuration files used in the IRIS 2 system which might occasionally need changing in the course of maintaining the system.
This cshell script sets up environment variables and aliases needed by the IRIS2 system. It is run on login to one of the IRIS2 accounts.
Location of file used by system: SETUP_DIR
Source location: /instsoft/iris2/setup
There is one of these files for each command used to start the system (iris2, iris2sim etc.). These are configuration files used by the System Loader Task to know how to load the system. The file contains information on the node names on which various tasks run, and the IP number of the Solaris machine, whether tasks like the DCT and SPECTRO are simulating, and the root directories for data, log files etc.
Location of file used by system: SETUP_DIR
Source Location: /instsoft/iris2/setup
There is one of these files for each command used to start the system (iris2, iris2sim etc.). These are the cshell scripts which are executed by the commands.
Location of file used by system: SETUP_DIR
Source Location: /instsoft/iris2/setup
There is one of these files for each of the wheels in the IRIS2 dewar (FILTER.cfg, GRISM.cfg, SLIT.cfg, COLDSTOP.cfg). They are text files describing the contents of the wheels. The files are used by the SPECTRO task, and also by the User Interface (to construct the menus of wheel positions).
Location of file used by system: SPECTRO_DIR
Source Location: /instsoft/iris2/spectro
This file is read by the DCT on startup or reset. It lists files to be downloaded to the controller (see Controller Files below).
Location of file used by system: DCT_DIR
Source location: /instsoft/iris2/dct_tests
This file is a text file used by the DCT which specifies the modes and speeds supported by the Controller. It may refer to other files (such as .spd files) which are either in the same directory (if a file name alone is specified) or in the /devccd directories.
Location of file used by system: DCT_DIR
Source location: /instsoft/iris2/dct_tests
There are a large number of files providing information to be downloaded to the controller, such as waveforms, parameters etc. The detailed description of these falls outside the scope of this document (they are maintained by the electronics group). The files a