2dF User Manual

2dF User Manual

Jeremy Bailey
Karl Glazebrook
Terry Bridges

Version 2.0, June 2002


I 1em2dF Description
1  Hardware Description
    1.1  The Corrector
        1.1.1  The ADC
    1.2  The Fibre Positioner
    1.3  The Fibres
    1.4  The Spectrographs
2  Software and Controls
    2.1  Overall System Description
    2.2  Hardware Interfaces
    2.3  Software Overview
II 1emPreparing Observing Programs for 2dF
3  Preparing Observing Projects
    3.1  Reference Stars
    3.2  Magnitude Effects
    3.3  Systematic Plate Distortions
    3.4  Proper Motions
    3.5  Choice of Fiducial stars
4  Configuration Input File Format
    4.1  File Format
    4.2  Example Input File
5  The Configure Program
    5.1  Introduction
    5.2  Obtaining and Installing Configure
    5.3  Running Configure
    5.4  Opening Files
    5.5  Converting Files
    5.6  Setting the Wavelength
    5.7  Setting the Field Plate
    5.8  Overview of Allocation Procedure
    5.9  The Allocation Procedure in more detail
        5.9.1  Target Priorities
        5.9.2  The Allocation Window
        5.9.3  Sky fibres
    5.10  Checking Allocation Validity
    5.11  Manual Allocation of Fibres
    5.12  The Graphical Display
    5.13  Saving a Configuration
    5.14  Command Line Switches
    5.15  Common Problems
    5.16  Tips for Running Configure
III 1emObserving with 2dF
6  The 2dF Software System
    6.1  Starting Up the 2dF System
    6.2  Overview of Software
    6.3  The Control Task
        6.3.1  Positioner Control
        6.3.2  Telescope Control
        6.3.3  CCD Control
        6.3.4  ADC Control
        6.3.5  Autoguider Control
        6.3.6  Spectrograph Control
    6.4  FPI Control
7  Observing Procedure
    7.1  Outline of Observing Procedure
        7.1.1  Preparation During the Afternoon
        7.1.2  Procedure During the Night
    7.2  Centering a Star in the FPI
    7.3  Running the ADC
    7.4  Telescope Focus
    7.5  The Declination Problem
    7.6  Configuring a Field
    7.7  Acquiring Fields
    7.8  Taking Calibration and Data Frames
        7.8.1  Typical Observing Sequence
        7.8.2  BIAS frames
        7.8.3  DARK frames
        7.8.4  Long Slit Flat Fields
        7.8.5  Multi-Fibre Flat Fields
        7.8.6  Wavelength Calibration Frames (ARCs)
        7.8.7  Object Frames
        7.8.8  Offset Sky Frames
        7.8.9  Standard Stars
            Outline of Procedure
            Detailed Procedure
            Time Requirements
            Useful Information
        7.8.10  Observing Overheads and Minimum Calibration Requirements
IV 1em2dF Data Reduction System
8  Data Reduction
    8.1  Introduction
    8.2  Obtaining and Installing 2dfdr
    8.3  Data Reduction System Setup
    8.4  Preparing Data for Reduction
        8.4.1  Files Required
        8.4.2  Converting FITS files
        8.4.3  Old 2dF Data
    8.5  Running the Data Reduction System
        8.5.1  Startup Problems
    8.6  Data Reduction - Quick Guide
        8.6.1  The User Interface
        8.6.2  Reducing Data
        8.6.3  Plotting Data
        8.6.4  Did it Work?
        8.6.5  Restarting the data reduction system
    8.7  The Data Reduction Process in More Detail
        8.7.1  File Name Conventions
        8.7.2  Calibration Files
        8.7.3  Combining Offset Sky Files
        8.7.4  Tram-Line Maps
            Plotting the Tram-Line Map
            Creating a New Fibre Position File
            Reducing the Flat Field
            Tram Maps with Other Files
        8.7.5  Fibre Extraction
            Background Subtraction
            Fitting Profiles
            Extracting Spectra
            Plotting Fits
            Cosmic Ray Rejection
            Fibre Overlap
        8.7.6  Dividing by Fibre Flat Field
        8.7.7  Wavelength Calibration
        8.7.8  Fibre Throughput Calibration
            Offset Sky Method
            Sky Lines Method
            Sky Flux Methods
            Finally ...
        8.7.9  Sky Subtraction
        8.7.10  Combining Reduced Spectra
            Continuum Level Adjustment
            Flux Weighting Option
        8.7.11  Summary of Data Reduction Sequence
    8.8  2dF Data Headers and the 2dfinfo command
    8.9  A Tour of the User Interface
        8.9.1  The Menus
            The File Menu
            The Options Menu
            The Commands Menu
            The Help Menu
        8.9.2  The Automatic Reduction Section
            The Setup Button
            The Start Button
            The Stop Button
        8.9.3  The Data Page
        8.9.4  The Parameter Pages
        8.9.5  The Execution Task Section
        8.9.6  The Plot Windows
            Interacting with Plots
            Plotting Fibre Spectra
            Changing the Size of the Plot Window
            Multiple Plots
            Making Hard Copies of the Screen Plot
    8.10  Old 2dF Data
        8.10.1  Fits Header Items
        8.10.2  Object and Sky Fibre information
        8.10.3  Setting the Class of the Data Files
        8.10.4  Data Contamination by Artificial Lights
9  2dF Gratings
        9.0.5  Grating Efficiencies
10  Instrument Sensitivity
    10.1  High Resolution
    10.2  Low Resolution
    10.3  Measured Efficiencies

List of Figures

    1.1  Schematic of 2dF, Corrector, and ADC
    1.2  Labelled picture of 2dF on the telescope.
    1.3  Schematic diagram of the 2dF Prime Focus corrector in cross-section. The lower two lens elements are the prismatic doublets making up the ADC; these are the first and second elements of the corrector in the light path.
    1.4  Wavelength Dependence of Radial Distortion
    1.5  Showing how FPI star images look for nulled, correct, and incorrect ADC settings. These images were taken with a non-standard BG1 (UV+near-IR passband) filter, which blocks the V band light.
    1.6  2dF Robot Positioner
    1.7  General arrangement of tumbler unit, fieldplates and fibre retractors. Drawing not to scale; only one of 40 retractor units shown on each fieldplate for clarity.
    1.8  2dF Field Plate
    1.9  Variation of Fibre Diameter with Field Radius
    1.10  Diagram showing the 2dF button, and the gripper jaws. The 2dF buttons are 4mm long (1 arcmin on the sky), and 2 mm wide.
    1.11  Picture of Fibres on the Fieldplate
    1.12  Closeup of Fibres on the Fieldplate
    1.13  Guide Bundle Layout
    1.14  Spectrograph optical layout
    1.15  Picture of 2dF Spectrographs
    2.1  2df Computer Systems
    2.2  Simplified Diagram of 2dF Software Structure
    5.1  Configuration Main Window after Fibre Allocation
    5.2  Allocation Parameters Dialog Box
    5.3  The Configuration Graphical Display, with a sample configuration.
    6.1  The Control Task Main Window - An individual control window for each of the six subsystems can be brought up by clicking on the more buttons
    6.2  The Positioner Control window - This is obtained by clicking on the more button in the Positioner section of the main Control Task. window
    6.3  The Telescope Control window - This is obtained by clicking on the more button in the Telescope section of the main Control Task window
    6.4  The CCD Control window - This is obtained by clicking on the more button in the CCD section of the main Control Task window
    6.5  The ADC Control Window - This is obtained by clicking on the more button in the ADC section of the main Control Task window
    6.6  The Spectrograph Control window - This is obtained by clicking on the more button in the Spectrograph section of the main Control Task window
    6.7  The FPI control task window - used for imaging stars in the focal plane of 2dF
    8.1  The 2dF data reduction system main window
    8.2  Typical result from the Plot Tram Map... option (after zooming the plot several times using the Z key). The tram lines run through the centre of the data on which they are overlaid.
    8.3  Correct appearance of a reduced 2dF arc exposure. The lines run straight up the image as all fibres have been rebinned to the same wavelength scale. Compare with Figure 8.4 .
    8.4  Appearance of an incorrectly reduced 2dF arc exposure. The arc lines in different fibres do not line up. Such a result is usually caused by incorrect wavelength or grating information in the header, or (as in this example) by use of the wrong arc line list. Compare with Figure 8.3 .
    8.5  The Plot Window
    8.6  Fibre spectrum contaminated by neon emission from a neon lamp on the 2dF electronics
    8.7  Fibre spectrum contaminated by emission from a red light emitting diode on the 2dF electronics. The LED causes the broad emission feature at 6600 A.
    9.1  Efficiencies for Low Dispersion Gratings
    9.2  Efficiencies for Medium Dispersion Gratings
    9.3  Efficiencies for High Dispersion Gratings
    10.1  Figure showing the total 2dF system efficiency as a function of wavelength, for the 300B gratings. The squares and diamonds represent broadband absolute efficiency measurements from Jan 1997 and Nov 1999, respectively, corrected to 1.0 arcsec seeing. The solid line was obtained from a relative throughput calibration using data from Jan 2001, scaled to approximately match the broadband measurements. Figure taken from Lewis et al. 2001.

List of Tables

    7.1  Parameters for the 2dF TEK CCDs
    7.2  Arc & Flat Setups and Exposure Times
    9.1  2dF Grating Specs
    10.1  2dF System Throughput vs. Wavelength

2dF Description

Chapter 1
Hardware Description

Interested readers are referred to the recent article by Lewis et al. 2002: ``The Anglo-Australian Observatory 2dF Facility" ADS or gzipped postscript (MNRAS, 333, 279), which gives the historical background to 2dF, the design philosophy, a full technical description, 2dF performance, and some of the science that has been done with 2dF. Many of the figures below are taken from this article.

2dF users should also see the 2dF WWW page for the most recent 2dF information, and to obtain 2dF software.

The 2dF system consists of the following main components:

2dF uses a new telescope top-end, with the spectrographs and much of the control electronics mounted on the top-end ring. Figure 1.1 shows a schematic of the top-end, while Figure  1.2 is a labelled picture of 2dF on the telescope.

Figure 1.1: Schematic of 2dF, Corrector, and ADC

Figure 1.2: Labelled picture of 2dF on the telescope.

1.1  The Corrector

Figure 1.3: Schematic diagram of the 2dF Prime Focus corrector in cross-section. The lower two lens elements are the prismatic doublets making up the ADC; these are the first and second elements of the corrector in the light path.

Figure 1.4: Wavelength Dependence of Radial Distortion

The 2dF corrector is a 4 component system designed by Damien Jones based on an original concept by C.G. Wynne; see Figure 1.3. Its very large field of view is achieved at some cost to its general broad-band imaging performance; however for multi-object fibre spectroscopy utilising ~ 2 arc second input fibres, this compromise is well worth taking. The most serious image degradation is a strong chromatic variation in distortion term which has the effect of dispersing images in the radial direction by up to 2 arc seconds over the full 350-1050nm wavelength range. This dispersion reaches a maximum at about half the full field radius as shown in Figure 1.4.

The corrector incorporates an atmospheric dispersion compensator (ADC). The ADC is formed by making each of the first two elements of the corrector prismatic doublets which can independently rotate to compensate for the dispersion effects of the atmosphere for all zenith distances (ZDs) less than 65 degrees. These prismatic doublets are close to a metre in diameter and hence represent some of the largest lenses ever made for astronomy. The glass blanks for the corrector were cast by Ohara (Japan) and the optical figuring and mechanical mounting was done by Contraves (Pittsburgh, USA).

The large radial distortion introduced by the corrector results in an image scale which varies from about 15.5 arcsec/mm in the centre to about 14.2 arcsec/mm at the edge. The corresponding change in focal ratio is from f/3.4 to f/3.7.

1.1.1  The ADC

The ADC consists of two prismatic doublets (which are also the first two elements of the 2dF corrector), each made of a cemented pair BK7 and F2 lenses. These two lenses may be driven to any angle using stepper motors controlled by a SSX stepper motor controller or more usually from higher level software (a DRAMA ADC task running as part of the 2dF control system).

When observing away from the zenith the atmosphere acts to disperse the light from target objects into small spectra. The two elements are arranged so that their resultant dispersion vector is equal and opposite to the to the atmospheric dispersion.

By having two prisms of fixed dispersion able to rotate we can vary the resultant dispersion from zero (prisms opposed) to double the dispersion of the individual prisms (prisms aligned).

The atmosphere acts to disperse the blue light towards the horizon along the parallactic angle so the resultant dispersion vector of the ADC must point towards the zenith along the parallactic angle.

This means that in general the thick part of the prisms must point towards the zenith. So for a target field in the north west, the parallactic angle is shown on the mimic display pointing towards the zenith (in the south east relative to the field) and the dispersion vectors of the two ADC elements will be symmetrical about the parallactic angle. In real life the reference marks will point towards the northwest as they represent the thin part of the prism.

Similarly for a field in the southeast, the parallactic angle will be drawn in the northwest with the dispersion vectors drawn symmetrically either side of the parallactic angle. In real life the reference marks will be seen pointing to the southeast.

Figure  1.5 shows FPI star images with the ADC nulled, tracking, and anti-tracking.

Figure 1.5: Showing how FPI star images look for nulled, correct, and incorrect ADC settings. These images were taken with a non-standard BG1 (UV+near-IR passband) filter, which blocks the V band light.

1.2  The Fibre Positioner

Figure 1.6: 2dF Robot Positioner

Figure 1.7: General arrangement of tumbler unit, fieldplates and fibre retractors. Drawing not to scale; only one of 40 retractor units shown on each fieldplate for clarity.

The design of the 2dF positioner was driven by the requirement that fields may need to be reconfigured as frequently as once every hour to cope with the effects of differential atmospheric refraction over the 2 degree field. Thus it must be possible to set up a 400 fibre field in one hour. Also, in order to avoid unacceptable dead time, a double buffered arrangement has been adopted to allow the next field to be configured while observing the current one. Figure  1.6 shows a picture of the 2dF robot positioner.

This is achieved with a Tumbler arrangement on which two field plates are mounted. A robotic gripper head mounted on an X-Y gantry moves over the upper plate and places magnetic buttons attached to the fibre ends at the required positions on the plate. A TV system in the gripper head is used to measure and refine the position of the fibre. Once the field set up is complete the tumbler can rotate to place the field plate in the lower position where the fibres receive light from the telescope, while the second plate is now positioned for fibre set up. A second X-Y gantry at the base of the positioner carries the focal plane imager (FPI), a CCD camera which can be used for viewing objects in the field. It can be used to assist with field acquisition and for calibrating field distortion and related effects. Figure 1.7 shows a schematic of the tumbler unit, fieldplates, and fibre retractors.

The X-Y gantrys are driven by linear motors rather than the lead-screw technology used in the previous Autofib system. The X axis uses two linear motors to drive both ends of the Y beam simultaneously, while a single motor drives the gripper along the Y-beam.

1.3  The Fibres

Figure 1.8: 2dF Field Plate

Figure 1.9: Variation of Fibre Diameter with Field Radius

Each field plate has 400 object fibres and an additional 4 guide fibre bundles, making a total of 808. Figure  1.8 shows a picture of one of the field plates. The fibres are 140mm in diameter corresponding to about 2.16 arc sec at the field centre and 2 arc sec at the edge of the field with a variation with field radius as shown in Figure  1.9.

Figure 1.10: Diagram showing the 2dF button, and the gripper jaws. The 2dF buttons are 4mm long (1 arcmin on the sky), and 2 mm wide.

Figure 1.11: Picture of Fibres on the Fieldplate

Figure 1.12: Closeup of Fibres on the Fieldplate

The fibres are terminated by a magnetic button which can be picked up by the gripper and placed on the field plate. A prism at the head of the button reflects the light from the object into the fibre; see Figure 1.10. Figure  1.11 shows a picture of the fibres on a fieldplate, and Figure  1.12 is a closeup of a few fibres on the fieldplate.

Figure 1.13: Guide Bundle Layout

Each guide fibre bundle contains a central fibre surrounded by six more fibres in a hexagonal arrangement. The guide bundles feed an autoguiding TV camera which is used to acquire the field, and then to guide on the field. From 2002 onwards, we now have a true autoguider, which works very well. The fibres in the guide bundles have a diameter of 95mm (about 1.4 arc sec) and are spaced by 120mm (1.8 arc sec). See Figure  1.13 for a schematic of the guide bundle layout.

In May 2002, we began to implement plate rotation with 2dF. Here, the rotation of the plates can be controlled by the Night Assistant or Support Astronomer, by up to 0.5 deg. This allows any residual rotation to be taken out during field acquisition, and will help to some extent to counter the effects of differential refraction during long exposures.

1.4  The Spectrographs

Figure 1.14: Spectrograph optical layout

Figure 1.15: Picture of 2dF Spectrographs

The two identical fibre spectrographs each receive 200 fibres. The spectrographs consist of an off-axis Maksutov collimator feeding a 150mm collimated beam to the gratings and thence, at a collimator/camera angle of 40 degrees to an f/1.2 camera. The camera is a modified Schmidt design using a single, severely aspheric corrector plate. Figure 1.14 shows the main components and optical layout of the 2dF spectrograph(s), while Figure 1.15 is a picture of one of the 2dF spectrographs.

The spectrographs use the same gratings as the RGO spectrograph. A number of duplicate gratings have been bought to allow simultaneous use of identical gratings in the two spectrographs. The gratings are listed in Chapter 9, and here is a link to the AAO Gratings WWW page.

The detectors are 1024 × 1024 thinned Tektronix CCDs. With 200 spectra on each detector the spectra are positioned roughly 5 pixels apart. Both CCDs are now science-grade devices, with good cosmetics. Spectrograph #2 suffers from halation from an unknown source, and thus slightly higher levels of scattered light. The 2dF WWW page gives up-to-date information about 2dF and all its components.

The spectrographs contain a slit assembly which allows for switching between the fibre bundles coming from the two field plates. This also provides for the back illumination of the fibres needed by the positioner.

Chapter 2
Software and Controls

2.1  Overall System Description

Figure 2.1: 2df Computer Systems

2dF is controlled by a distributed system involving a number of different types of computer systems; see Figure  2.1 for a `flowchart'.

Two VxWorks systems (2dFPos and 2dFSys) controlling the 2dF positioner hardware, and ADC are mounted on the top end ring with the control electronics for the 2dF positioner. Another system (2dFSpec) is also on the top end ring in the spectrograph electronics rack and controls the two spectrographs. An Ethernet link connects them with the other systems in the control room.

A fourth VxWorks system (2dFAg) in the control room is used to run the Autoguider. It receives images from the Quantex TV camera via a frame grabber, and sends offset demands to the telescope via a Camac interface.

2.2  Hardware Interfaces

Most mechanisms in the 2dF positioner and spectrographs are controlled via Delta Tau PMAC cards in the VME system. The PMAC is a versatile programmable servo controller capable of providing the fast and precise control needed for the positioner's XY gantrys.

Other interfaces include a number of frame grabbers used to read images from the TV cameras in the positioner and autoguider. The controller for the focal- plane imaging CCD is controlled via an IEEE bus interface from the VME system.

2.3  Software Overview

To meet the needs of the 2dF project for a distributed software system running over a variety of different processors and operating systems, the AAO software group have developed the DRAMA software environment. DRAMA provides for the development of modular software systems made up of a number of tasks which communicate via a message system. DRAMA tasks can run on the VxWorks, UNIX and VMS systems and efficient communication is possible between all the systems on the network as well as locally between tasks on the same machine. The messages are encoded using a self-defining data system (SDS) which automatically handles differences in data representation over the different machine architectures.

DRAMA is used for most of the software in the 2dF system, except for the OBSERVER system used for the CCD data taking which uses the older ADAM environment.

Figure 2.2: Simplified Diagram of 2dF Software Structure

The main software components are shown in Figure 2.2 which presents a simplified view of the system. Many of the boxes on this diagram actually represent a number of tasks. For example the positioner system consists of a main task, and subtasks to control the gripper gantry, FPI gantry and tumbler.

All 2dF software is controlled through graphical user interfaces, most of which have been developed using the Tcl/Tk system developed by John Ousterhout at Berkeley. All 2dF user interfaces follow the Motif style guide and should be easy to follow for anyone used to Motif or a similar system such as Microsoft Windows or the Macintosh interface.

Preparing Observing Programs for 2dF

Chapter 3
Preparing Observing Projects

with thanks to Mike Irwin

This section describes what is involved in preparing an observing project for 2dF. The basic steps involved can be summarised as follows:

  1. Obtain astrometry for objects in a field.

  2. Select from the astrometry data, target objects of interest in a two degree diameter field, as well as fiducial stars and sky regions in the same field.

  3. Allocate fibres to the objects in the field.

It is assumed that most 2dF users will make use of data from the APM or SuperCosmos measuring machines to provide Step 1. However, any source of reliable astrometry with relative errors over the two degree field <0.5 arcsec should be suitable. After selection of objects a text file is generated describing the objects for a 2dF field configuration. The required file format is described in Section 4.

Step 3 is performed using the Configure program which is described in Section  5.

Successful use of 2dF depends on accurate source positions. With fibre diameters of 2 arc seconds, positions accurate to better than 0.5 arc seconds are needed to avoid significant light loss. Most 2dF projects are likely to be based on astrometry from Schmidt plates measured with the APM or SuperCosmos machines. We believe that all of the major measuring machines (SuperCosmos, APM, USNO, the STScI PDS, and others) have more than adequate accuracy for 2dF purposes, i.e. relative positions can be measured to 0.3 arcsec or better across the two-degree field. However, special care still needs to be taken when doing astrometry, and the following considerations need to borne in mind.

3.1  Reference Stars

The best currently available reference star catalogue with sufficient star density for Schmidt plate reduction is the Tycho-2 catalogue of Hog et al. (2000; A&A, 355, 27). This contains positions and proper motions of around 2.5 million astrometric reference stars on the TYCHO-HIPPARCOS system. All online, and any recent APM and SuperCosmos catalogues, are reduced using this TYCHO astrometric grid. This generally provides several hundred astrometric stars per Schmidt field down to V = 11 and greatly alleviates many of the earlier problems found with doing accurate astrometry on sky survey Schmidt plates. The Tycho-2 catalogue supersedes the Tycho-1 and ACT catalogues, as well as earlier catalogues such as the PPM (Positions and Proper Motions) catalogue of Roeser and Bastian. Systematic errors in the TYCHO+ACT catalogue are negligible at the few mas level, while the random errors in individual star positions are 30 mas at the mean epoch of the catalogue ( ~ 1990) degrading by 3 mas/yr due to proper motion errors.

Although all the recent data is reduced using the Tycho-2 catalogue, some older data, such as the Cosmos database, uses the SAO catalogue which is much less accurate (1.2 arc sec). If you want to reduce your own data on the new system make sure you use the Tycho-2 Catalogue.

3.2  Magnitude Effects

The accuracy of astrometry from Schmidt plates is dependent on the magnitudes of the objects being measured. Over most of the range of interest the accuracy appears to be of the order of 0.1 to 0.3 arcsec as determined by comparing measurements of different plates of the same field. The accuracy degrades somewhat for the faintest objects on the plates, but can also be poor for bright objects where the images are large and saturated and show both strong diffraction spikes and large reflection halos. Unfortunately the astrometric reference stars used to calibrate the astrometry fall into this range. Provided these errors are random this is not a problem, as there are a large number of reference stars available to determine a small number of plate constants.

However, systematic magnitude dependent effects can cause problems, and there is some indication that such effects are present, particularly if the brightest available reference stars are used. To a large extent this problem has been reduced to acceptable levels with the latest Tycho-2 astometric catalogue, which reaches 1 magnitude fainter than the PPM catalogue. However, the relative positions of bright and faint targets can still be systematically different at the few 10ths of an arcsec level, due to the differences in intrinsic image profile with magnitude. This effect is likely to be machine-dependent, since it depends on both the effective scanning beam profile of the machine, the algorithms used to determine image centroids and perform background followong; and the astrometric reduction technique adopted. It also varies across Schmidt plates and between different plates, since it is partially dependent on such things as `seeing' and tracking. It is therefore advisable to use only the fainter reference stars.

Both APM and SuperCosmos have adopted a similar method for dealing with these problems using essentially the same algorithms for the whole measurement and reduction process.

3.3  Systematic Plate Distortions

Analysis of HST guide star catalogue data by Taft and colleagues (1990) revealed the existence of a pattern of systematic distortions in Schmidt plate astrometry, from measurements made using the STSci PDS machines, at a level of about 1 arcsec. This implies that better astrometry can be obtained using local fits to a small area of the plate, rather than using a standard global solution for the entire plate. Irwin (Working Group on Wide Field Imaging, newsletter 5) demonstrated that APM data from the first epoch Palomar sky survey plates (POSSI) shows a similar very stable distortion pattern, as do UKST plates measured with the APM, albeit at a much lower level. The distortion pattern is very stable and is automatically mapped out of the final astrometric product for the on-line catalogue data provided by both APM and SuperCosmos. However, it is worth noting that residual magnitude-dependent distortions do still remain after this operation at the 0.25 arcsec level for UKST plates and around 0.5 arcsec in the corners for POSSI plates, since the distortion pattern itself is also a function of magnitude.

Much of the magnitude-dependent systematic error is radial and appears to strongly follow the vignetting pattern. That is, up to a radius of 2.7 degrees from the plate centre there is little effect, beyond 2.7 degrees radius there is a strong, roughly linear increase in astometric distortion between the bright images and faint images, to as much as 1 arcsec at the corners. The onset of the effect is progressive and appears to be at around V = 14, where the diffraction spikes start to become visible. Fainter than this the effect is negligible, but by about V = 9 is can be as much as 1 arcsec in the corners.

This problem is what currently limits the delivered external accuracy of Schmidt plate data.

Second epoch Palomar sky survey data (POSSII) show a similar low level overall distortion pattern to the UKST plates and therefore if possible either UKST or POSSII plates should be used for 2dF astrometry. In any case some correction for the systematic distortions should be included in the astrometric reductions or judicious use of a local astrometric fit can alleviate the problem.

3.4  Proper Motions

Another reason for using recent epoch material is to mitigate the effect of proper motion of the guide stars selected for 2dF use, relative to the target objects. Even if the target objects are extragalactic, proper motions in the guide stars can give rise to errors in field acquisition. There are a number of steps that can be taken to minimise this problem:

3.5  Choice of Fiducial stars

There are four fibre bundles which are used for guiding whose pivots are located at the North, East, South and West cardinal points of the two degree field. Due to the fibre pivot angle constraints each of them can only access about 0.25 deg2 of sky, so a density of about 20-30 stars are required per 2dF field to ensure all 4 bundles are allocatable. Now that plate rotation has been implemented with 2dF, it is recommended that each configuration have at least 2 guide stars near the edge of the field (to give a better handle on rotation corrections), which requires even higher numbers of candidate guide stars (40-50/field).

Many of the potential astrometric problems discussed above are minimized by choosing guide stars as faint as possible. The TV used to guide with 2dF can see stars down to V = 15 in typical seeing. This limit has been established empirically using Landolt standards. Be careful that your magnitudes are on this scale - in particular APM stellar magnitudes diverge from an accuracy of ~ 0.25 magnitudes at the faint limit due to plate variations in the internally derived magnitude calibration system.

Fiducial stars should not cover more than a 1 mag range, due to limited dynamic range on the guiding TV. A further safety measure is to use guide stars which are themselves part of the target set wherever possible; this works particularly well in the case of star clusters or Magellanic Cloud samples, since then all targets and fiducial stars have the same proper motion.

It is vital that the positions of fiducials should be checked by eye on Sky Survey plates or by downloading digitised maps of the region and checking to ensure that their positions have not been grossly corrupted by: faint halos, diffraction spikes, blending with companions etc... Halo effects are especially a problem for stars with V<12 when the positions have been derived from survey plate scans. Fiducials measured from CCD data may well be okay but can also suffer from charge bleeding and so on. Fiducials can also be checked using the Digital Sky Survey (DSS) CDRoms with the getimage program or by WWW access.

Chapter 4
Configuration Input File Format

A standard format for the input (.fld) file used to describe a field has been adopted for 2dF on the AAT and the Autofib-2 instrument on the William Herschel Telescope in La Palma (Lewis, 1993). The file is an ASCII text file listing the field details, and the details of each target. This section describes the required format.

4.1  File Format

The .fld file consists of character lines. Comment lines can be indicated by an asterisk character in the first column. The first four data lines in the file must contain information on the target field, each item beginning with one of the following keywords (which may appear in any order).

LABEL A string giving the target field label
UTDATE The UT Date of observation
EQUINOX Equinox of coordinates (e.g. B1950, J2000)
CENTRE Field Centre R.A. and Dec

For Autofib-2 the files include two additional items (SKYPA and FIBRES). These are not required for 2dF and are ignored.

Subsequent lines describe target objects, one per line. Each line consists of a number of items separated by spaces.

4.2  Example Input File

* This is a comment line
LABEL target field number 1 xyz cluster
UTDATE 1994 05 12
CENTRE 12 43 23.30 +10 34 10.0
* end of required header info
F1   12 40 20.55 +10 30 11.4    F   9  12.0  1  brightest star
F2   12 38 10.31 +09 59 58.9    F   9  13.5  1  fiducial star
NGC1002  12 41 30.55 +10 31 56.9  P 2  15.0  1  small fuzzy galaxy
ic3082  12 40 18.40 +10 32 21.5   P 2  17.0     1  candidate satellite
sky-1   12 40 10.00 +10 32 21.5   S 5  99.9     1  blank sky (checked)

Chapter 5
The Configure Program

5.1  Introduction

The 2dF Configure program is used to perform the following main functions:

5.2  Obtaining and Installing Configure

You may obtain Configure from the 2dF Software WWW page. Here you will find a link to the 2dF ftp site where you can download Configure; the compressed tar file contains instructions for installing Configure, and versions are available for Solaris and Linux. From this page you can get the latest 2dF fibre and astrometry files. Remember to get the astrometric files for the declinations that you'll be using; see the README file there for more information. The 2dfdr data reduction software may also be obtained from this site.

5.3  Running Configure

Before running Configure, it needs to know where the current fibre and astrometry information files are. This is done by typing: setenv CONFIG_FILES directory_where_files_are; e.g ``setenv CONFIG_FILES . '', if the files are in the current directory. At Epping, the files are stored in: /pub/2df/latest_config_files/mxx, where xx= declination (e.g. /pub/2df/latest_config_files/m30). At Coona, they are in: ~ 2dF/config/poscheck_xxxyy/mzz, where xxx=month, yy=year, and zz= declination (e.g. ~ 2dF/config/poscheck_may02/m30). At other sites, grab the latest files via ftp as described above. Realize that fields usually have to be reconfigured at the telescope, closer to the actual time of observing, since fibre and astrometry information can change on short notice (i.e. fibres break!).

The program is started with the command configure typed at the UNIX shell prompt. You will first be asked if you want 2dF or 6dF, answer `2dF'. This will bring up two windows. The control window contains a menu bar, status display and message region: see Figure 5.1. The other window will be used to display a graphical representation of the 2dF field configuration being generated: see Figure 5.3.

5.4  Opening Files

The configuration program can read data from two types of files:

To open a configuration text file select Open... from the File menu and select your file using the resulting file selection dialogue. By default a file extension of .fld is expected for configuration text files.

To open an SDS configuration file select Open SDS... from the File menu and select your file using the resulting file selection dialogue. By default a file extension of .sds is expected for SDS configuration files.

On opening your file the status display will show a summary of information on the field, and the objects in the field will be drawn on the graphical display. In the case of a text file no fibre allocations will be present so the fibres will all appear on the graphical display at their park positions. An SDS file may already include fibre allocations and these will be shown on the display. To remove the existing allocations in order to start from scratch use Remove Allocations from the Commands menu.

Figure 5.1: Configuration Main Window after Fibre Allocation

5.5  Converting Files

The configuration program can be used as a way of converting configuration files between text and SDS formats in both directions.

To convert a text configuration file to an SDS configuration file use Open... from the File menu to open the file, then use Save or Save As... to save the file in SDS format. This sequence can be performed non-interactively using the -d switch on the command line when configure is invoked (see section 5.14 for more details).

To convert an SDS configuration file to a text file use Open SDS... from the File menu to open the file, then use List...Allocations to output the file in text format. The output file produced by List...Unallocated Objects is a valid configuration text file containing the unallocated objects from the configuration with EQUINOX set to J2000. It may also include a listing of the fibre allocations in the form of comments in the listing.

5.6  Setting the Wavelength

Before allocating fibres it is important to set the desired observing wavelength. Because of the large wavelength dependent distortion in 2dF it is possible for an allocation that is valid at one wavelength to be invalid at another wavelength. Therefore use the Set Wavelength... option in the Commands menu to set the desired central wavelength of observation.

5.7  Setting the Field Plate

Sometimes you will want to configure for a particular plate, for example when running online during a telescope run, or checking a field for the telescope. This is necessary because both plates always have different fibre and astrometry information.

To set the desired field plate use the Set Field Plate... option in the Options menu. The default is to use Plate 0, but this can be changed using the -p option.

Alternatively one may wish to configure a field for both plates, for example to observe it continuously for 4 or more hours and hence reconfigure to allow for the Hour Angle effects. In this case one would configure for one plate, set the other plate, do a Check Allocation (see Section 5.10) and adjust the allocations of any fibres which cause clashes. However, this may not work very well (may find lots of collisions). An alternative is to change the fibre and button clearances, and the maximum pivot angle from their default values: in the Options menu, select `Expert' mode; then when you Allocate, you will find more options on the popup window; change `Fibre clearance' and `Button clearance' from 400 to 600 microns, and `Max non-radial pivot angle' to 12 degrees; then set the other Allocate parameters in the usual way. Now, when you check the allocation on the other plate, you will have many fewer collisions; the penalty is a slightly decreased allocation of objects (but only by 2-3%, even in very crowded fields). You should also find less collisions when you do the Check over HA Range (see next Section).

5.8  Overview of Allocation Procedure

An automatic allocation of fibres can be done by selecting Allocate... from the Commands menu. This will bring up a dialogue box with a number of parameters controlling the allocation process. The default parameters should normally be suitable. During the allocation process, which will typically take a few minutes to complete, a progress window will report on the progress of the allocation, and the graphical display and status display will be updated as new fibres are allocated.

The default is to leave ~ 20 fibres for sky. Once the object allocation is complete you can assign these to sky positions. These can be either generated on a standard grid (using Allocate Sky Grid... from the Commands menu) or they can be supplied in the input file. Alternatively you can add sky positions manually (see Section  5.11). One should aim for at least 10-15 sky fibres for each spectrograph, i.e. a minimum of ~ 30 total.

Once the allocation is complete it will be checked for validity at the current position. As an extra step you should select Check Over HA Range from the Commands menu to check the validity of the field over a range of hour angles (the default is to check for 4 hours from the meridian on the date set by the UTDATE field).

Saving the configuration as an SDS file will now give you an input file for the 2dF positioner. You should ensure all the available guide fibres were allocated.

5.9  The Allocation Procedure in more detail

The above recipe will suffice for the majority of 2dF fields. The hardware constrains the fibres to an angular limit of about 14 degrees from the radial direction (or, more rigourously, from the direction in which they exit the retractor block!), but fibres are allowed to cross multiple times so in most cases a high percentage of them can be allocated to targets.

The algorithm currently used (developed by Gavin Dalton at the University of Oxford) is very optimised and has proved to give the best results for `typical' fields. After an initial allocation pass (preceded by the mysterious `Generating Cone Tree' message), it searches down a tree of multiple fibre swaps, looking for swaps which give increased allocations. The algorithm is not unlike a chess program. The tree search terminates at a depth of ten swaps where it is has been found, empirically, that the expenditure of CPU time required to deepen the search is not rewarded by increased allocations.

The algorithm handles objects of different priorities by trying to allocate the highest priority objects first. During the swapping process it will continue to search until it becomes possible to allocate a fibre which was previously parked, or to promote an allocated fibre to a higher priority object.

After the swapping phase there is a final `uncrossing' pass which looks at all pairs of fibres which cross to see if they can be reversed. This is important, as reducing the number of fibre crossings in the final configuration provides a significant reduction in the field-field setup time by reducing the numbers of fibres that must be parked in transit, but this reduction is provided without constraining the allocation itself.

5.9.1  Target Priorities

The targets are allocated in order of priority, with a numerical value of 9 being the highest priority objects and 1 being the lowest. To ensure all guide fibres are allocated it is best to give them the very highest priority.

5.9.2  The Allocation Window

The parameters here control the various steps of the allocation. The default is to allocate the maximum number of targets and leave 20 fibres for subsequent sky allocation; see Figure 5.2.

Figure 5.2: Allocation Parameters Dialog Box

5.9.3  Sky fibres

The recommended procedure is to first allocate the objects, leaving a certain number for sky, and then assign the leftovers to sky positions.

The observer can supply sky positions in the input catalog - for example positions which have been carefully checked on images to ensure the absence of bright objects. To assign to these simply select `only allocate sky' in the Allocation dialog.

Alternatively a grid of sky positions may be generated and allocated automatically by selecting Allocate Sky Grid... from the Commands menu.

Finally arbitrary sky positions can be assigned interactively (see Section 5.11 below).

It may be desirable to check the positioning of sky fibres that have been automatically allocated or added by hand, to ensure that these are not contaminated by stray objects, particularly brighter stars. This can be done by selecting List... from the Commands menu, and checking the Allocated Sky as DSS input button. This will list all allocated sky positions as J2000 coordinates to a file (the default is the same as the input file, but with the extension .dss) which is in the correct format to be read by the commonly available StScI getimage program. The sky positions are named S??? in the .dss file, where ??? is the fibre number. The content of the sky fibres can then be conveniently be checked using a FITS-aware visual browser (e.g. the visual schnauzer in xv).

5.10  Checking Allocation Validity

The allocation process results in a fibre configuration which is valid at a single time. However, small changes in the relative positions of objects as a result of refraction and other effects could make this configuration invalid at other times and different telescope positions. It is possible to change the Hour Angle using the Set HA... option in the Commands menu, and then check the validity of the allocation using Check Allocation.

The Check over Range of HA... option in the Commands menu performs a check that a fibre configuration remains valid over a range of dates and telescope hour angles. The check should run through with Allocation OK reported in the message region for each position tested. To enable the full functionality of Check over Range of HA... `Expert' mode (found under the Commands menu) has to be chosen.

Occasionally one or two fibres or buttons which are OK at the zenith will cause collisions at large hour angles. The simplest procedure is to manually reassign these as extra sky fibres or to deallocate (park) them (see Section 5.11 below), although it is usually possible to manually adjust the configuration to preserve the target allocation whilst removing the collisions. An automated procedure for this task is under construction.

5.11  Manual Allocation of Fibres

It is also possible to manually allocate individual fibres to objects, although this is not normally necessary, since Configure is very efficient (and assuming you have proper priorities set in your input .fld files). Manual allocation of fibres should be avoided wherever possible, because it makes it more difficult to reconfigure the field at a later date (fields are usually reconfigured nearer the time of observation). If you are using a priority scheme for allocating targets then you can highlight all allocated or unallocated targets within a given range of priorities using the View menu.

Manual allocation is performed by interacting with the graphical display as follows:

The validity of the resulting configuration will be checked, and a progress dialogue will be displayed as this happens. If the resulting configuration is valid the allocation will be made and the display updated. If it is not valid an error dialogue will appear.

There is a short cut to the manual allocation procedure which avoids the use of the menu as follows:

It is possible to manually allocate fibres and then select `uncross first then allocate extras' in the allocation window to automatically assign the rest of the fibres while preserving the manual allocation.

It is also possible to deallocate fibres manually as follows:

Sky positions are allocated in a similar way to objects. However, there is the extra facility to generate an arbitrary sky position anywhere in the field. To do this select the fibre in the normal way with the left mouse button. To assign it to sky use CTRL + middle mouse button. This creates a sky entry in the configuration under the cursor and attempts to assign a fibre to it; this is most useful for assigning miscellaneous unallocated fibres to nominal sky positions.

5.12  The Graphical Display

The display can be zoomed to magnifications of 2, 4 or 8 times its normal scale using the Zoom menu. The zoomed display can be scrolled using scroll bars.

It is also possible to zoom the display by a factor of two about any selected point by clicking the right mouse button with the cursor positioned at the desired centre. To unzoom, select `Normal' in the 'Zoom" menu item in the Configure control panel.

Figure 5.3: The Configuration Graphical Display, with a sample configuration.

In the display fiducial stars are shown as large red circles, objects as small black circles and sky fibres as blue squares. The fibres buttons are coloured blue for normal fibres, green for guide fibres and grey for disabled fibres. Selected objects and fibre buttons are shown in red. Information about individual objects or fibres in the display can be examined by double clicking on the object or fibre button.

To locate an arbitrary fibre button enter the the pivot number in the fibre info popup and press RETURN - the fibre button selected in red changes to the requested one.

The display can be printed by selecting the Print... command from the File menu. A postscript version of the display will be generated which can either be sent directly to a printer, or saved as a file according to selections in the resulting dialogue box.

5.13  Saving a Configuration

After completing the allocation process and checking its validity the resulting configuration can be saved as a SDS file using Save or Save As... from the File menu. The resulting file is in a form suitable for use by the 2dF observing system.

A text file listing the fibre allocations and/or the unallocated objects can be obtained by selecting List... from the File menu.

5.14  Command Line Switches

configure supports a number of command line options:

There are also options that can be used to perform specific actions when invoked with the -f option:

5.15  Common Problems

  1. ``Open File...'' gives funny errors - most likely fields are missing from the .fld input file. Check it has all required fields (see Chapter 4). The most common error is to forget the Program ID. (At some point configure will be made more robust...)

  2. Will not allocate given sky positions - check the sky positions have higher priorities than objects and set Number of Fibres to Leave for Sky to 0 before running Allocate.

5.16  Tips for Running Configure

  1. Making it Easier to Configure the Same Field on Both Plates

    One may wish to configure a field for both plates, for example to observe it continuously for 4 or more hours and hence reconfigure to allow for the Hour Angle effects. Usually, however, if you allocate on one plate using the default parameters, the allocation will fail dramatically on the other plate, with many collisions. A better way is to change the fibre and button clearances, and the maximum pivot angle from their default values: in the Options menu, select `Expert' mode; then when you Allocate, you will find more options on the popup window; change `Fibre clearance' and `Button clearance' from 400 to 600 microns, and `Max non-radial pivot angle' to 12 degrees; then set the other Allocate parameters in the usual way. Now, when you check the allocation on the other plate, you will have many fewer collisions; the penalty is a slightly decreased allocation of objects (but only by 2-3%, even in very crowded fields). You should also find less collisions when you do the Check over HA Range

  2. Obtaining Higher Yields in Crowded Fields

    When allocating in crowded fields (e.g. Galactic globular clusters), one can usually obtain significant increases in the number of allocated objects via the following procedure:

    By forcing the first allocation to be nearly radial, this (somehow!) allows more objects to be allocated in total.

Observing with 2dF

Chapter 6
The 2dF Software System

6.1  Starting Up the 2dF System

The 2dF system should only be started up and shut down by AAO technical staff and support astronomers, who should refer to the `2dF Survival Guide' for details of how to do this. Any `serious-looking' problems should only be dealt with by these people as well.

6.2  Overview of Software

The 2dF software system is controlled through a number of user interface tasks which appear on the Sparcstation and the adjacent X-terminal. These are as follows:

The 2dF Control Task (tdfct) - This task is responsible for loading and initialising all the others. It contains status windows for all the subsystems it controls as follows:

Each of these sections contains basic information on the status of the subsystem and a More button. Clicking on this button will bring up a control window which provides more detailed control of the specific subsystem.

FPI Control Task (fpictrl) - This task provides control of the focal plane imaging camera, and its gantry. It is possible to use this task to drive the FPI to any star in a configuration file. It is used for field acquisition and for the astrometric calibration process. The images from the FPI camera are displayed by the IMG task which has its own window.

The Positioner User Interface (POS) - Under normal operation the main purpose of this task is to provide a mimic display of the 2dF positioner. It also includes the ability to control most of the positioner functions. In normal operation, however, the positioner should be controlled through the control task's positioner control window, whenever possible, rather than through the POS task.

6.3  The Control Task

Figure 6.1: The Control Task Main Window - An individual control window for each of the six subsystems can be brought up by clicking on the more buttons

The main window of the control task is shown in Figure 6.1. This window contains status displays for the six subsystems managed by the control task (Telescope, ADC, Autoguider, CCDs, Positioner, Spectrographs). Any of these sections can be removed from the display by clicking the button in the top right hand corner. It can be restored to the display using the Display menu.

A number of options are controlled through the Commands menu which contains the following commands:

Initialise - This command causes the control task to load and initialise all the subsystems.

Reset - When the system is initialised the Initialise entry is replaced by the Reset entry. This brings up a dialogue which allows a number of different levels of system reset. The Recover option is the most useful. This can be used to make the control task reload any task on the Sun that has crashed or been deleted.

Task Status - This brings up a window showing the status of all the subtasks managed by the control task.

Report - This outputs information on the subtasks in the messages window.

Delete Tasks - This can be used to delete one of the subtasks. It is most useful if a task gets hung for some reason. Delete the task and then use Reset/Recover to reload it.

Display Configuration - This can be used to display information about a fibre configuration file.

The following sections describe the individual subsystem control windows which are obtained by clicking on the more buttons on the main window.

6.3.1  Positioner Control

Figure 6.2: The Positioner Control window - This is obtained by clicking on the more button in the Positioner section of the main Control Task. window

The Positioner Control window is shown in Figure 6.2.

The top section of the display in Figure 6.2 shows that the plate in the configuring position (Config Plate) is currently field plate 1. This means that plate 0 is in the observing position. The last configuration file which each plate was set up with is shown below this. You can double click on the file name to get further details on the configuration file.

The Fibres Moved? button indicates if any fibres have been moved since the field was set up. The All Parked button will be on if all the fibres on the plate are parked.

The lower section of the display is a `notebook' widget with most of the main positioner control functions in the Setup Field page.

The Survey... button starts a survey of the grid of fiducial marks in the field plate. This calibrates the relationship between the encoder units of the gripper or FPI gantry with the actual XY of the field plate. A field plate survey should be done before any position critical operations are done with a gantry, such as setting up a field (a survey is now done automatically when a field is setup), or doing an astrometric calibration with the FPI. Because of flexure between the gantries and field plates, the survey should be done at the same telescope position at which the setup or calibration will be done. The Survey... button brings up a dialogue which allows selection of the FPI or Gripper gantry and provides options for a number of different types of survey. The All option is the one normally used for calibration.

The Tumble button `tumbles' the positioner interchanging the positions of the two field plates. The plate that was at the configuring position now becomes the observing plate. After tumbling a check of a single fiducial mark on each plate is done to adjust the calibration of the gantry coordinate systems.

The Setup button initiates the setting up of a fibre configuration. The configuration file to be set up should be entered in the Config file entry section. Clicking on the button at the right hand end of this will bring up a file section dialogue to enable the file to be selected.

By default configuration files are `tweaked' before being set up. This involves recalculating the XY positions of the fibres for a specified observing time and for the current astrometric model and refraction parameters. If you are going to tweak your file make sure that the information in the Weather and Wavelengths pages are correctly set up as these are used for the refraction calculation. The Obs Time value is used to set the time in minutes from now which the field will be set up for, or for a given local time. If you turn off tweaking (though why you would want to do this, we can't imagine), the XY values in the configuration file will be used (which may have been calculated using an old model). It's hard to imagine a situation where you would want to disable tweaking.

Once the field setup starts, the Configuration Progress section displays a progress bar, and the number of the fibre currently being positioned.

The Park All button parks all the fibres on the plate.

The Fibre Moves page contains options to move or park individual fibres.

6.3.2  Telescope Control

Figure 6.3: The Telescope Control window - This is obtained by clicking on the more button in the Telescope section of the main Control Task window

The telescope control window is shown in Figure 6.3. The upper section shows the current telescope status. The Slew page can be used to slew the telescope to a source. A position can be entered directly into the Position section (useful for doing standard stars), or the telescope can be slewed to the field centre position of the configuration file associated with either the observing or configuring field plate using the buttons in the Config File Positions section: choose Observation Plate File or Config Plate File, then Load position from file to input fields, and finally Commence Slew and Track. The ADC can also be set to track the same source by setting the ADC Track button.

Other pages in this display allow the telescope to be parked at zenith or prime-focus access, offset control of the telescope, and focus control.

Check with Night Assistant before moving telescope!

6.3.3  CCD Control

Figure 6.4: The CCD Control window - This is obtained by clicking on the more button in the CCD section of the main Control Task window

The CCD control window is shown in Figure 6.4. The CCD control works by sending commands to the standard CCD Observer system running on the VAX. It is advisable to always control the CCD via the 2dF system rather than by directly typing commands on the Observer terminal. This ensures that control is properly integrated with other 2dF subsystems and will ensure that the correct header information is written to the data files, allowing them to be reduced by the 2dF data reduction system.

The upper section of the window specifies the exposure time, the type of run, and whether it is to be recorded. Since the 2dF data reduction software relies on correct header information, it's very important to enter the correct run type; see the sections below for more information. The options for recording data are as follows:

Normal - A standard run which will be permanently recorded. These runs are assigned a sequential run number and recorded on the DISK$INST on the VAX.

Dummy - These are exposures taken during setup which do not need to be kept. They are written to DISK$DATA on the VAX.

Glance - The CCD is read out and displayed but not recorded on disk. These can be used for checking exposure times etc.

Section 7.8 explains in more detail about actually taking data and calibration frames.

The lower section of the display specifies which CCDs are being controlled. The normal situation is that both CCDs are selected, in which case simultaneous exposures will be taken on both CCDs. It is useful to select only one CCD in cases where only one spectrograph is being used, or where standard stars are being taken through a single fibre/spectrograph. The Repeat Mode allows a single exposure, a continuous sequence of exposures, or a specified repeat count.

The Window button allows the CCD readout window to be specified. The TEK1K_2DF window should be used for all standard 2dF observations.

The Readout Speed sets the readout speed for the CCD which determines the readout time, readout noise and gain.

6.3.4  ADC Control

The ADC control window contains a display of the ADC prism angles and buttons to allow the ADC to be nulled, stopped or set to track a specified telescope position. In normal operation this window is not needed as the ADC can be controlled from the telescope control window. Figure 6.5 shows the ADC control window.

Figure 6.5: The ADC Control Window - This is obtained by clicking on the more button in the ADC section of the main Control Task window

6.3.5  Autoguider Control

Autoguiding is done by the Night Assistant on another console. Hence, the autoguider control on the 2dF Control Task is currently not implemented.

6.3.6  Spectrograph Control

Figure 6.6: The Spectrograph Control window - This is obtained by clicking on the more button in the Spectrograph section of the main Control Task window

The spectrograph control window is shown in Figure 6.6. The window provides a display of the status of the two spectrographs. It also provides control of the following functions:

6.4  FPI Control

This section still under construction

This is used to control the Focal Plane Imaging gantry which carries a small CCD which can be positioned anywhere in 2dF's focal plane to take images. It is used for astrometric calibration and field acquisition as described in Chapter 7. The FPI control window is shown in Figure 6.7. The FPI has the following functions:

Menu Items: File, Commands, Imager, Options

To be done

Camera Control (left-hand side):

Gantry Control (right-hand side):

Figure 6.7: The FPI control task window - used for imaging stars in the focal plane of 2dF

Chapter 7
Observing Procedure

7.1  Outline of Observing Procedure

A typical observing session with 2dF is likely to involve the following steps:

7.1.1  Preparation During the Afternoon

  1. Use the configuration software to prepare configuration files for all the fields you wish to observe - check that they are valid for the range of hour angles you are likely to use, and that they are valid for the field plate you will be using for each.

  2. Take any calibration frames which can be done in advance (e.g. Bias frames, Dark Frames). At the moment it is not possible to do a full chip flat field, as this is to be done by moving the slit unit to fill in the gaps between the fibres, and the hardware and software to do this don't exist yet (see Section  7.8).

  3. It is possible to set up fields (section 7.6) in advance, but only if you are sure you have a good astrometric calibration from the beginning of the run.

  4. Take arcs to check the central wavelength, spectrograph focus (should be 2-2.5 pixels FWHM across the frame), and exposure times.

  5. Get staff to make sure the telescope Z gear is not at its limit (if it is, will affect pointing calibration).

7.1.2  Procedure During the Night

  1. Setup the ADC (see Section 7.3) Set the ADC either to its null position or to its tracking mode.

  2. Telescope Focus and Setup (see Section 7.4) This involves acquiring a star on the FPI and focusing on it.

  3. Pointing Calibrations This is normally done once at the start of the 2dF run, during the 2dF setup night by the 2dF Support Astronomer.

  4. Astrometric Calibration (`POSCHECK') This is the mapping between position on the plate (determined by the reference system of the grid of fiducial markers) and position on the sky (determined by a set of reference stars). Again, POSCHECKS only need to be done once, at the start of a run, by the 2dF Support Astronomer.

  5. Setting Up a Field (see Section 7.6) Once the astrometric calibration is done a field can be set up for the calibrated plate.

  6. Field Acquisition (see Section 7.7) The stars are located - first on the FPI and then in the guide fibres. Often fiducial stars come down the guide fibres straight away!

  7. Calibration Frames (see section 7.8) Calibration frames which require the fibres to be set up (e.g. Fibre flat fields, arcs) should be taken at this point.

  8. Guiding The Night Assistant should now start guiding on the field. Autoguiding is now available, or guiding can be done by hand.

  9. Taking Data (see Section 7.8) Data frames on the target field (and related calibrations such as offset-skys) can now be taken.

7.2  Centering a Star in the FPI

`Centering a star on the FPI camera' is a fundamental operation for acquiring objects with 2dF, and warrants its own section here:

  1. Unpark and centre the gantry

  2. Make sure the FPI is using a small window (this makes it go faster). The default is 200×200 which is usually fine. If not use the Set Window option in the Commands menu. Note: the full size of the CCD is 384 ×578 pixels (and the scale is 0.3 arcsec/pixel).

  3. Set the FPI camera to take exposures continuously (`movie mode') by setting a short exposure time (about 0.2 seconds for a typical SNAFU or PPM star with magnitude 8-10) in the entry box in the FPICTRL main window, selecting the Continuous button and then clicking on the Image button. You will now get a real time display of the sky in the IMG window showing what the FPI CCD is seeing. You may have to adjust the pan/zoom of the IMG window - buttons Centre, Zoom in and Zoom out on the IMG widget.

  4. The star should now be visible on the FPI display. If it isn't check the following:

    Is it cloudy?

    If not, the usual cause of target field acquisition problems are obscuration in the optical path, namely:

  5. Turn off the Continuous Imaging mode (i.e. go back to Single Frame mode).

  6. Offset the telescope to centre the star on the FPI image display. This can be done automatically by doing Control-left-mouse-button-click on the star in the FPI window - the telescope is moved so the point clicked on with the mouse is centered. If you wish to more accurately center (e.g. for the pointing setup) one can define a centroiding box around the star with Shift-left-mouse-drag on the IMG display and run Tel/Centre Star from the FPICTRL Commands Menu. Once the telescope offset has completed another single FPI image is automatically taken; you should check this image to make sure the star is centered. Note: if one clicks on the Mark Centre button in the IMG window a crosshair is drawn at the center. This is useful to compare with the star position.

An alternative backup method for centering the star is to ask your Night Assistant to offset the telescope using the handset while running the FPI in Continuous Imaging mode.

7.3  Running the ADC

Although the ADC has its own control window, the basic control of the ADC is most easily done from the Telescope control window of the control task via its SLEW page. If you slew the telescope from here the ADC can be automatically slewed with it. From here you can select one of the following modes:

ADC Track - The ADC will track the selected field.

ADC Null - The ADC will set to a null position at which it has no effect.

ADC Static - The ADC will be slewed with the telescope but will then be left at the fixed position.

ADC Ignore - The ADC will not be moved.

Since atmospheric dispersion effects are only important for large zenith distances, for the astrometric calibration observations (next section) we generally set the ADC to `Null' (click on the Null ADC button in the ADC window). This avoids the overhead of continually moving the ADC.

7.4  Telescope Focus

The first setup to do when 2dF goes on is to focus the telescope. The telescope focus is not fully temperature-compensated (the metal structure of 2dF in particular), so it's adviseable to check the focus each night during twilight if there is time, especially if the seeing becomes exceptionally good. It is especially important to check the focus if there is a large temperature change. This is done by the following procedure:

  1. Point the telescope at a suitable bright star. A star of about 10th magnitude works well.

  2. Unpark the FPI gantry and move it to position (X,Y) = (0,0). This can be done from the FPICTRL window gantry control section. Menu Control Options (under Gantry Task Control), items Unpark Gantry then Centre Gantry.

  3. Take an image of the star by pressing the Image button in the FPICTRL window. You may need to adjust the exposure time, generally 0.3-1 second is suitable for 10th magnitude SNAFU stars. (Note: the FPI camera saturates at about 8000 counts).

  4. Approximately centre the star in the FPI (Control-left-mouse-button-click on the star) and define a centroid window around it with Shift-left-mouse-drag on the IMG display (see section 7.2 for more details).

  5. Click on the Focus Telescope option in the FPICTRL Commands menu. This will automatically drive the telescope through a range of focus values, taking a centroid at each point and fitting a Gaussian to the image profile. A plot is displayed of FWHM vs focus position and a fit is overlaid. One can then use the fitted minimum as the new default focus position.

Note: the normal range of the telescope focus value is 36.0-37.0 mm.

7.5  The Declination Problem

2dF has a Declination dependent field plate rotation due to a combination of the intrinsic geometric rotation of the sky and plate flexure.

Until the field plate mechanical rotation is fully commissioned (hopefully by the end of 2002), the only way to compensate for this is to use setup files (tdFlinear0.sds tdFlinear1.sds tdFdistortion0.sds tdFdistortion1.sds) for the correct Declination (i.e. within about 10). This means a POSCHECK must be performed for each Declination which fields will be configured for. In practice, we usually do poschecks for DEC= -5, -30, -50, and -70 degrees.

Currently we organise this by creating sub-directories in ~2dF/config/ for each month (e.g. ~2dF/config/poscheck_jul98/) and then below that for each declination that has been measured (e.g. ~2dF/config/poscheck_jul98/m5/, ~2dF/config/poscheck_jul98/m30/ for d = -5, -30, etc.) The files have the same name as in the top level directory (i.e. tdFlinear0.sds etc.) and can easily be copied back to the top level before setting up a field. For example:

% cp ~2dF/config/poschecks_jul98/m30/* ~2dF/config

It is also advisable to check field validity using configure with the right setup files. You can change the default location configure picks up its files by setting the environment variable CONFIG_FILES before starting configure, e.g.:

% setenv CONFIG_FILES ~2dF/config/poscheck_jul98/m30
% configure &
Opening distortion file /instsoft/2dF/config/poscheck_jul98/m30/tdFdistortion0.sds
Opening linear file /instsoft/2dF/config/poscheck_jul98/m30/tdFlinear0.sds
Reading /instsoft/2dF/positioner/tdFconstants.sds

7.6  Configuring a Field


  2. Make sure you have a valid field configuration, by checking it using the astrometry files for the correct Declination. Copy the observers configuration file to the appropriate directory, e.g. cp myconfig.sds ~ 2dF/config/mar01/.

  3. Make sure that the correct distortion files for the declination of the field you are about to configure are copied into the  2dF/config directory, e.g. (from ~ 2dF/config):
    cp poscheck_mar01/m05/t*.sds .

  4. Tumble the positioner to the correct fieldplate for the field you wish to configure. Use the tumble button on the positioner subwindow and this will ensure that the spectrograph slit units stay synchronised with the tumbler.

  5. In the positioner subwindow you should select the wavelength tab and set the spectrograph central wavelength. The autoguider default is usually ok.

  6. In the positioner subwindow select the weather tab and press the `using dialog' button; then `fetch' the current Met system values with the bar at the base of the window. Now round the temperature, pressure and humidity values to a sensible number of significant figures by editing the values. Note these values down in case of software crashes. If configuring during the day remember to set realistic night-time temperatures, etc. Note: at present the Met system is not working. You will have to set the weather values by hand.

  7. Select the plate N tab where N is the plate to be configured. Enter the correct Ch values by pressing the `Set Ch' button and entering the values for both plates. These two values are determined on the first setup night and are normally written down on the control room white board. Note: this should only need to be done at the very beginning of the run, as 2dF now remembers these values, but it's good to check.

  8. Select the button to configure a field for a set local time and enter the time you wish to configure the field for: note that this is in local time, and is in 24 hour format and must include seconds. If you wish to specify a time after midnight it is best to enter the date as well. If you leave the cursor over the entry box for a few seconds a help dialog will appear indicating the date and time format. Choose a time corresponding to the midpt of the observations for that field; if you configure a field for a time much different than the actual midpt, this will result in position errors and loss of signal for some objects.

  9. To select the configuration file either enter the path and filename directly in the entry box provided at the base of the plate N tab or click on the symbol at the right hand side of the entry box and browse for the required file.

  10. Press the `setup' button and configuration will start provided there are no other problems. The field will be tweaked for the time of observation and validated for collisions before generating the sequence of moves to go from the current configuration to the next configuration. The gripper gantry will then survey the fiducial marks in the fieldplate. The positioner will then move each fibre in turn in the predetermined sequence.

  11. Important note The default mode of operation is for the positioner to park all unused fibres in a new configuration. However in some circumstances this is not the behaviour which is required. For example if the new configuration is to observe a few bright stars at the end of the night then the observer might not want to spend a lot of time parking the unused fibres. To change the mode of operation select the flags tab on the positioner subwindow and click on the right hand button (provided with help dialogue) to select the mode where unused fibres will be left in the field unless they are in the way of the future configuration. Remember to unset the flag after doing the configuration. (Automatically resets on the next restart of 2dF.)


If you have problems (for example fibre/button collisions) go back in to configure and edit the configuration (e.g. deallocate these fibres). Currently there are some constraints that tdfct knows about (e.g. the location of the plate screw holes!) which configure does not.

Also you may have made a mistake and not checked the field for the correct Hour Angle.

7.7  Acquiring Fields

This requires the following steps:

  1. Slew the telescope to the field centre position, either from the telescope control system, or from the telescope control window in the 2dF control task (the latter is preferred).

  2. While slewing, tumble the field plates to bring the newly configured plate to the observing position.

  3. Check that the flaps are open and all comparison lamps are off.

    Usually the field is acquired straightaway by the Night Assistant on the TV, who will then tweak it in. However, if this doesn't happen, here's what to do:

  4. From the Commands menu of the FPI task choose the Select Object entry, and from the object selection window select one of your allocated guide(fiducial) stars. (If the list of objects does not look right, then select the Load Configuration entry from the FPI Commands menu, and load the same SDS file you have just set up.)

  5. Use the Go To RA/Dec button to move the focal plane imager to the expected position of the star. Typical exposure times for the FPI camera in clear conditions are 0.2 sec for a SNAFU star (V=8 mag) and 3-4 sec for a typical guide star (V=15-16). Take an image with the appropriate exposure time, and the star should be visible. If it is not and everything else is correct it is probably cloudy. Note: in reasonable conditions of transparency it is usually possible to see a several random stars using the full 384 ×578 window of the FPI CCD and a few seconds exposure.

  6. Centre the star on the FPI camera (see section 7.2).

  7. Apply the magic offset determined for this plate to bring the stars to the fibre positions.

  8. Move the FPI camera out of the way by parking it.

The guide stars should now be visible on the TV display and can be centred up.

If you still can not find the stars, repeat the above procedure, this time doing an FPI survey at the field position first to take out any local flexure.

7.8  Taking Calibration and Data Frames

Data taking should be controlled via the CCD window of the control task rather than directly from the observer control terminal. This ensures correct headers are fed through to the data reduction system.

The data reduction system also requires that 2dF data be taken with a window that covers the full chip without binning and includes a number of overscan columns on the right hand side. The window TEK1K_2DF is recommended. This is the default and is controlled using the Window button. The Readout Speed button can be used to set the CCD readout speed. Data frames are taken by setting the type of run and then clicking on the Start CCD Run button. Runs can be done in single or count modes. Finally, exposures can be done on both CCDs (the usual) or on either of the CCDs singly.

The following types of frames can be taken:

7.8.1  Typical Observing Sequence

7.8.2  BIAS frames

A BIAS frame is taken by setting the run type to Bias Run, record option to Record Run and then clicking on the Start CCD Run button.

It is generally a good idea to take a number of bias frames which can be combined to minimise the effect of readout noise. To take a set of 10 bias frames select the Count mode and set the count value before starting the observation. Bias frames are used by the 2dfdr data reduction software if available, but are not required to reduce the data since 2dfdr can also do bias-subtraction using the chip overscan region (this latter option is the default, and is usually adequate).

7.8.3  DARK frames

To take a DARK frame set the exposure time and specify Dark Run and Record Run and then click on the Start CCD Run button. As with biases it is advisable to take a number of darks using the Count option so that they can be combined to remove cosmic rays. Again, these are used by 2dfdr if available, but are not required for data reduction. Note that the dome must be dark when taking DARK frames, as the spectrographs are not absolutely light-tight.

7.8.4  Long Slit Flat Fields

It is intended that eventually long slit flat fields can be taken by moving the slit unit backwards and forwards to blur the fibres into the appearance of a long slit. Currently the hardware and software to do this is not complete and there is no way to take such a frame. Flat fielding therefore has to be done with Multi-Fibre flat fields as described below.

7.8.5  Multi-Fibre Flat Fields

Multi-Fibre Flat Fields are taken using the quartz lamp in the calibration unit. This illuminates the flaps below the corrector. Set it up as follows:

  1. Check that the Quantex TV gain is turned down as the lamp will illuminate the guide fibres.

  2. Select Fibre Flat.

  3. Set the exposure time: 0.7 seconds (the lamp is too bright!) is about right for the 300B grating. With the 1200 gratings the required exposure can be up to 6 sec. Experiment with `dummy' exposures to get the right exposure times. See Table  7.2 for more guidance.

  4. Select type of run (Normal, Dummy, Glance).

  5. Click on Start CCD Run.

  6. You will then be given a choice of lamps. For almost all of the gratings, the best flat lamp is the 50W No.2 (we do not use the 20W lamps at all); for the 1200B grating you may need to use both 50W No.1 and 50W No.2. Again, you should experiment with `dummy' exposures to get the right levels (you should aim for 30,000-40,000 counts per pixel, and make sure that there are enough counts across the whole wavelength range).

    You can also click to whether to leave the flaps closed after the exposure; this is useful if you are doing another calibration frame (e.g. ARC) immediately after, as no time is wasted opening and closing the flaps.

7.8.6  Wavelength Calibration Frames (ARCs)

Wavelength calibration (or ARC) frames are taken using the lamps in the calibration unit. These illuminate the flaps below the corrector. There are four Copper-Argon, two Copper-Helium, and two Iron-Argon lamps which can be turned on separately or in combination.

  1. Check that the Quantex TV gain is turned down as the lamp will illuminate the guide fibres.

  2. Select Arc.

  3. Set the exposure time.

  4. Select type of run (Normal, Dummy, Glance).

  5. Click on Start CCD Run.

  6. Choose arc lamps, and whether or not to leave flaps closed after exposure.

For low resolution spectra (e.g. 300B grating) the combination of the copper-helium and copper-argon lamps works well. A fairly short exposure (typically 30 sec) will be sufficient for the helium lines in the blue and the strong argon lines in the red. One can also try ( ~ 60 sec) exposures with just the copper-helium lamps with 300B. For high resolution data in the blue, iron-argon exposures of ~ 300 seconds are recommended or ~ 200 sec exposures with the copper-argon lamps (the iron-argon lamps are very faint, and are thus of no use for focussing). See Table  7.2 for more guidance.

7.8.7  Object Frames

  1. Select Object.

  2. Set the exposure time.

  3. Choose type of run (Normal, Dummy, Glance), and then Start CCD Run.

7.8.8  Offset Sky Frames

To accurately subtract sky is is necessary to calibrate the throughput of the fibres. These vary at the 10% level between configurations, though they are stable to about 0.5% while tracking on a given configuration.

This calibration ideally requires a bright, flat source; unfortunately the `flatfield' lamps are neither flat or stable enough. The default is to use the dark sky. Because it is dark the data reduction system bins up along the wavelength axis so as to avoid the need for excessively long exposures.

There are other options however:

If in doubt, take both twilight flats and dark-sky flats. In any case, the standard procedure is to take 3 exposures with the telescope offset 10 arcseconds in different random directions from the observing position. We find 3×3 minutes gives good results (though longer exposures are probably required for high dispersion in the blue). Select Offset Sky for these observations, and choose exposure time, etc, in the usual way. When working in crowded or messy fields (e.g. globular clusters, nebulous regions) large initial offsets (up to 1-2 degrees) may be required to avoid having too many objects landing in fibres.

7.8.9  Standard Stars

Here we discuss observing standard stars through individual fibres, for instance to observe radial velocity and spectrophotometric standard stars. You should allow ~ 15 minutes to observe one standard in both spectrographs. The observer has to supply the 2dF SA with star positions in J2000 coordinates.

Outline of Procedure

The basic idea is to centre a standard star in a guide fibre, then use a blind offset to put the standard star down a spectroscopic fibre. For this reason the spectroscopic fibre should be as close as possible to the guide fibre (within 20mm (5 arcmin) if possible, for best results; the default is 50mm (12.5 arcmin), but this is a little large).

Detailed Procedure

This process is a bit cumbersome but works well. An offsets calculator is available and is now built into the 2dF control system. You will require the position (RA,Dec in J2000.0) of the standard star or stars that you wish to observe.

Two basic procedures are possible:

  1. Using an existing field configuration and observing standard stars by blind offsets into conveniently placed fibres.
  2. Configuring a specially designed field with a guide fibre and spectroscopic fibres near the centre of the field plate.

The former procedure is advised if you only want to observe one standard star at a time, the latter procedure is much faster if you want to observe several standard stars say at the end of the night.

(1) Using an existing field configuration

The basic procedure is to centre a standard star in a guide fibre then use a blind offset to put the standard star down a spectroscopic fibre. For this reason the spectroscopic fibre should be as close as possible to the guide fibre.

  1. Inspect the configuration and choose a guide fibre which lies close to program fibres. Using Fibre 202 is best if possible, since it means the spectra will land near the centre of the CCDs; Fibre 404 is usually worst in this respect. In most cases it is good practice to observe the standard stars in each spectrograph, consecutively.

  2. From the FPI control window choose the `select object' item from the commands menu. Click on the `allocated' button and on `all'. Then select the chosen guide star from the `pivot' menu and set the `maximum distance' parameter to a small value ( ~ 20 mm). This should leave a list of a few star fibres; if there are too many or too few, change the `maximum distance'. Click on the listed stars to find one from each spectrograph (ie. A, B).

  3. Click on the `standards' button in the bottom right hand corner and a new dialogue box will appear. This is the offsets calculator. Select the guide fibre from the `select guide pivot' section and the spectroscopic fibre from the `select object pivot' section.

  4. Now enter the Ra, Dec of your standard star in J2000 coordinates (these are the only numbers you have to enter manually) and press the calculate button. Three sets of corrected offsets are displayed in red. The first is the offset in arcsec from the centre of the fieldplate to the guide fibre. The second is the offset in arcsec from the guide fibre to the spectroscopic fibre. The third (not often used) is the offset from the centre of the fieldplate to the spectroscopic fibre.The calculator will also display the CCD that the standard star spectrum will be visible on. Note that the corrected offsets already allow for cos(dec) and the night assistant should not apply a further cos(dec) correction.

  5. To repeat the calculation for several spectroscopic fibres simply choose another fibre and click on the calculate button, noting down the corrected offsets in each case. If several spectroscopic fibres are available within a short distance this can allow rapid offsetting of a standard star down fibres in both spectrographs for cross checking (The retractors either side of a guide fibre are routed to different spectrographs.)

To centre the standard star in the spectroscopic fibre, work though the following check-list (this procedure assumes that you are using the default 200 by 200 pixel window):

  1. Slew the telescope to point at the position of the standard star (either use the telescope interface or ask the night assistant). If using the telescope control window the ADC will normally follow the telescope. If the telescope is moved by the night assistant and the ADC is tracking then the ADC will correct for the new telescope position when the telescope finishes slewing. If the ADC is idle when the telescope slew starts then you will have to manually drive the ADC to the telescope position when the slew finishes.

  2. Stop the ADC once it is in the correct position for the telescope. Further offsetting will move the telescope by less than 1 degree which will not affect the operation of the ADC and this will avoid ADC problems and worried observers.

  3. Move the fpi camera gantry to the centre of the field and grab a single image.

  4. Centre the standard star in the fpi camera window by using the control-left button click on the star. The telescope will be moved to centre the star in the fpi camera window and a fresh image taken to verify the result.

  5. Now ask the night assistant to apply the fpi to fibre magic offset. This will centre the standard star on the field plate as opposed to the fpi camera.

  6. Now ask the night assistant to apply the field centre to guide star corrected offset. At the same time you should park or move clear the fpi gantry.

  7. The night assistant should now be able to acquire the standard star in the nominated guide fibre and centre it as carefully as possible.

  8. Finally ask the night assistant to apply the guide fibre to spectroscopic fibre offset. This is a blind offset and the exposure should be taken as soon as possible followed by arcs and flats.

(2) Use of specialised field configurations for standard stars

(Note from RDC)

An alternative procedure is to set up a few fibres in a special configuration. This involves placing one guide fibre at the centre of the field plate and a pair of target fibres immediately adjacent to it, offset 40 arcsec to the north and south.

The optimum set-up is to put fiducial 202 (or 404) at the plate centre, one of 192-201 40" S and one of 203-212 40" N. This guarantees one fibre in each of the spectrographs and puts the spectra in the middle of the CCDs. It also means that the targets are at the centre of the 2dF field, avoiding the CVD (chromatic variation of distortion) which affects fibres at intermediate radii.

This set-up can often be incorporated in an observer's main configuration, especially for projects which use relatively small numbers of fibres. Alternatively, it can be made a special configuration which takes only a few minutes to configure and subsequently re-configure (remember to set the `do not park unused fibres' flag since there is no need to park all fibres as standards are usually much brighter than any accidentally observed stars).

To observe a standard star (or any single target bright enough to see in the fiducial display on the Quantex TV), you simply point the telescope at the target, centre it up with the FPI, apply the `magic offset', centre the target in the fiducial bundle, and offset the telescope 40 arcsec N or S. The whole process takes only a few minutes; on a recent observing run we managed to observe 5 standards in the dawn twilight, the longest part of the job being the arc exposures!

I have prepared two configurations to do this job. `stds.sds' uses just the one fiducial and two target fibres described above. `stds2.sds' includes four nearby sky fibres to make it easy to reduce the spectra using 2dfdr, although the sky will rarely be significant. `stds3.sds' is similar, but uses different fibres, in case some are broken. These configurations can be found in ~ 2dF/config/stds/. Standard spectra can be readily extracted and reduced using 2dfdr, remembering only to turn off the `Rotate/Shift to Match' button on the 'Extract' page.

Time Requirements

Plan on at least 15 minutes to observe one standard star through both spectrographs. This takes into account the time to acquire the star, and offset to the guide and spectroscopic fibres, and the exposure and readout times (including calibration). This number also assumes you are using normal readout speed, and observing reasonably bright standards (14 mag or brighter) at low dispersion: more time will be required for fainter standards, higher dispersion, or slower readout. Normally four exposures will be required: standard in both spectrographs (2), arc, and flat.

Useful Information

7.8.10  Observing Overheads and Minimum Calibration Requirements

Here we discuss the overheads that will be incurred with 2dF, and the minimum requirements for 2dF data.

Table 7.1 shows the gain, readout noise, and readout times for the various readout modes. Non-Astro and Extra-Slow modes are seldom, if ever, used, as Normal and Slow modes are sufficient for all applications (in fact, Extra-Slow may not be available with 2dF).

Table 7.1: Parameters for the 2dF TEK CCDs
Mode Gain Read Noise Readout Time
(e-/ADU) (e-) (sec)
Non-Astro 12 10 33
Fast 5.6 6.2 52
Normal 2.7 4.5 75
Slow 1.4 3.4 120
Extra-Slow 0.34 2.2 394

Table 7.2 shows likely setups and exposure times for arcs and flatfields for various gratings. Note that these are approximate and only given for guidance; there is inevitably some experimentation needed to obtain optimal setups and exposure times. Note in particular the long exposure times needed for arcs in the blue at high dispersion. Arcs should be taken at least once for each configuration, and at least once every hour for long exposures to minimize flexure problems. Flats need to be taken only once for a given configuration. Note: if you move the telescope, you'll have to take new flats and arcs!

Table 7.2: Arc & Flat Setups and Exposure Times
Grating Arc Lamps Arc Exposure Flat Lamps Flat Exposure
(sec) (sec)
300B 4xCuAr + 2xCuHe 30 50W No.2 0.5-1.0
300B 2xCuHe 60
270R/316R 2xCuAr + 2xCuHe 30 50W No. 2 0.3
600V 4xCuAr + 2xCuHe 60 50W No. 2 0.7
600R ?? ?? ?? ??
1200B 2xFeAr 300 50W No. 2 2-5
1200B 4xCuAr 200
1200V 4xCuAr 180 50W No. 2 3
1200V 2xCuHe ??
1200R 4xCuAr 60 50W No. 2 1-2

2dF Data Reduction System

Chapter 8
Data Reduction

8.1  Introduction

This document describes the 2dF data reduction system (2dfdr), which is updated on an ongoing basis. The system is designed to provide fully automatic on-line and off-line reduction of data taken with 2dF.

The data reduction system currently does bias and dark subtraction, flat fielding, tram-line mapping to the fibre locations on the CCD, fibre extraction, arc identification, wavelength calibration, fibre throughput calibration and sky subtraction.

8.2  Obtaining and Installing 2dfdr

The most current version of 2dfdr can be obtained here, along with a sample set of 2dF data to play with,

The tar file is a fully self-contained package including executables, and all necessary starlink, drama and tcl files required to run. It also contains instructions for installing and running 2dfdr.

8.3  Data Reduction System Setup

The data reduction system normally runs on Sun Solaris systems. A version for Linux Redhat systems is also available. On the AAO systems (Epping or AAT), first type ``2dfsoftware" to initialize all 2dF software. Having done this, you will see a menu like this:

2dF programs now available, type command name to run:

configure     Prepare field configurarations (assumes linear and distortion
              files in ~2dF/config - may need to setenv CONFIG_FILES)
              *** This runs the latest version 3.3 ***
oldconfigure  Run the old version of configure (3.2)          
drcontrol     Run data reduction system 2dFDR
cleanup       Blow away 2dFDR (emergencies only)
ndf2fits      Convert 2dF NDF files (i.e. .sdf extension) to FITS files
fits2ndf      Convert FITS back to NDF, keeping fibre details
2dfinfo       List 2dF info from NDF file (e.g. '2dfinfo 30may0007 fibres')
tdffix        Correct 2dF headers (in NDF file) from SDS file (see man page)
qualityplots  Plot quality diagnostic info (S/N etc.) from reduced files.
redshift      KGB's interactive redshift browsing program (with 2dF support)

Then simply type ``drcontrol" to start 2dfdr.

On other systems, you will need to do the following:

1. Set environment variable DRCONTROL_DIR to the directory where {\tt 2dfdr} has been

2. Source the file $DRCONTROL_DIR/2dfdr_setup.

3. Type the command `drcontrol'.

For example, if the software was in directory /home/2dfdr you would type
(using csh):

> setenv DRCONTROL_DIR /home/2dfdr
> source $DRCONTROL_DIR/2dfdr_setup
> drcontrol

You can include these commands in your .cshrc or equivalent so they are run when you log in.

8.4  Preparing Data for Reduction

8.4.1  Files Required

To reduce a 2dF data set you should have the following set of files:

  1. At least one fibre flat field exposure.

  2. At least one arc exposure.

  3. One or more exposures on the target field.

  4. At least one, and preferably three or more, offset sky exposures (depending on which method you will use for throughput correction: see below).

The data reduction system can also handle bias, dark, and full chip flat field exposures. We have generally not found it necessary to take bias and dark exposures as they contain little structure, and there is currently no way of taking a full chip flat field (this may eventually be done by moving the slit block during an exposure but this facility is not yet available).

If you don't have the full set of files listed above it is still possible to reduce the data, but some stages of the calibration may be skipped.

8.4.2  Converting FITS files

Data to be reduced using the 2dF Data Reduction system should consist of raw NDF files (which have a .sdf extension) as written by the OBSERVER CCD system. Data from the archive may be provided in FITS format in which case it needs to be converted back to NDF. This is done using the Starlink Convert utility which has been modified for us by Malcolm Currie at Starlink to handle all the extensions in the 2dF data.

To convert a single file use the command:

>  fits2ndf run0001.fts run0001 \\

Multiple files can be converted using the form:

>  fits2ndf "*.fts *" \\
Other FITS reading programs such as FIGARO WDFITS should not be used, as they don't handle the special extensions used to hold the fibre header information, though they will read the data itself correctly.

There is another command ndf2fits to convert an NDF file to a FITS file. For 2dF data you must specify the keyword proexts on the command line to ensure that the 2dF fibre header is handled correctly (it becomes a FITS binary table in the FITS file). So the command would be:

>   ndf2fits proexts run0001 run0001.fts \\

8.4.3  Old 2dF Data

2dF data taken before October 1997 does not include the header information present in current data files and may have other problems. In this case you will need to read Section 8.10 and prepare the data files accordingly.

Data taken between Oct 1997 and Jan 1998 may have a number of errors in the headers. There is a program tdffix which can be used to fix these problems. Make sure these files have been fixed, before trying to run 2dfdr on them. See Section 8.10.2 for more info about tdffix.

8.5  Running the Data Reduction System

You need to ensure that the X windows display device is set up appropriately for your workstation, by setting the DISPLAY environment variable or using a command such as the starlink xdisplay command.

Before running the system it is a good idea to close down any X-windows applications that use a lot of colour table entries as this may prevent the system creating its display windows. Netscape is one application that can cause this problem.

First go to the directory containing your data. Then start the data reduction system using the following command:

>  drcontrol &
The Data reduction system is closed down by the EXIT command in the File menu.

8.5.1  Startup Problems

If you have problems starting the system, or get timeouts on the initialization type the following command:

>  cleanup
and try again.

8.6  Data Reduction - Quick Guide

Figure 8.1: The 2dF data reduction system main window

8.6.1  The User Interface

The user interface main window is shown in Figure 8.1. It is divided into three main sections. On the left is a ``Notebook'' widget which has a number of pages which can be selected by means of tabs. One of these pages is the ``Data'' page which can be used to select data files by run number or file name and perform operations on them. The other pages are used to set parameters which control data reduction or display.

At the top right section of the screen is the automatic reduction section, and below this is a window which displays the progress of current operations and any messages output during the reduction progress. There are two execution tasks and the windows for the two tasks are organized as another ``notebook'' widget.

8.6.2  Reducing Data

The standard way of automatically reducing a set of data is as follows:

  1. Click on the SETUP button in the Automatic Reduction section of the display. This will bring up a dialog which should show the directory, root name, and extension of your data files. If these are correct click the OK button.

    The system will now locate all the raw data files in your directory and check their classes. It will also check if they have already been reduced. Once this is done you can use the DATA notebook page in the left hand part of the display to step through your files by run number and select a file to work on.

  2. If you are reducing the first set of data for this spectrograph setup (for example following a grating change) you will probably need to use the Find Fibres... menu command to create new fibre position files as described in Section 8.7.4. Note that there are four of these files, one for each slit assembly and spectrograph combination.

  3. If you want to use other than the default parameters for reduction you should set them at this stage (e.g. a different extraction method, or sky subtraction method). The parameters are set in the notebook pages labeled Extract, SkySub etc.

  4. Now click on the START button in the Automatic Reduction section and the system will go through and reduce all your files in sequence. The system will automatically choose a sequence of reduction which ensures that calibration files are reduced before the runs they calibrate. Thus flat fields are reduced first, then arcs, offset sky and finally object frames.

In principle this is all that is required to reduce 2dF data.

Data files can also be reduced individually. To do this, select the file in the DATA notebook page and click on the REDUCE button. It is usually a good idea to reduce at least the first flat and arc individually, to check that all looks sensible (Section 8.6.4), before doing automatic reduction of the remaining frames.

Whether you use automatic or manual reduction the file will be reduced in one of the two DREXEC tasks, and messages on the status of the reduction will be displayed in the appropriate window. You have to select the right page of the notebook widget for whichever DREXEC task is being used to see the messages and progress bar.

8.6.3  Plotting Data

The PLOT button in the DATA notebook page can be used to plot the currently selected run. You can choose to plot either the raw data or the reduced data. The data will appear in the plot window with the title `DRPLOT2 - General Plots'.

You can plot the data for one run while reduction of the next is in progress.

If you use the hardcopy option a file with the name gks74.ps, (or gks74.ps.2, gks74.ps.3 etc for subsequent plots) will be generated. The ``Hard'' parameters page allows you to select different kinds of hardcopy plots. You can also produce hardcopy plots by using the Print... entry in the File menu of the plot window.

8.6.4  Did it Work?

Having reduced a set of data there are two important checks you should make to ensure that the reduction has gone OK?

Figure 8.2: Typical result from the Plot Tram Map... option (after zooming the plot several times using the Z key). The tram lines run through the centre of the data on which they are overlaid.

To plot the tram line map, select Plot Tram Map... from the Commands menu. It will put up a file selection dialog showing files with names ending in `tlm.sdf'. There should be one of these generated from the first file to be reduced - normally a flat field. Select this file and a plot of the tram line map, overlaid on the flat-field image it was derived from, will be plotted. To see what is happening you need to zoom the plot several times which you do by pressing the `Z' key on the keyboard with the cursor in the plot window. You can also pan around the plot by pressing the `P' key, or zoom out using the `O' key. The tram lines should run down the centre of the data for each fibre as shown in figure 8.2. If they don't then see section 8.7.4. Of course, you should also check that the tram-line map looks okay during the data reduction!

Figure 8.3: Correct appearance of a reduced 2dF arc exposure. The lines run straight up the image as all fibres have been rebinned to the same wavelength scale. Compare with Figure 8.4.

To check the arc reduction select the arc file in the `DATA' notebook page and plot the reduced file using the Plot button. The plot should show lines running straight up the image (see Figure 8.3), as all the fibres have been scrunched onto the same wavelength scale. If the reduced arc doesn't look like this see section 8.7.7.

8.6.5  Restarting the data reduction system

All information about the progress of the data reduction is contained in the reduced files themselves. Thus if a data reduction session is interrupted (or the system crashes) drcontrol can be restarted, and the SETUP button used to pick up things exactly as they were. It will know which files have been reduced and be able to reduce any files which have not.

If you really want to start a data reduction session from scratch, redoing everything, delete all the *im.sdf, *ex.sdf, *red.sdf, and *tlm.sdf files and restart drcontrol.

8.7  The Data Reduction Process in More Detail

8.7.1  File Name Conventions

The automatic data reduction depends on the use of a file naming convention in which the name consists of a root name which is the same for all files followed by a four digit integer run number. Raw data from the AAT conforms to this convention with names of the the form 13apr0001.sdf, 13apr0002.sdf etc. Data from the archive also conforms to the convention though the names are changed to run0001.fts etc.

It is possible to reduce individual files which do not conform to the naming convention. They can be loaded into the system using the Open... entry in the File menu or the Reduce entry in the Commands menu. However such files cannot form part of the automatic reduction of a sequence of files, unless they are renamed to conform with the other files in the sequence.

The data reduction system adds suffixes to the file names for the results of each stage in the reduction process. Thus the file run0001.sdf would result in the following files:

run0001im.sdf - The reduced image after debiasing etc.

run0001ex.sdf - The result of fibre extraction from the *im file.

run0001red.sdf - The final reduced file, derived from the *ex file by wavelength calibration and sky subtraction.

run0001tlm.sdf - The tram-line map - one of these is generated from each flat-field frame reduced.

The *red.sdf file is the final result of the reduction process. The other files can be deleted if necessary after the reduction has completed.

8.7.2  Calibration Files

On start-up the system creates a number of calibration groups. Each of these contain reduced calibration files of a certain type (e.g. BIAS, DARK, FLAT, ARC etc.). Whenever a calibration exposure is reduced it is inserted into the appropriate group.

At each stage in reduction when a calibration is required, the appropriate group is searched for a matching file (i.e. one with the same CCD and Spectrograph settings). If there is more than one matching file the closest in time is chosen. This works fine provided calibration files are reduced before those files that will need the calibration data. In automatic reduction the correct sequence is chosen based on the class of the file, to ensure that calibration data are available when needed.

You can use the Show History button in the DATA notebook page to find out which calibration files were used to reduce a selected file.

8.7.3  Combining Offset Sky Files

It is not necessary to precombine the offset sky files before running the data reduction system. When reducing an offset sky file the system automatically checks if it matches any previous files. If so all the matching files are combined and a throughput map derived from the combined file. This throughput map is stored with the reduced file. When calibrating an object frame the system will choose the matching throughput map combined from the largest number of frames.

The reduced file for the offset sky frames contains the combined throughput map, but the data array is only that for the single frame (this allows it to be combined with subsequent frames if necessary). The combined sky is contained in a temporary file with the name _COMBINED.sdf.

8.7.4  Tram-Line Maps

A crucial part of the reduction is the generation of a tram-line map which tracks the positions of the fibre spectra on the CCD. Since the 2dF spectrographs have considerable distortion, these tram-lines are not straight lines but can be quite curved near the edge of the frame. The tram-line map is generated using an optical model for the spectrograph and a file listing the positions of the fibres on the slit. There is one of these files for each slit block (fibposa1.dat for spectrograph A, Field plate 1, and fibposa0.dat, fibposb1.dat fibposb0.dat for the others).

A new tram-line map is created from the first file to be reduced in each session. This is then used for all subsequent files with the same spectrograph setting. Although a tram-line map can be created from any file the best results will normally be obtained from a fibre flat field because of its high S/N. A twilight sky exposure, if available, would also be a good choice. If you are reducing a new set of data for the first time, the automatic reduction will always reduce flat-fields first.

Plotting the Tram-Line Map

To test whether the tram-line map is a good match to the data use the Plot Tram Map... entry in the Commands menu. This will plot a display of the tram-line map overlaid on the data it was generated from. The plot can be zoomed in or out with the Z or O keys on the keyboard (you need to zoom in several times to see anything useful). The P key pans to centre on the cursor position. The Q key quits the display and allows data reduction to continue.

It is also possible to plot the tram-line map overlaid on the data during the reduction by switching on the Plot Tram Map check box in the Extract notebook page. The plot gets put up twice during the course of reduction. Once with the initial tram line map, and a second time after adjusting the map in shift and rotation to match the data.

After zooming several times the plot should look like that in Figure 8.2. If the tram-lines don't correctly overlay the data then there are a number of possibilities.

To re-generate the tram-line map it is necessary to exit the system, delete any *tlm.sdf files, and restart.

Creating a New Fibre Position File

If it is not possible to get a good tram-line match to the data, it is likely that the fibre position file (which lists the positions of the fibres on the slit) is not valid, either because the slit assembly has been modified since the file was created, or perhaps just because a grating change has changed the positions of the fibres on the CCD sufficiently to alter their apparent spacings. There are four of these files named as follows:

fibposa0.dat Spectrograph A (1) - Field Plate 0
fibposa1.dat Spectrograph A (1) - Field Plate 1
fibposb0.dat Spectrograph B (2) - Field Plate 0
fibposb1.dat Spectrograph B (2) - Field Plate 1

A new fibre position file can be created from the data. Use a well exposed flat field covering all the fibres. Use the Find Fibres... command in the file menu. Select the raw data file for the flat field. The positions of the peaks will be located and used to generate a new fibre position file. A tram line map will then be generated from this file and a display of this overlaid on the data will be presented in the Diagnostic Plots window. Note that at this point the tram-line map will not have been corrected for rotation so may not overlay the data perfectly. This plot should be carefully examined to check that the fibre numbering looks correct (use the Z key to zoom the plot, and the Next and Previous buttons to step up and down the chip).

If any problems in fibre numbering are visible on the display, fibres can be deleted or added interactively. To delete a fibre place the cursor on the fibre and press the D key on the keyboard. To add a fibre place the cursor on a point through which the tram line should pass and press the A key (it is advisable to have the plot highly zoomed for accuracy here).

If more than 200 fibres are found only the first 200 are plotted. Fibres beyond 200 can however still be deleted by placing the cursor at the expected position of the next fibre beyond 200 and using the D key. Alternatively deleting a fibre number below 200 will cause them to be plotted.

As fibres are added or deleted, the current number of fibres will be shown in the DREXEC message window. When you are happy with the fibre numbering (at this point there should be 200) click on the QUIT button in the plot window. If there are 200 entries at this point the fibre positions will be written to the appropriate file (fibposa0.dat etc.). If there are not 200 entries it will be written to a temporary file with the name fibpos_temp.dat.

Problems may arise if the data are incorrectly positioned on the CCD such that some fibres are off the chip area. In this case the number of fibres identified will be less than 200. In this event you should edit the fibpos_temp.dat file (it is just a text file listing the fibre positions) to add additional entries at one or other end to bring the total number to 200 and then rename it appropriately (e.g. to fibposa0.dat). It does not matter if these positions are off the chip. Or, you can add fibres by hand to either the bottom or top of the find-fibres display until you have the correct number.

Do not attempt to run the system with a fibpos file which contains less than 200 entries.

Reducing the Flat Field

At this point, the tram-line map is not a perfect match to the fibre-flat field. When the flat-field frame is reduced, the tram-line map is compared with the actual data in the fibre flat field and further adjusted until it perfectly matches the data. This is done in two steps.

(i) A shift and rotation correcton is applied to the tram-line map. This is obtained by taking 20 equally spaced cuts across the image in the y direction, locating the data peaks in each cut using a peak-finding algorithm, and then determining the shift and rotation needed to minimize the difference between the measured peaks and the positions in the tram-line map.

(ii) A final correction is applied by measuring the deviation of the data from the tram-line map over a 10 × 10 grid of regions across the CCD. The deviations are measured using the same peak-finding and matching process described above. A set of polynomials are then fitted to the deviations along each tram-line and linear interpolation between these is used to correct each tram-line. After this final correction the tram-lines match the data to typically 0.05 pixels or better.

The final correction requires good data across the CCD to work well. In some cases this is not available, for example when working in the far blue. In this case, this step is best omitted, by turning off the Fit Tram Map to Data check box in the Extract notebook page.

Tram Maps with Other Files

When data files other than fibre flat fields are reduced the only adjustment to the tram-line map is a shift and rotation correction to bring it into alignment with the data. This correction is necessary because flexure in the spectrographs causes the tram-line pattern to move across the CCD slightly as the telescope tracks.

8.7.5  Fibre Extraction

The fibre extraction process uses the tram-line map and the image to extract the spectrum for each of the 200 fibres. The default method is a simple extraction (the TRAM option in the Extract parameters) which sums the pixels around the tram-line over a width slightly less than the spacing of the tram-lines.

An alternative method is the FIT option which does an optimal extraction based on fitting profiles determined from a flat field frame. This should give somewhat better S/N than the tram extraction, and should better handle the overlap between adjacent fibres, since the fit is done simultaneously to the two fibres on either side of the one being extracted. FIT extraction is much slower than TRAM extraction. A flat-field must be reduced using the FIT method before any other frame, to provide the profiles needed for the extraction.

If the data were taken with the spectrograph in the blaze-to-camera configuration the spectrum is reversed at this point to get wavelength in the conventional direction.

Fibre extraction involves three steps:

(i) The background level (mostly due to scattered light) is subtracted from the data.

(ii) The profiles to be used for extraction are determined from a fibre flat-field frame by fitting overlapping Gaussians. The profile information is stored with the tram-line map derived from the flat field for subsequent use during extraction.

(iii) The actual extraction is performed by least-squares fitting of the profile to the data simultaneously with the profiles on either side, thus allowing for the overlap.

We now describe these steps in more detail.

Background Subtraction

The software can perform a subtraction of background scattered light before doing the extraction. This is turned on using the Subtract Scattered Light option in the Extract notebook page. This option is recommended when FIT extraction is used, and is optional with TRAM extraction. The background is determined by fitting a function through the 'dead' fibres in the image. When a flat (class MFFFF) is reduced the list of dead fibres is taken from the header of the image, and each is checked to see if it has signal in it. The dead fibres actually found are written to a file (deadfibresa0.dat, deadfibresb0.dat etc. - one for each of the four slit assemblies). You can edit this text file if you want to add or remove fibres. Once such a file is present in the directory it will be used for all subsequent reductions. At least 2 dead fibres are required for scattered light subtraction to work (in which case it just fits a line rather than a quadratic), with 3 being the minimum to do the full quadratic fit. Obviously, better results will be obtained if more dead fibres are available, and the results also depend on the spacing of the dead fibres.

The function fit to the dead fibres is basically a quadratic with a fall-off at each end, forced to be convex upwards. This background model was empirically determined by study of many typical 2dF background profiles. The function is fit to each CCD column by first fitting a polynomial to give an initial approximation and then using a modified Levenberg-Marquardt algorithm to fit the full function. The resulting background is then smoothed in the spectral direction by median-filtering followed by a cubic spline fit, before subtracting from the data.

Fitting Profiles

The profile-fitting routine fits 200 overlapping Gaussians to the 200 fibre profiles in a column of the fibre flat-field image. It is assumed that the sigma of the Gaussians vary smoothly across the image and can thus be described by a polynomial. Since the background has already been removed, the only independent parameters for each Gaussian profile are the height and a centre position offset. The full fit is done for about 20 columns spaced across the CCD. The profile parameters are then interpolated over the whole image using cubic spline interpolation. The output is the parameters describing the Gaussian position and sigma for each of the 200 fibres in each CCD column.

Extracting Spectra

Spectra are extracted from the images by fitting the profiles, determined as described above, to the image data. Since the background has already been subtracted, the position of the profile center is determined in the tram-line matching, and the sigma of the Gaussian has been determined in the profile-fitting stage, the only parameter to be determined for each fibre profile in each CCD column is the height of the Gaussian which gives the corresponding point in the spectrum. A simultaneous fit of each fibre and it's neighbours on either side is done, which minimizes any contamination of a spectrum from it's neighbours.

Typically, therefore 15 to 16 pixels of data along a column are fitted with three overlapping Gaussians, with the three Gaussian heights being the fitted parameters. Only the central value is actually used. Linear least squares fitting is done, with the data points weighted according to their variances.

Plotting Fits

The Plot Fits option turns on a plot of the fits to the data for selected columns for the background subtraction, and the fit extraction.

Cosmic Ray Rejection

Cosmic rays are rejected during the extraction process on the basis of the spatial profile across the fibre. The spatial profile for a single wavelength channel is compared with the median profile over a block of pixels on either side of the current pixel. If it differs by more than a threshold value (the default is 20 sigma) the pixel is rejected and flagged as bad in the resulting spectrum.

In principle such a procedure based on only the spatial profile should be insensitive to the spectral structure of the data and there should be no danger of it mistaking a strong emission line for a cosmic ray. However, in practice this is not true with 2dF data for two reasons:

For these reasons the default rejection threshold has been set at a fairly conservative value which ensures that no real features will be rejected as cosmic rays in typical data. However, it means that only the worst cosmic rays are removed, and some smaller ones will still get through.

In very high S/N data it may be necessary to increase the threshold further or turn off cosmic ray rejection entirely. For this reason cosmic ray rejection is automatically turned off when flat fields and arcs are extracted. The best way to remove cosmic ways is by combining object spectra from separate frames after reduction, using the Combine Reduced Frames option with 2dfdr. For this reason, we recommend taking at least three exposures for all configurations, and turning off cosmic ray rejection during the reduction of each individual exposure.

Fibre Overlap

The fibre spectra are packed very close together on the detector. The design specification was that they would overlap at about the 1% level on the profile. However, the actual situation is worse than this, and in some early data it is much worse due to poor focus. Some data are also affected by halation giving extended wings on the profile. This means that there is often significant contamination of a fibre spectrum by light from the adjacent fibre. This is particularly bad when there is a bright object in the fibre adjacent to a fainter one. TRAM extraction can be seriously affected by contamination from adjacent fibres. The problem is much less serious with FIT extraction.

8.7.6  Dividing by Fibre Flat Field

At this point the extracted spectra can be divided by a normalized flat field frame made from the spectra extracted from a continuum lamp exposure. Flat fielding in this way is not ideal, as the spectrograph flexure means that the flat field spectra are extracted from slightly different pixels from those being calibrated. However, it is still found to be useful in removing large scale flat field structure (the 2dF Galaxy Redshift Survey uses this option). A method of taking full chip flat fields which would allow better removal of pixel-to-pixel sensitivity variations was originally planned but has not yet been implemented.

8.7.7  Wavelength Calibration

Figure 8.4: Appearance of an incorrectly reduced 2dF arc exposure. The arc lines in different fibres do not line up. Such a result is usually caused by incorrect wavelength or grating information in the header, or (as in this example) by use of the wrong arc line list. Compare with Figure 8.3.

The data reduction system performs an approximate wavelength calibration using the information from the spectrograph optical model, the central wavelength in the file header, and assuming the fibres in the slit are in a line (which is not relly true). It then refines this using data from an arc lamp exposure. Lines are found in the arc-lamp spectrum using an algorithm which searches for peaks. A peak here is defined as a pixel at which the signal falls significantly (at least 2s) on either side. The central position of each line is determined by fitting a parabola through the three points around the peak. The actual wavelengths and approximate intensities of lines in this region of the spectrum are read from a line-list file for the appropriate arc lamp. The weaker lines are removed from either the list of measured positions or the list of actual wavelengths until there are roughly equal numbers of lines in both lists. Finally, the shifts are determined which bring the measured positions into registration with the expected positions from the true wavelengths.

A cubic fit is then performed to the predicted and measured wavelengths of all the `good' lines for each fibre. A good line is one that is not a blend (i.e. there is no nearby line in the line list), is not too wide (which usually indicates saturation), and is not too weak. The fit is then improved, if necessary, by removing up to four points with the largest deviation from the fit. This fit is then used to refine the wavelengths and the arc spectrum is scrunched onto the new wavelength scale (ie. rebinned onto a linear wavelength scale). This procedure is repeated for each fibre spectrum in the wavelength calibration observation, producing a set of polynomial coefficients for each fibre relating the initial approximate wavelength calibration to the true wavelength scale. This information is stored in the final file with the reduced calibration lamp spectra. The details of the arc fit to each fibre are also output to a text file with a name of the form arclistnnn.dat for run number nnn (e.g. arclist021.dat for the fit to arc spectra in run 21).

If you plot a reduced arc the lines should be straight across all 200 fibres, and the wavelengths should be correct; see Figure 8.3. If you don't get a good wavelength calibration, the most likely reason is that the central wavelength specified in the header is not close enough to the true value for the software to correctly match the lines. You can check this by comparing the raw arc data with an arc map. Other things that could cause problems are incorrect grating information in the header.

When other files are reduced the calibration from the best matching arc exposure will be used to set the wavelength scale. For these other files, the data are rebinned onto a linear wavelength scale as described above, but instead of using the approximate wavelength scale, the wavelength scale is corrected using the polynomial fits from a wavelength calibration file, to give the true wavelength scale.

2dF includes CuAr, Helium and FeAr lamps which can be used in any combination. Wavelengths and approximate intensities of lines are contained in a number of files for the various combinations (e.g. cuar.arc for the CuAr lamp, hecuar.arc for the Helium, CuAr combination). If you have problems getting a good arc fit, it may be possible to improve things by editing the line list, removing lines which are causing problems. An arc file in your working directory will be used in preference to one of the same name in the standard 2dfdr directory.

8.7.8  Fibre Throughput Calibration

Before sky subtraction can be done, it is necessary to correct for fibre-to-fibre differences in throughput and to normalize all of the fibres to the same level. There are three methods available for fibre throughput calibration:

Offset Sky Method


In this method offset-sky exposures are used to calibrate the relative fibre throughput. These are exposures taken with the same fibre configuration as the target field, but with the telescope offset from the nominal field center, so that the fibres are (mostly) looking at sky. In practice, it is quite common for some fibres to land on objects in the offset position, so normally one takes at least three offset-sky exposures at different position offsets. Twilight sky exposures are also useful for throughput calibration, but it's not normally possible to acquire these for every fibre configuration used during a night. Note that while in uncrowded fields one normally offsets by 20-30 arcsec, but in crowded fields (e.g. center of LMC), one may need to offset by as much as several degrees.

The offset-sky or twilight-sky exposures (class MFSKY) are processed in the same way as target field observation until wavelength calibration of the extracted spectra. At this stage the spectra are combined with those from any other offset-sky frames for the same instrument configuration. The frames are combined as described in Section  8.7.10, but without continuum adjustment and flux weighting. The relative throughput for each fibre is obtained from the combined offset-sky spectra as the mean signal in the fibre, divided by the median over all fibres.

Sky Lines Method

Skylines, Skylines(kgb)

With this method, the relative intensities of the skylines in the object data frame are used to determine the relative fibre throughput. This method saves time as no offset-sky observations are required. However, it can only be used for spectral regions with sky lines, and will not work in particular for high-dispersion data in the blue. The 2dfdr implementation makes use of all skylines present. The algorithm works as follows:

Sky Flux Methods

Skyflux(med), Skyflux(cor)

The skyflux throughput calibration methods are based on similar ideas to those of the skylines methods. The strength of the night sky emission lines are used to normalize the fibre throughputs. They differ from the skylines methods in that they determine the fibre throughputs from the total flux in a number of sky lines, rather than comparing sky emission on a pixel-to-pixel basis. This has the advantage of correcting (to first order) for any variations in the spectral PSF across the 2dF CCDs. When using the skylines methods, these PSF variations can cause systematic errors in throughput calibration (and therefore sky subtraction) which vary across the detector. These algorithms were designed to be implemented in cases where a number of night sky lines were present, particularly when using 2dF at low resolution (e.g. with the 300B gratings). There are two algorithms, skyflux(med) and skyflux(corr).

Skyflux(med) works as follows:

The skyflux(med) algorithm is robust and should work even if only one sky emission line is present in the spectrum (although if that line contains bad pixels the algorithm could fail).

The skyflux(corr) method is similar to skyflux(med), but has the advantage of being flux weighted, so that the throughput values should have reduced scatter (skyflux(med) gives equal weight to all night sky emission lines). The skyflux(corr) algorithm works as follows:

The skyflux(corr) method only works when at least two night sky emission lines are present in the data, and preferably more. With only one or two lines skyflux(med) will be just as accurate.

Finally ...

The throughput derived by either of the above methods is then applied to the data by dividing each spectrum by it's corresponding fibre throughput.

8.7.9  Sky Subtraction

The final step in data processing is to sky-subtract. Any fibre configuration normally contains a number of fibres (typicaly 10-20) assigned to sky positions. A combined sky spectrum is made by taking the median of the corresponding pixels in each of the normalized sky fibres (see previous Section). We use the median so that the combined sky is insensitive against any sky fibres accidentally contaminated by sources, or by cosmic ray spikes. For the purposes of calculating the sky subtraction accuracy only, the two brightest sky fibres are rejected.

This combined sky spectrum is then subtracted from each fibre spectrum (including sky fibres). Although sky subtraction is simple in principle, good results are crucially dependent on effective throughput calibration, wavelength calibration and background subtraction. The continuum sky subtraction accuracy, measured from the residual light in the sky fibres after sky subtraction, is typically 2-3% of the sky level. Better sky subtraction is possible using techniques such as beam switching and nod&shuffling, but these have other limitations (decreasing the number of available objects for instance).

8.7.10  Combining Reduced Spectra

All of the processing steps described above are applied to individual frames. 2dfdr is also able to combine frames observed on the same field, with optimal S/N and with cosmic ray cleaning. The basic algorithm is modelled on the crreject algorithm in the IRAF imcombine package:

This algorithm was tested extensively by combining data with and without cosmic ray rejection and examining the difference images, to ensure that only true cosmic ray events were rejected (and not, for example, real spectral features!). The algorithm works well because the expected variance can be calculated very accurately knowing the CCD readnoise and gain, and because the sky background has already been subtracted during previous reductions. However, it was found necessary to add two user-selectable options to cope with particular common problems.

Continuum Level Adjustment

It was commonly found with early 2dF data that the object spectra showed 10-20% spectral shape variations between consecutive runs. This was traced down to the ADC not being properly calibrated. For data taken previous to 31 August 1999 (when the ADC was fixed), 2dfdr now has an empirical fix for this problem, which is to adjust the continuum level of each spectrum before cosmic ray rejection. A heavily smoothed version of each spectrum in the series of frames is made by applying a box-car median filter (with a width of 101 pixels). This estimates the spectrum continuum level in a way which varies slowly with wavelength and is robust against cosmic rays and real spectral features. Next, the mean smoothed spectrum is subtracted from the array of smoothed spectra to make an array of smoothed differences, which is then subtracted from the data spectra to align them in continuum level with each other.

This procedure takes out the small variations well enough to align the spectra to better than the noise level. This in turn allows the cosmic ray algorithm to only identify true cosmic ray events. This option is on by default with 2dfdr, but can be turned off.

NOTE: the continuum level adjustment is on by default. Even for data taken after 31 August 1999, it is probably worth using.

Flux Weighting Option

When data are taken in strongly varying seeing or cloud cover conditions, or when separate frames have different exposure times, some frames may have a lot less flux in *all* their spectra than other frames. To combine such data optimally, it is necessary to assign a global weight to each frame proportional to the flux in it (otherwise you will end up adding noise to your data). There is thus an option provided in 2dfdr combine for flux weighting.

The key step is to robustly calculate the flux weights. These are calculated for the brightest objects in each frame, and then applied to all objects. The algorithm for calculating flux weights works as follows:

First, smoothed versions of all the spectra in a frame are made using the same boxcar median filter (width 101 pixels) as for the continuum adjustment. This effectively eliminates contribution from cosmic rays.

The flux in each of the smoothed object spectra in a frame is summed, and the sum of this over all frames is stored as an empirical `brightness parameter' for each object. The summed fluxes for each frame are then normalized (scaled so the first frame is unity), and stored as the flux weights for that object.

The 5% of fibres containing the brightest objects is found by sorting the list of total fluxes.

The global frame-to-frame flux weights for all of the spectra are formed by averaging the individual values calculated for the brightest 5%.

The global flux weights for the sequence of frames are then renormalized so the maximum weight is unity. This causes the final combined spectrum to be normalized as if all frames were taken in the best conditions (though the S/N is obviously worse).

By deriving the flux weights from only the brightest spectra, very accurate values for the relative brightness changes between frames are found. Because the weights are normalized before averaging to derive global weights, all the bright objects contribute equally and the result is not dominated by a single very bright object. The procedure is also robust against cosmic rays in individual frames.

The final global flux weights are used throughout the combine algorithm described earlier. They are used to correctly scale individual frames for the determination of the initial median and N-sigma deviations during the cosmic ray rejection, and as weights for the final combination. The flux weighting algorithm was tested by taking real data and degrading it to simulate the effects of bad cloud or seeing. The flux weights determined were found to accurately reflect the artificial scaling and the list of brightest spectra found matched well those from the catalogued magnitudes.

We recommend that the flux weighting option be used for data taken in variable conditions: your S/N will be increased.


8.7.11  Summary of Data Reduction Sequence

The sequence of data reduction for an object file is as follows:

  1. Debiassing The mean of the bias strip is subtracted from the data, and the bias strip trimmed from the data frame. Then a variance array is derived from the data with values determined from photon statistics and readout noise. This is attached to the data file so that the variance can be propagated through subsequent steps in the processing. If a bias frame is available it is subtracted from the data (The bias frame already has the mean level of its bias strip removed).

  2. Dark Subtraction If a dark frame is available it is subtracted, after scaling for the relative exposure times. Dark frames are not usually taken with 2dF.

  3. Flat Fielding If a long-slit flat field is available the data can be divided by the normalized flat field frame. At present this is not possible as there is no way of taking a long-slit flat field.

    The result of these initial stages is a reduced image file which is indicated by the suffix im appended to the file name.

  4. Tram-Line Map Generation If a suitable tram line map is available it is matched with the data by determining the relative shift between the map positions and the peaks found in the data, for a series of cuts through the image. A robust straight line fit is performed to determine a shift and rotation angle and the tram-line map adjusted accordingly. If no suitable tram-line map is available then one is generated by ray tracing through the optical model of the system for a range of wavelengths and slit positions and then performing surface fits to the resulting positions to derive both the tram-line map for each fibre and the wavelength of each pixel on each fibre.

  5. Fibre Extraction Using the tram-line map and reduced image, this stage extracts the spectrum of each fibre. There are two possible methods. The TRAM method is a simple extraction which simply sums the pixels along each fibre over a width equal to the distance between adjacent fibres. Some cosmic ray rejection is performed by comparing the spatial profile for the pixel with the median profile over a block of pixels. The FIT method performs an optimal extraction by fitting profiles determined from a flat-field frame.

    The fibre extraction stage also adds an approximate wavelength calibration to the data based on the spectrograph optical model. The end result of this stage is the extracted file which is indicated by an ex suffix. This file contains the data in the form of a 200 by 1024 array giving the data for the 200 fibres.

  6. Wavelength Calibration The data are rebinned onto a linear wavelength scale which is the same for all fibres. If available, the wavelength shift and dispersion determined from a wavelength calibration lamp exposure are used. If no calibration is available the approximate wavelength scale from the optical model is used.

  7. Sky Subtraction The data are first corrected for the relative fibre throughputs, based on a throughput map derived from the offset sky exposures or from the relative intensities of night sky lines. The sky fibre spectra in the data frame are then combined and subtracted from each fibre.

  8. Combining Reduced Runs Individual runs may then be combined optimally and with cosmic ray rejection, if desired.

8.8  2dF Data Headers and the 2dfinfo command

2dF data files contain two types of header information. A standard FITS header contains information on the telescope, CCD, spectrograph etc. However the information on the fibre configuration is contained in a special FIBRES extension in the NDF files. This contains information on the name, position, type etc. of the object allocated to each fibre. In addition reduced files contain an NDF History extension which describes the reduction history of the data. For example, which data reduction steps were applied to it, and which calibration files were used.

This header information can be accessed from the data reduction system using the Show Header, Show Fibres and Show History buttons. However, it is sometimes more convenient to access this information without having to run up the data reduction system. The command 2dfinfo has been provided for this purpose. It can be used in a number of ways as follows:

>  2dfinfo run0001.sdf fits
lists the FITS header of run0001.sdf.

>  2dfinfo run0001 fibres
lists the fibre configuration information for the same file (note that the .sdf extension is optional).

>  2dfinfo run0001red history
lists the reduction history of the reduced file run0001red.sdf.

It is also possible to request information for an individual fibre or an individual FITS keyword as follows:

>  2dfinfo run0001 fibre 37
lists the information on fibre number 37.

>  2dfinfo run0001 fits_item GRATID
lists the value of the fits header item GRATID (grating ID).

8.9  A Tour of the User Interface

8.9.1  The Menus

The File Menu

The File menu contains only two active commands at present. The Open... command is used to open a data file and add it to the list of files accessible through the ``Data'' notebook page. Files opened in this way can be reduced or plotted manually, but do not form part of the list which will reduced automatically (These are loaded using the Setup button in the automatic reduction section).

The Exit command is used to exit from the data reduction system.

The Options Menu

This is unlikely to be needed in normal use. The Show Tasks... option displays the status of the subtasks which the data reduction system uses to do its work. The Tcl Command... option allows a Tcl command to be entered directly and exists mostly for debugging purposes.

The Commands Menu

The commands menu contains the following commands:

Reduce... - This command opens a file and reduces it. In most cases this operation would be more easily done using the Reduce button on the ``Data'' page, or the automatic reduction method. The menu option is occasionally useful to reduce a file which is not part of the standard set loaded with the Setup button.

Plot... - This command plots a file in one of the plot windows. It is equivalent to the Plot button in the ``Data'' page, but allows any file to be plotted, not just those that have been loaded into the system.

Hardcopy Plot... - This command outputs a hardcopy plot as a postscript file. It is equivalent to the hardcopy option with the Plot button in the ``Data'' page, but allows any file to be plotted. The type of plot produced is controlled by the parameters setup in the ``Hard'' notebook page.

Show Fibre Info... - This command displays the information in the fibre header of a file. It is equivalent to the Show Fibres button in the ``Data'' notebook page, but allows access to the header of any file.

Get Class... - This command displays the class of a data file (see section 8.10.3).

Set Class... - This command is used to set the class of a data file (see section 8.10.3).

Combined Reduced Runs... - This command is used to combine a number of reduced files on the same field to produce a combined frame of improved S/N. The frames are combined using a sigma clipping algorithm after adjusting the continuum levels, on a fibre-by-fibre basis to match the median level. This algorithm gives better S/N than the median used previously. See Section 8.7.10 for more info.

Plot Tram Map... - This command is used to plot a tram line map overlaid on the image from which it was generated.

Find Fibres... - This command is used to generate a new fibre position file from a fibre flat field exposure (see section 8.7.4).

Spectrograph Focus... - This command is used to reduce a pair of hartmann shutter exposures to provide information on the spectrograph focus. A flat field should be reduced first to provide a tram-line map, and then the spectrograph focus command can be used to reduce a pair of arc exposures taken with hartmann shutters A and then B closed. The output is a measure of the arc line shifts binned into an 8x8 grid over the CCD. This is normally done by the Support Astronomer or technical staff.

The Help Menu

This menu controls the enabling and disabling of balloon help information which is provided by default for most aspects of the user interface.

8.9.2  The Automatic Reduction Section

This section is used to control automatic data reduction. In the 2dF reduction system automatic reduction is taken to mean reduction of a sequence of files in one go, as opposed to reducing files individually.

The Setup Button

The Setup button is used to load files into the list on which automatic reduction will be performed. As mentioned in section 8.7.1 these files must obey a naming convention. Once loaded, the files are accessible through the `Data' notebook page. The number of files loaded, and the number which have been already reduced are indicated on the display.

The Start Button

The Start button starts automatic reduction. This will cause all files in the automatic reduction list which are not already reduced, to be reduced. The sequence of reduction is chosen according to the priority of the various data file classes to ensure that calibration files are reduced before the data that need calibrating.

The Stop Button

The Stop button stops automatic reduction after reduction of the current file has completed. If you want to stop immediately then use the stop button, followed by the abort button in the execution task window to abort the reduction currently in progress.

8.9.3  The Data Page

The `Data' page is selected by means of the Data tab on the notebook widget on the left of the screen. It can be used to select any file which is known to the system. Known files are all those loaded into the automatic reduction list by means of the Setup button, as well as other files loaded into the system by means of the Open... or Reduce... menu entries.

Files can be selected by run number. Either step through the run numbers using the up and down arrow keys, or type a run number into the entry field. Alternatively select by file name using the File: section. If a file is opened which does not fit the standard naming convention then it may only be possible to select it by file name.

The class, status (whether the file is reduced or not), and the name of the reduced file (if any) are displayed for the selected file.

Buttons in the `Data' page provide the following operations on the selected file.

Plot - Plots either the raw or reduced file on the screen or as hardcopy.

Show Header - This displays the FITS header of the file.

Show History - This displays information from the `History' structure of the reduced file. This shows when the file was reduced, what calibration steps were used and which calibration files were used.

Show Fibres - This displays a list of fibre information from the header, including the object names, RA, Dec, magnitude etc.

Reduce - This reduces the selected file. If the file is already reduced the button changes to `Re-Reduce'.

Unreduce - Removes this file from the list of reduced files, so that it will be reduced during a subsequent automatic reduction.

8.9.4  The Parameter Pages

The other pages in the notebook are used to set parameters which control data reduction or display.


This contains a number of check buttons which can be used to turn off some stages of the data reduction. Subtract Bias Frame, Subtract Dark Frame, and Divide Image by Flat Field are all on by default, though they won't happen if no suitable calibration file is available. Divide by Fibre Flat Field is off by default. This is a possible way of flat-fielding the data using the normalized fibre flat field. However, it tends not to be very succesful as there is usually residual structure in the fibre flat field after the extraction process (e.g. due to broken fibres).

This section also contains the Verbose button. If this is turned off the number of messages output during reduction is much reduced.


This section controls the method used when multiple reduced frames are combined. It applies to the combination of reduced runs using the Combine Reduced Runs... menu command, or to the automatic combination of offset sky frames which occurs during normal reduction. See Section 8.7.10 for more info.

Adjust Continuum Level causes the continuum level to be adjusted for each fibre by subtracting the difference between a smoothed continuum and the median for the data being combined. This is on by default when combining object frames to allow for variations due to seeing, telescope tracking etc., but can optionally be turned off. The setting is ignored when combining offset sky frames, to ensure that accidental alignments with stars get rejected in the combination.

Flux Weight results in spectra being combined using optimal flux weighting. This is useful if data are taken in varying seeing or cloud conditions, or if frames have different exposure times. Flux weighting is off by default.

The Rejection Threshold is the number of sigma deviation from the median of the combined frames at which a point is rejected (default is 5).

The Smoothing Scale is the length of the median smoothing applied to get the smoothed continuum during the continuum adjustment phase (default is 101).


This section contains parameters controlling the fibre extraction and tram-line map generation process. See Section 8.7.5 for more info.

The Method menu selects the fibre extraction method. The TRAM method performs a simple sum of the pixels is the default method. The FIT method performs optimal extraction and handles fibre overlap by simultaneously fitting profiles to overlapping fibres.

The Plot Tram Map option causes the tram-line map to be plotted overlaid on the data, during the reduction process. The plot is put up twice, both before and after a shift and rotation correction is applied to match the data. (See section 8.7.4).

The Rotate/Shift to Match option causes the tram-line map to be adjusted by means of a rotation and shift to match the data. It normally needs to be on since flexure in the spectrograph means that at least a shift correction is needed for each data frame. The matching operation can fail in a frame with very few fibres illuminated. In this case the Rotate/Shift to Match option can be turned off, but it will be necessary to use a tram-line map derived from a frame taken at the telescope position to avoid problems with flexure.

Use Default Correction causes the software to add a correction to the tram-line map derived from the ray tracing model of the spectrograph, based on the empirically derived difference between the model and typical actual data. This option should normally be on. The only reason for turning it off is when a new correction map is being derived.

Fit Tram Map to Data controls the final step of the derivation of a new tram-line map, in which a surface fit to the difference between the data and the tram-line map is applied as a final correction. Normally this option should be on, but sometimes low signal or noise in some part of the frame may mean that a poor fit is obtained in some regions. In this case better results may be obtained by turning this option off.

Reject Cosmic Rays controls whether cosmic rays are rejected during the extraction process. Cosmic ray rejection with the default threshold should work OK in most cases, but with very high S/N data it may result in rejection of real features. In this case it may be better to turn it off.

Subtract Scattered Light controls subtraction of background light from the data before extraction using a fit to the 'dead' fibre light levels. However, scattered light subtraction is not performed for sky frames (class MFSKY) unless the `Subtract Scattered Light light from Offset Sky Frames' option is also selected. Also, scattered light subtraction requires at least 2 dead fibres to work properly, but better results will be obtained if more dead fibres are available; if there are insufficient broken fibres, 2dfdr will fail.

Check Signal in Dead Fibres This causes the software to check the signal level in each dead fibre (when reducing the initial flat field), and remove it from the dead fibres list if it looks like it is not really dead. The resulting list is written out as a deadfibres.dat file, and will get used for all subsequent reductions.

Subtract Scattered Light light from Offset Sky Frames turns on scattered light subtraction from sky frames as well as other frames. This is separately controllable, since offset sky frames usually have very low scattered light levels and low signal levels, and there is a possibility that the scattered light subtraction process could introduce excess noise.

Plot Fits turns on plotting of the selected fits to the data during the scattered light subtraction and fit extraction.

NSigma (for CR rejection) controls the number of sigma which a point has to deviate from the profile to be rejected as a cosmic ray. The default value of 20 is about the lowest value that is found to be reasonably safe, i.e. unlikely to reject anything which is real in typical data.


These parameters control sky subtraction. Either throughput calibration (see below) or sky subtraction may be turned off. The Sky Fibre Combination Operation menu sets the operation used to combine the sky fibres in the data before subtracting (median or mean; median is the default). See Section 8.7.8 for more info.

The Plot Combined Sky option causes the sky spectrum from the combined sky fibres to be plotted during each reduction. The Plot Throughput Map similarly causes the throughput map to be plotted during each reduction. NOTE: it is not really possible to see both plots, since one is displayed immediately after the other. To see plots, Plot Fits in the `Extract' menu must be turned on.

The Throughput Calibration Method provides two options for calibrating the fibre-to-fibre throughput method. The OFFSKY option is the default and determines the throughput based on the signal in the combined offset sky frames for the fibre configuration. The SKYLINE method is an alternative which can be used if no offset sky frames are available, which determines the throughput from the strength of sky lines in the actual data frame being calibrated. The SKYLINE method works as well as the OFFSKY method when there are sufficient sky lines, e.g. at low dispersion and/or in the red part of the spectrum. This needs to be expanded with latest throughput calibration methods for night sky lines.


These parameters control plots on the screen as a result of the Plot button or the Plot... menu entry. The 95% Scaling? option scales plots between a high and a low scaling level which exclude the top and bottom 2.5% of the data values. This is the default option, if it is turned off data is scaled between the minimum and maximum values.

The Plot Type options controls how image data is displayed. The options are COLOUR for a false colour plot, GREY for a greyscale plot and CONTOUR for a contour plot. Pixels per bin controls the binning of data displayed as spectra. The Remove Residual Sky option causes the strongest sky line at 5577Å to be removed from plots by interpolating across it.


These parameters control hardcopy plots. Some of them are the same as parameters in the screen plots section. The additional option is to plot data as multiple spectra with a number of spectra per page. For example to plot all 200 fibre spectra, 20 to a page, set the parameters as follows:

Plot Type - SPECTRA

First Fibre to Plot - 1

Last Fibre to Plot - 200

Number of spectra per page - 20

Only certain numbers are supported for the number of spectra for page. Other values will be rounded to the nearest supported value. 20 is the maximum.

8.9.5  The Execution Task Section

This section is also organized as a notebook widget, with two pages for the two execution tasks, DREXEC1 and DREXEC2. Every operation which involves accessing the data files is dispatched to one of these tasks for execution (except plotting operations which go to special plot tasks). Having two tasks means that more than one operation can be carried out at the same time. In principle it is possible to reduce two files at the same time, though this is not recommended as there may be conflicts with simultaneous access to the same files. However, the two tasks make it possible to do simple operations such as setting the class of a file, or viewing a FITS header while reduction of another file is preceding. If necessary more execution tasks will be loaded as they are needed.

Each execution task contains a message region in which messages from the task are displayed. There is also a progress bar in which the progress of data reduction is indicated and a description of the current step in the data reduction process.

The Abort button is used to abort reduction of the current file. It may not take effect immediately as the status of the button is only checked at intervals during the reduction process.

8.9.6  The Plot Windows

On startup the system creates two plot windows, one labelled `General Plots' and one labelled `Diagnostic Plots'. The diagnostic plots window is used for graphical output generated during the data reduction process, e.g. plotting of tram maps, fit extractions, combined sky specrum, or throughput maps. The `General Plots' window is used for graphical output resulting from the Plot button or the Plot... menu entry.

Interacting with Plots

Some features of the plots can be controlled using the buttons to the left of the plot window. Other options are obtainable by placing the cursor over the plot and typing keys on the keyboard. The main options available in this way are as follows:

X Plot a cut through the image in X direction.
Y Plot a cut through the image in Y direction.
Z Zoom in by a factor of 2.
O Zoom out by a factor of 2.
P Center plot on cursor indicated position.
[ ] Select a region which will be expanded to fill the display.
H Set the high scaling level to the value of the point under the cursor.
L Set the low scaling level to the value of the point under the cursor.

In addition, clicking the mouse button on a point causes the position and value of the point to be output in the message window at the bottom of the plot window.

Plotting Fibre Spectra

Figure 8.5: The Plot Window

If the file being displayed is a reduced multi-fibre image, then an X cut through the data (obtained with the X key) will be a plot of the fibre spectrum through the cursor position. It is then possible to step through the fibres using the Next and Prev buttons.

Changing the Size of the Plot Window

The size of the plot window can be changed to a number of different settings using the Size menu. A change in size will lose the current plot. The file has to be replotted in the new size plot window.

Multiple Plots

By default when a new file is plotted it will overwrite the one already in the plot window. To prevent a plot being overwritten click on the Lock check box at the lower left of the window. If a plot window is locked and a new file is plotted, then a new plot window will be created to receive it. There can be up to three `General Plot' windows at any one time.

Making Hard Copies of the Screen Plot

The Print... command in the File menu of the plot window can be used to output the current screen display as a postscript file or send it directly to a printer. Note that the result will be output at the resolution it is displayed on the screen. You will get better quality hard copy from a larger plot window. Alternatively you can produce hardcopy output directly from a file using the Hardcopy Plot... command in the Commands menu of the main window.

8.10  Old 2dF Data

8.10.1  Fits Header Items

Data taken before October 1997 will not contain all the header information needed for reduction. The necessary header items must be added as described below. If your data was taken from October 1997 onwards you should be able to ignore this section.

To be usable by the reduction system the following header items must be present.

Keyword Usage
LAMBDAC Central Wavelength (Angstroms)
GRATID Grating ID (e.g. 300B, 1200V etc.)
GRATLPMM Grating lines per mm
ORDER Grating Order
SPECTID Spectrograph ID (A or B)
SOURCE Spectrograph Source (``Plate 1'' or ``Plate 0'')

In addition wavelength calibration lamp exposures need the name of the lamp in the FITS item LAMPNAME. This should be CuAr for the Copper/Argon lamp or Helium for the helium lamp.

If spectrograph information is not in the headers the missing items can be added using the Figaro FITSET command. A shell script to add these items could be set up as follows:

fitset $1 LAMBDAC 5880.0 '"Central Wavelength"'
fitset $1 GRATID 300B '"Grating ID"'
fitset $1 GRATLPMM 300 '"Grating Lines per mm"'
fitset $1 ORDER 1 '"Grating Order"'
fitset $1 SPECTID A '"Spectrograph ID"'
fitset $1 SOURCE '"Plate 1"' '"Spectrograph Source"'
Then for the arc exposures you will have to set the additional LAMPNAME item which can also be done with the fitset command.

The other thing required in the files is the NDF_CLASS item which identifies to the data reduction system how to process the file. This is set up with the data reduction system itself.

8.10.2  Object and Sky Fibre information

For data taken from October 1997 onwards fibre information is included in the headers. The data reduction system will automatically know which fibres are sky fibres for example.

Data taken before October 1997 does not contain headers describing the information on each fibres. For post-October 1997 data, it may also be the case that certain header items are wrong or missing (though this is unusual). For these runs, a utility program called tdffix is provided with the data reduction system to fix the headers of the 2dF data files.

The input needed to this program is the .sds configuration file used to set up the field, and the 2dF fibre database file `spec_fibres.txt' (specifically the version used when the data were taken). `spec_fibres.txt' is available from staff at Siding Spring.

Use the command:

  tdffix infile outfile CONFIG=configuration.sds FIBRES=spec_fibres.txt 

where `infile' is the 2dF data file that needs to be fixed, `output' is the corrected data file, and `configuration.sds' should be replaced by your actual configuration file.

Tdffix can also be used to fix other header items, in other words to set or override the values of FITS keywords used by 2dfdr. As an example:

tdffix infile outfile SPECTID=A ORDER=1

See the tdffix man page for more information about tdffix and how to use it (`man tdffix').

8.10.3  Setting the Class of the Data Files

You can ignore this section if the correct run command setting (i.e. NORMAL, FLAT, SKY, ARC etc) in the 2df control task was used when you took your data. The 2dF data reduction system will use the RUNCMD item written into the header to determine the class of your files. If not you have to set the class as described below.

In order to reduce a data file the system has to know what type of data file it is. It does this using an NDF_CLASS extension stored within the file. Eventually these will be written into the files by the observing system, but currently they have to be added by hand. To set this up you need to be running the data reduction system. Use the SET_CLASS entry in the COMMANDS menu. This will bring up a file selection dialog to allow you to select a file, and then another dialog to allow you to set the class. The class should be set as follows:

Class Name Usage
BIAS Bias frames
DARK Dark frames
LFLAT Long Slit Flat Fields
MFFFF Multi-Fibre Flat Fields
MFOBJECT Multi-Fibre Object Data
MFSKY Offset sky or twilight sky
MFARC Multi-Fibre Arc Frames
MFFLX Flux Standard

8.10.4  Data Contamination by Artificial Lights

Figure 8.6: Fibre spectrum contaminated by neon emission from a neon lamp on the 2dF electronics

Figure 8.7: Fibre spectrum contaminated by emission from a red light emitting diode on the 2dF electronics. The LED causes the broad emission feature at 6600Å.

Some early data taken with the 2dF shows some contamination of the spectra by artificial lights on the 2dF electonics and power supplies. Usually this just affects a few fibres on each image. The contamination takes the form of emission spectra from neon lamps (see Figure 8.6) which show a series of emission lines mostly in the range from 6000 to 7000 Å as well as broad emission features from light emitting diodes. Common wavelengths for the LED emissions are 6600Å (see Figure 8.7) and 7100 Å  though others have been seen occasionally.

Chapter 9
2dF Gratings

Table 9.1: 2dF Grating Specs
Grating Quantity Blaze Order l-range l-range Dispersion Resolution/FWHM
(90% eff.) (75% eff.) (Å/pix) (Å)
1200B 2 4300 1 ..3600-4900 ..3600-5550 1.1 2.2
1200V 2 5000 1 4400-6500 3900-7500 1.1 2.2
1200R 2 7500 1 6400-10700 5600-12000 1.1 2.2
600U 1 3500 1 ..3600-4000 ..3600-4600 2.2 4.4
600V 2 5000 1 4000-6600 3600-7400 2.2 4.4
600R 1 7500 1 5600-8200 5100-9000 2.2 4.4
270R 1 7600 1 5600-7600 5000-8500 4.8 10.0
316R 1 7500 1 ?? ?? 4.1 8.5
300B 2 4200 1 3700-4600 3600-5400 4.3 9.0


9.0.1  Grating Efficiencies

The following plots show the measured efficiencies for the 2dF gratings, for low (Figure  9.1), medium (Figure  9.2), and high (Figure  9.3) dispersions.

Figure 9.1: Efficiencies for Low Dispersion Gratings

Figure 9.2: Efficiencies for Medium Dispersion Gratings

Figure 9.3: Efficiencies for High Dispersion Gratings

Chapter 10
Instrument Sensitivity

The following two tables give the S/N that should be achieved for a point source, or for an extended source (the latter is the figure given in parentheses). The figures are calculated for 10000s exposure time in dark sky conditions, and are based on observations of faint Landolt standards in January 1997. For other settings use the 2dF S/N Calculator. Figures are given for high resolution (1200V grating) and low resolution (300B grating).

10.1  High Resolution

V magnitude 1.0 arc sec seeing 2.0 arc sec seeing
18 48 (31) 34 (24)
20 15 (8) 9 (6)
22 3 (1.5) 1.8 (1.1)

10.2  Low Resolution

V magnitude 1.0 arc sec seeing 2.0 arc sec seeing
19 55 (33) 37 (25)
21 15 (7) 8 (5)
23 2.7 (1.3) 1.5 (0.9)

10.3  Measured Efficiencies

Table 10.1 and Figure 10.1 show the actual measured total 2dF system efficiency as a function of wavelength, using the 300B gratings. The efficiencies will change with grating, and the best performance is for the 270R and 316R gratings, where the system efficiency peaks at 9%.

Table 10.1: 2dF System Throughput vs. Wavelength
Passband/Mag Wavelength Electrons/s/Å Efficiency
(Å) (percent)
B=17 4400 0.6 2.8
V=17 5500 0.6 4.3
R=17 7000 0.4 4.7

Figure 10.1: Figure showing the total 2dF system efficiency as a function of wavelength, for the 300B gratings. The squares and diamonds represent broadband absolute efficiency measurements from Jan 1997 and Nov 1999, respectively, corrected to 1.0 arcsec seeing. The solid line was obtained from a relative throughput calibration using data from Jan 2001, scaled to approximately match the broadband measurements. Figure taken from Lewis et al. 2001.

File translated from TEX by TTH, version 0.9.