The Design and Development of NIRSPEC: A Near-Infrared Echelle Spectrograph for the Keck II Telescope

Ian S. McLeana, Eric E. Becklina, Oddvar Bendiksenb, George Brimsa, John Canfielda,

Donald F. Figera, James R. Grahamc, Jonah Harea, Fred Lacayangaa, James Larkina,

Samuel B. Larsona, Nancy Levensonc, Nick Magnonea, Harry Teplitzd and Woon Wonga

aDept. Physics & Astronomy, UCLA, 405 Hilgard Ave., Los Angeles, CA 90095

bSchool Engineering & Applied Science, UCLA, 405 Hilgard Ave., Los Angeles, CA 90095

cDept. Astronomy, UCB, 601 Campbell Hall, Berkeley, CA 94720-3411

dNASA/Goddard Space Flight Center, Greenbelt, MD 20771

ABSTRACT

The design and development of NIRSPEC, a near-infrared echelle spectrograph for the Keck II 10-meter telescope is described. This instrument is a large, facility-class vacuum-cryogenic spectrometer with a resolving power of R = 25,000 for a 0.4 slit. It employs diamond-machined metal optics and state-of-the-art infrared array detectors for high throughput, together with powerful user-friendly software for ease of use.

Keywords: infrared, spectroscopy, detectors, Keck telescope

1. INTRODUCTION

In general, detailed spectroscopic studies of astronomical sources benefit from the highest possible spectral resolution, consistent with practical exposure times. Typical values are in the range R =/ > 20,000 (corresponding to a velocity resolution of < 15 km/s). Such resolving powers place strong constraints on detector properties, most especially read out noise and dark current, and are particularly challenging for infrared astronomy. With the advent of large format infrared arrays having low noise (about 10 electrons rms) and low dark currents (about 0.1 electrons/s/pixel) it has become practical to consider high resolution infrared spectroscopy, at least for very large telescopes. This paper describes NIRSPEC, a new cross-dispersed, cryogenic echelle spectrograph for the near infrared (0.95 to 5.1 micron) wavebands. NIRSPEC is a joint project between UCLA and UC Berkeley. Since NIRSPEC is being designed as a facility class instrument for the f/15 Nasmyth focus of the Keck II 10-meter telescope on Mauna Kea, this implies a high degree of reliability and ease of use. Excellent optical throughput and the use of a state-of-the-art InSb array detector were among the key design goals. Stringent requirements on science performance and the large thermal mass of the spectrograph optics make NIRSPEC a challenging instrument to build. This project began in October 1994 with a planned four year delivery schedule. Initial design concepts and design goals for NIRSPEC were presented at an SPIE meeting in 1995(1). Only minor changes have been made to the earlier concept. These changes include, adopting an all-reflective design for the spectrograph, selecting a slightly slower camera section to match the nominal slit width of 0.43 to three pixels instead of two pixels, and choosing an echelle grating with 23 lines/mm. A CCD offset Guider system and a Calibration Unit were also added to the design.

Currently, the almost completed instrument is undergoing initial systems tests at UCLA and is awaiting receipt of an ALADDIN InSb 1024×1024 array before delivery to the telescope.

2. DESIGN REQUIREMENTS

Briefly, the desired properties of the NIRSPEC instrument were as follows: a nominal resolution of R = 25,000 (12 km/s) using a 0.4 arcsec slit width, slit lengths of 20-30" for extended sources, a large range of operating wavelengths (1-5 µm), and as much simultaneous spectral coverage as possible within each of the standard atmospheric windows (implying cross-dispersion); there was no requirement to cover more than one band at a time. Also required was a low instrument background, a low noise detector, high optical throughput, an infrared slit-viewing camera and a cryogenic optical field rotator. Of course, it was realized immediately that the optical design, thermal design and mechanical design of NIRSPEC would be significantly more challenging than earlier generation instruments. This has certainly turned out to be the case. Table 1 gives a summary of the final Design Parameters of NIRSPEC.

Table 1. NIRSPEC Design Parameters
Property Echelle Mode Low Resolution Mode
Total wavelength range 0.9 - 5.1 µm 0.9 - 5.1 µm
Pixel scale (dispersion) 0.144/pixel 0.193/pixel
Resolving power (0.42 slit) 23,640 2,264
Slit widths 0.14, 0.29, 0.43, 0.58, 0.72 0.38, 0.57, 0.76
Slit lengths 12 or 24 42
Groove density 23.2 l/mm 75 l/mm
Blaze angle 63.5 10
Collimated beam width 120 mm 120 mm
 
 
 

3. DESCRIPTION OF THE INSTRUMENT

3.1 Optical Design

From the outset, the design goals included the 3-5 micron waveband. As mentioned already, the basic constraints on the design were to provide a spectral resolving power of about R = 25,000, match the spectrograph to the f/15 Nasmyth focus of Keck, which has a plate scale of 1.38 arcsec per mm, and match the image scale to the 27 micron pixels of the ALADDIN InSb arrays from SBRC (Goleta, CA). In addition, the optical design had to provide for a slit-viewing camera and an image rotator.

To minimize the number of surfaces and increase the throughput, the optical layout was kept as unfolded as possible, all reflecting and with no central obscurations. Metal optics were selected throughout, except for the slit-viewing camera, in an effort to keep the design as athermal as possible and the quasi-Littrow mode (QLM) was adopted for the echelle grating. All reflective optics are diamond-machined nickel-coated aluminum surfaces which have been post-polished and silver coated. Figure 1 shows a view of the complete optical layout. Conceptually, the optics can be split into three parts, the Fore Optics placed outside the dewar window, the Front End optics from the window to the spectrograph entrance slit, and the Back End optics of the spectrograph itself.

The basic optical design of NIRSPEC was carried out jointly by UCLA scientists and by Optics 1, Inc. (Westlake Village, CA) using both Zemax and Code V, with an initial optimization of the three-mirror anastigmat (TMA) camera being performed by Larry Siegel of Optics 1. Final optimization was done by SSG Inc. (Waltham, MA ), who also did the mechanical design and assembly of the camera unit(2). A detailed wavefront error (WFE) budget analysis is given in a separate paper in these proceedings(3). All of the other off-axis parabolas (OAPs) and flats in the system were manufactured by Speedring Systems (Rochester Hills, MI) under the leadership of Mike Sweeney. Speedring Systems also performed the difficult and highly constrained mechanical design of the Image Rotator module. Lenses used in the slit-viewing camera and the Calibration Unit were designed at UCLA and made by International Scientific Products (Tarrytown, NY) and the custom diffraction gratings were manufactured by the Richardson Laboratory, Spectronics Inc., (Rochester, NY). Custom-designed order sorting filters were produced and fabricated by Barr Associates (Westford, MA).

Fore Optics:

The f/15 focus of the telescope falls just outside the entrance window to the NIRSPEC vacuum enclosure. To provide offset guiding capability, a large flat mirror of Sitall with a central elliptical hole is placed at 45 to the beam near the telescope focal plane to direct light from the annular field towards a spherical collimator mirror which returns the beam through the hole and forms a (small) pupil image behind the mirror. The annular field is reimaged at f/2.5 onto a PXL Camera from Photometrics Ltd., (Tucson, AZ) using an 85 mm f/1.8 Nikon lens with a 62 mm diameter Red 25 filter to yield a scale of about 0.2 /pixel with a SITe 1024×1024 CCD. This arrangement gives an annular FOV of 7.4 sq. arcmin, resulting in a >98% chance of finding a guide star at the North Galactic Pole. Guiding on a R=20th magnitude star to 10% rms of its image width (FWHM) should be possible using 1-2 second integrations. Located just behind the 45 flat mirror is a small mechanism which can drive a folding flat into the beam to feed light into the instrument from a Calibration Unit. Central to the Calibration unit is a custom-designed integrating sphere made by Labsphere (North Sutton, NH ) with an Infragold coating and a 1-inch output aperture. The sphere can be fed with light from three sources, a cluster of arc lamps (which can be individually controlled), a halogen lamp or a halogen lamp filtered by a special Fabry-Perot etalon manufactured by TecOptics (Merrick, NY). Refractive reimaging optics are used to transfer the output image of the integrating sphere, via folding flats, into the instrument, while also recreating the f/15 beam of the telescope and approximating the aberrations in the pupil plane formed inside the dewar by the Front End optics. Both the Guider and Calibration units are housed together in a compact module which attaches to the front of the vacuum enclosure.

Front End Optics:

To keep the size of the vacuum enclosure of the spectrograph as small as possible, the first-stage or Front End optics convert the f/15 focus to f/10. This is accomplished using a pair of folded assemblies not unlike K-mirrors, but with the second element of each assembly being an off-axis parabola (OAP) instead of another flat. Consequently, the first K-mirror assembly (K1) produces a collimated beam if the focal length of OAP1 coincides with its distance from the Keck focal plane, which lies about 30 mm in front of the entrance window of the dewar. The K1 assembly is a critical unit in the optical train because it performs several important functions. Firstly, it collimates the beam and creates an image of the entrance pupil, therefore providing a convenient location for moderate-sized order sorting filters and a Lyot stop (a cold stop with a central obscuration corresponding to that of the telescope). Secondly, by rotating the K1 assembly about the optical axis one can change the image orientation on the fixed spectrograph slit and by continuous tracking of the K1 assembly one can also compensate for the field rotation caused by the non-equatorial mounting of the telescope. Construction of a massive, precision, cryogenic mechanism within the confined space behind the dewar window was an exceptionally difficult task. A second K-mirror assembly follows the first and differs from it in two ways. The focal length of OAP2 in the K2 module is two-thirds of the OAP used in the K1 unit and its orientation is arranged to refocus the beam onto the spectrograph slits at f/10. Also, the last flat mirror in the K2 assembly is extended to one side to capture the reflected beam from the slit plane when that plane is tilted by about 12 degrees. The K2 assembly is stationary. Individual slits of different lengths, widths and orientations are laser-cut into polished disks and mounted like filters in a filter wheel. Each disk is made of a copper substrate which has been optically polished to about quarter-wave (at 633 nm), gold-coated, recessed in the center on one side and laser-cut with precision slits. This special development was undertaken for us by National Aperture Inc. (Salem, NH). Light reflected from the tilted slit substrate and the second flat in the K2 module is directed towards an infrared slit-viewing camera.

Based on a 256×256 HgCdTe PICNIC array from Rockwell International Science Center (Thousand Oaks, CA), the camera uses a three-element lens design to re-image the slit plane at wavelengths of 1 to 2.5 m. Figure 2 shows the optical design. A BaF2 element roughly collimates the diverging f/10 beam, and a LiF-BaF2 doublet reimages at f/4.6 onto the PICNIC array, giving 0.18 per 40 m pixel and a 46 × 46 field of view. At the nominal image rotator position, this design gives > 80% energy in one pixel for all field points from 1.05 m to 2.4 m. The performance at other positions is shown in Figure 3. The rotator range is normally -45 to +45. Image distortion does not exceed 0.5% and is dominated by the front end optics.

Speedring Systems (Rochester Hills, MI) designed and constructed the K1 and K2 modules, including the rotating section, using diamond-machining techniques and careful cryo-cycling practice. Each optical surface was formed in aluminum with a thin electroless nickel coating, and all six surfaces were post-polished. The flats were made as a single unit, like a roof shape, and then installed into a supporting assembly which was precision machined to receive them. Each K-mirror unit was aligned by interferometry at Speedring Systems, both independently and as a pair, while mounted on a small aluminum mini-bench. The assembled bench was then transferred without further adjustments onto the main optical support plate of the NIRSPEC instrument, thus essentially defining the optical axis. Space was left between the K-mirror units for the double filter wheel module and an attachment port was provided for the slit-viewing camera optics module, both built at UCLA. Cryogenic performance of the entire Front End optics was tested during a cool down of the NIRSPEC dewar and the performance was comfortably within specification.

Back End Optics:

The f/10 beam emerging from the slit plane travels 1.2 m to an off-axis paraboloid mirror (called the OAPC) which acts as the collimator producing a 120 mm beam which returns almost the same distance to meet the echelle grating located very close to the slit wheel. The echelle is mounted at a = 5 angle out-of-plane (the Quasi-Littrow Mode). Dispersed light then travels toward the cross-disperser grating and into the camera section. Mounted back-to-back with the echelle grating is a flat mirror. During interferometric set up, the flat mirror was used with a slight tilt of the whole echelle grating assembly to produce a return beam back through the system to aid in positioning the collimator. Both the collimator and the flat were made by Speedring Systems in nickel coated aluminum and post-polished. In addition, Speedring Systems also made the weight-relieved aluminum blanks for both diffraction gratings. The echelle grating is 142×320 mm (50 mm thick) and the cross-disperser grating is 216×200 mm (37.5 mm thick); the first dimension is the groove length. Replica gratings were applied to each of the aluminum blanks and gold-coated by the Richardson Laboratory, (Spectronics Inc.).

The final optical component in the Back End is a Three-Mirror Anastigmat (or TMA) Camera. This complex unit consists of two concave ellipsoids and a convex hyperboloid to collect and focus the cross-dispersed spectrum onto the 1024×1024 pixel InSb array. SSG Inc. delivered the TMA as a completely assembled, aligned and tested module (see reference 2).

3.2. Mechanical design

The mechanical design of NIRSPEC is essentially built around the optical layout by providing an optical bench or Optical Plate for the optics to mount on, and then constructing a custom-designed vacuum enclosure and cooling system around it. Since the instrument is located at the Nasmyth focus, the gravity vector remains constant and this factor significantly helps in simplifying the mechanical design.

Figure 4 shows a schematic layout of the main mechanical components inside the vacuum enclosure. The vacuum enclosure itself, like all of the components within, is made of 6061-T6 aluminum and is 41 inches wide by 60 inches long by 28 inches high. Both the upper plate and the lower plate are 1-inch thick and are detachable using O-ring seals. The four side walls, each 0.75 inches thick were heliarc welded together and a frame or lip was also welded around the top and bottom edges to provide a location for an O-ring groove and a bolt-hole pattern. Each of the plates was prepared at UCLA and welding was done by Weld Lab (Santa Monica, CA) with minimum distortion and no leaks. Finally, the outer surfaces were anodized by Anodyne (Santa Ana, CA).

The Optical Plate, which is 36 inches wide by 54 inches long and 1.125 inches thick, and contains over 400 precisely located tapped holes, was made at Schwartz Industries (Warren, MI). While supported in the same manner as it would be in NIRSPEC, the plate was machined, ground flat and drilled and tapped with mounting holes. Between each machining, grinding and cutting phase the plate was thermally cycled. Finite element analysis of the fully loaded plate and mounting structure was performed. The plate is very slightly over-constrained by use of four identical "A" frame mounts at the mid-points of each side. Each support comprises a pair of A-frames. The outer part, which mounts to the base plate of the vacuum enclosure, is made of fiberglass, and the inner frame which mates to the optical plate is aluminum. This structure is stiff in the vertical plane but compliant in the direction of shrinkage of the plate under cryogenic operation. Sheer stresses are well within safe limits. Only small displacements of the bench occur due to bending during cooling or due to forces transmitted through the cover when the chamber is under vacuum.

Since the total thermal mass within the vacuum enclosure is about 220 kg of aluminum, plus a small mass of copper straps, the total heat to be removed for operation at 77 K is in excess of 40 MJ. A 20 liter reservoir of LN2 in the form of a shallow can with a large diameter is centrally located on the optical bench. This can is a welded construction in aluminum and is extremely effective in cooling the optical plate. The presence of the can however, has a significant mechanical influence on the optical plate which in turn could affect the optical alignment. Since the system is aligned with the can in place and no differential pressure across the can, this condition can be retrieved completely in vacuum-cryogenic operation of the enclosure by pumping on the LN2 can. A 5-pixel displacement of the spectrum on the detector is canceled out when the LN2 can is evacuated. Two closed cycle refrigerators (CCRs) are also mounted to the optical plate by means of flexible copper straps. One of the units is a 1050 single stage head with a capacity of 100 W and the other is the 350 two-stage head. The CCRs are made by CTI Inc. (Mansfield, MA); both cold heads can be operated from a single 9600 compressor. An aluminum cold shield (at an average temperature of 90 K) surrounds the components on the optical plate and is attached in such a way as to minimize any stress on the plate. Two "floating shields" are applied to all faces except the lower plate of the chamber, through which all connections and fittings are made, where three such shields are used. The measured emissivity of the shields is about 5% and they are about 90% effective in reducing the large radiation load (about 74 W) on the inner surfaces.

Six mechanisms are required within the vacuum-cryogenic enclosure. These are the Image Rotator, two Filter Wheels, the Slit Wheel, the Echelle Grating, and the Cross-Disperser Grating. Each mechanism is driven through a worm and gear drive using a stepper motor modified for vacuum-cryogenic applications. The motors we have employed are from American Precision Industries (Amherst, NJ) and the modification consists of replacing the bearings with ones containing a dry lubricant impregnation. With the exception of the cross-disperser grating, all the mechanisms use plain bearing surfaces made of the Dupont plastic called Vespel. Each mechanism is equipped with microswitches and activators to provide "home" positions and limit positions. In general, the motors are powered off after completing their moves. The only exception to this is the motor for the image rotator mechanism since this unit has a continuous tracking requirement.

The vacuum chamber rests semi-kinematically on three adjusters attached to a steel support structure. The main support frame for the instrument is a rectangular space frame of welded steel tubing. One adjuster is at the front, just below the telescope focal plane, and the other two are at the rear of the chamber. The adjusters provide fine control of tip, tilt and focus for the entire instrument on the handling frame. Each provides an identical vertical adjustment using differential thread pitches to give very fine height control. For horizontal motion, each has a pair of crossed v-blocks, sliding on Glycodur low-friction bearing material. The front adjuster has both coarse and fine adjustment in both longitudinal (focus) and transverse directions. One rear adjuster has coarse and fine transverse adjustment and is free to slide with the focus adjustment. The third mount is free to slide in either direction.

After being carried into position by a handling cart on rails, the handling frame is lowered down a few inches using a built-in jacking system to locate the instrument into three kinematic mounts on the floor of the Nasmyth platform. Figure 5 is a photograph of the partially completed instrument in the laboratory.

Kinematic floor mounts support the tubular frame on three steel legs, threaded to allow for coarse height adjustment. As for the adjuster, the front kinematic mount lies directly under the telescope focal plane, and is a ball and socket type. The other two mounts are at the rear of the instrument, one being a V-block type and the other a simple slider free to move in all directions. This arrangement will allow for differential thermal contraction or expansion of the frame in the event of abnormally abrupt environmental changes, without affecting alignment of the instrument to the telescope.

The frame also incorporates the insulated electronics cabinets, which move with the instrument. The Keck Observatory has an arrangement of steel rails for instrument handlers, with storage locations on the "Nasmyth deck", a large semi-annular balcony, at the level of the Nasmyth platforms of the telescope. We have constructed a motorized cart compatible with this rail system, so that NIRSPEC can be rolled onto either Nasmyth platform from the deck. This cart runs on steel rollers; an electric motor drives gears which mesh with a rack set in the floor midway between the rails. A cart with the same frame but simple casters is used in the laboratory.

The instrument support frame has four screw jacks at the corners, geared together and driven by a single electric motor. When the instrument is to be moved it must first be jacked up using this system, until the kinematic mounts are clear of the floor, then moved to the new location. An interlock switch prevents the cart motor from being energized until the jacking is complete.

3.3. Electronics Design

Requirements for the electronics system include, control and data acquisition of all the detectors in the instrument, control of mechanisms, temperature monitoring and feedback systems, a low noise environment, and control over excess heat leaked into the telescope dome from the electronics.

Most of the electronics for NIRSPEC are located in two thermally insulated cabinets, each with a 35 inch internal height for 19 inch rack mounted units. The cabinets are joined by a small mid-section which houses temperature controllers and SCSI to fiber optic line drivers. Thermal insulation is about 2 inches thick and is designed to limit heat loss into the dome to about 50 W. Two cooler units are housed in the base of each cabinet to remove excess heat via the observatory glycol cooling system. Both cabinets are mounted on a single platform or base which is bolted to the handling frame beneath the vacuum enclosure. Consequently, the electronics package is integral to the instrument and need not be disconnected from the dewar when NIRSPEC is moved.

Figure 6 provides an overall system diagram. There are two separate analog signal chains, one from the spectrograph detector and one from the slit-viewing camera. The SBRC ALADDIN InSb array has 32 outputs and the Rockwell PICNIC HgCdTe array has 4 outputs. Basically the same preamplifier design is used for each chain, and we have chosen Analogic (Peabody, MA) 16-bit 500 kHz ADCs for their high performance. Each detector also requires a Bias board and a Level Shifter board, and each electronics module also contains a simple Interface board.

a) Interface board: The interface board handles control signals from the host/digital side to the analog side. For example, this board produces the offset voltage to the first-stage preamp to remove the dc level from the detector output and also produces the gain, bandwidth, convert and select commands for the preamplifier board.

b) Bias board: All dc bias voltages required by the array are generated on the Bias board. The ALADDIN array has several bias lines that change level at the beginning or end of an exposure. To accommodate this requirement, six bias voltages on the board can be "switched" between two preset levels. Bias switching is controlled by the Clock Generator board (DAQ17). All the switched biases have slow rise and fall times. There are seven fixed biases, and all the biases are heavily filtered for low noise. Provision is made to hold one of the dc biases for the ALADDIN array, VdetCom, at VddUc level until the detector is cold. Once the detector is at operating temperature then the voltage can rise up to 1.5V above Vdduc. The amount of change is set by a DAC which is under the control of the program.

c) Level Shifter board: The Level Shifter board converts the TTL voltage level clocks from the Clock Generator board (DAQ17) into the voltage levels and polarity required by each detector array. As with other boards in this system, the TTL inputs are isolated from the clock generator with Burr-Brown (Tucson, AZ) ISO150 IC devices. All the dc levels used by the level shifter circuit are heavily filtered for low noise. The maximum switching time is less than 50 nsec.

NIRSPEC's digital electronics are based on the Inmos T805 transputer programmed in Occam following previous applications of this processor in our earlier instruments(4). Although transputers will become less available after 1998, this technology has served us well because of its intrinsic simplicity and ease of coding. The data acquisition and clock generator boards were made by DSP Systems Inc., (Los Angeles, CA).

The transputer's main distinguishing features are on-chip scheduling, which enables a single processor to run multiple processes without an operating system kernel, multiple on-chip timers, on-chip program RAM, and four 20 Mbit/s serial links per processor, allowing construction of interlinked networks of processors. The Occam high-level language, developed jointly with the transputer, has numerous constructs to facilitate real-time parallel programming.

There are two types of transputer board in our system, the DAQ17 and DAQ15. The DAQ17 is the clock generation and motor control board, while the DAQ15 acquires data and handles co-addition.

Each DAQ17 has a single T805 transputer and 4 Mbytes of memory, and can perform multiple functions. The primary functions are clock generation for controlling the readout of the arrays, and controlling stepper motors and reading back position switches in order to control the various mechanisms in the instrument. The motor control ports are actually simple general-purpose digital I/O ports. Using these I/O ports, some of the boards are also used to read electronics cabinet temperatures using Dallas Semiconductor (Dallas, TX) DS1820 temperature sensors, control and monitor the various lamps in the calibration unit, and perform a number of other simple digital I/O functions.

The DAQ15 board has four input ports, each feeding a T805 transputer with 4 Mbytes of memory per processor. Its sole function is to read the digital data produced by the analog-to-digital converters, under the control of the clocking pattern produced by the DAQ17 clock generation program.

Both types of transputer board are implemented in the standard 6U Eurocard format, allowing us to use off the shelf mounting hardware and enclosures. All but one of the transputer boards are mounted in a standard VME backplane. Although they connect to power and ground via the backplane, the transputer boards do not use the bus lines. However, wire-wrapped links joining the uncommitted pins on the backplane connector are used to connect the transputers together. A single DAQ17 board is housed in a separate enclosure, acting as the "telephone exchange" for messages between the host computer and the other transputers in the main enclosure, and also as "housekeeping" transputer, looking after temperature monitoring and other status checking.

In addition to the two types of custom transputer board we also use two small daughter-cards in the housekeeping cabinet, each with a single transputer and two RS232 ports. These ports are used to read back dewar temperatures from LakeShore (Westerville, Ohio) units monitoring the instrument, to control a programmable power strip from Pulizzi (Santa Ana, CA) which manages power to the various power supplies in the cabinets, and the un-interruptible power supply providing backup power. Should there be a problem with either the coolant supply or the primary 110V power, units can be selectively turned off until the situation is righted. The housekeeping transputer can continue to function even when its peers in the transputer network have been turned off.

Communication between the transputers and the host computer is achieved via a unit called the Matchbox (Transtech Corp, Ithaca, NY). This unit attaches to the external SCSI port of the host workstation, and passes messages and receives data over a transputer serial link. Using a pair of converters from Black Box Corp (Lawrence, PA), the SCSI port signals are extended about 300 feet over optical fiber, from the observatory computer room to the Nasmyth platform location of the instrument.

3.4 Software Design

A primary goal of the NIRSPEC design was to provide an exceptionally good level of user-friendly software for the instrument. Placing a strong emphasis on software design and development at the beginning of a large project is, we believe, critical to its success(5). Even prior to completion of the optical and mechanical design, we had developed a simulation of the data output from the spectrograph detector and a simulation of the Graphical User Interface (GUI) for the instrument. Consequently, it was possible to begin coding of the final software at an early stage with the result that the software was ready to be used during systems integration and test. Software is needed not only for instrument control and status display, but for instrument set-up and observing, for "quick-look" image analysis at the telescope and for automated "pipeline" data reduction for standard observing modes.

The basis for the NIRSPEC software is the Keck Keyword system. Communications between the instrument and the observatory, or between the host and the front-end electronics, is based on a library of keywords whose values can be read (shown) or modified. An Ultra II Sparcstation acts as the host computer and runs a "server" program that interacts with the instrument and telescope control system. Several "client" programs can then be run in order to interact with the user and control the instrument or monitor the instrument's status. Among these client programs is a status and instrument setup display based on the DataViews tool, a "quick-look" data display and analysis package based on IDL, and an echelle format simulator and script generator also based on IDL.

Observers can operate the instrument by typing keywords on the Command Line, or modifying entries in the GUI or by generating observing scripts using the Echelle Format Simulator (EFS). The EFS is an IDL-based tool for selecting setups and developing observing scripts which can be saved or executed automatically. By drawing a good approximation of the expected echellogram for the given instrument setup (grating angles, order-sorting filters and slit sizes), the observer can select the most appropriate arrangement, generate a script and start an observation without having to set each individual mechanism to the required position. The EFS allows the user to set up an entire observing sequence in advance, including multiple grating angles, filters, integration times, reference star exposures and calibration lamps. An example of the appearance of the EFS is shown in Figure 7.

Image data from the slit-viewing camera and spectrograph detector is automatically displayed using an IDL-based Quick Look image analysis package. This package uses the IDL Widget software, which provides a straight forward method for creating graphical user interfaces. The Quick Look package allows for sophisticated image analysis including simple spectral extractions, photometry, contour and surface plotting, image statistics, image arithmetic, zoom and pan features, and variable color palettes and stretches. When the primary client software is run, two basically identical versions of Quick Look are started; one for the ALADDIN detector in the spectrograph section, and one for the PICNIC detector in the slit viewing camera. Each of these two interfaces then operates independently and will automatically display new exposures as they become available from the server.

It is planned that most users will use the Echelle Format Simulator to directly control the instrument. As mentioned above, the EFS will save a sequence of instrument setups and exposure settings as a csh script. This script is then executed as an independent client program and will direct the server through a full observing sequence. At the same time, a Real-Time Data Reduction Pipeline is notified of the script starting. This program will actively monitor the progress of the script and will begin to process data as it becomes available. The Pipeline also maintains a database of previous calibration frames and will use this extended data set (exposures plus calibrations) to perform a first order data reduction, including extracting the echelle orders and linearizing the data in both slit position and wavelength. The Pipeline uses a sophisticated Matrix Transfer Formulation of the instrument to model the echellograms and perform the spectral extractions. Calibration frames are used to improve upon this model, but the routine does not search for sources within the data frames. The full slit length is extracted according to the model, so that the final data are not biased by bad pixels or other defects in the raw frames. Final frames are displayed using an additional copy of the Quick Look procedures. It is also planned that the Data Reduction Pipeline will be modified to allow the user to adjust the reduction procedures. As currently implemented, it is an automated routine running on a separate Sun workstation. The goal of the NIRSPEC data reduction pipeline is to provide reduced data in real-time. This will enable observers to evaluate progress and adjust their observing plans to achieve the science goals of the program. Pipeline processing will require minimal interaction with the observer. Through scripted observing, complete reduction of complicated observing sets, such as multi-position nods, will be performed automatically. Since the data reduction pipeline is written in IDL, it may be run at observers' home institutions.

A complication of the NIRSPEC data reduction is that the spectrograph has a non-classical echelle illumination with a non-zero gamma angle (the Quasi-Littrow Mode). In high-resolution mode, both the echelle orders and the slit image appear tilted on the detector. The true dispersion and spatial axes are not aligned with rows and columns of the detector, and in fact they vary across the detector. In the data reduction pipeline, we rely on a physical model of the instrument, rather than an empirical attempt to identify the echelle orders and slit location in calibration or data frames(6)

. Calibration data (e.g., arc-lamp spectra or an array of pin-holes at the slit) are used to refine the physical model and determine accurate values of the echelle and cross disperser grating tilts. This provides a complete solution of the wavelength and slit position on the detector, and it is fully applicable to the extraction of faint or extended sources. The output of the pipeline processing includes wavelength-calibrated FITS files, from which spectral extractions are simple rectangular cuts.

4. CONCLUSIONS

There are several very challenging aspects to the development of large cryogenic instruments like NIRSPEC, which also require low-background, low-noise performance and exceptional stability. We have encountered many difficulties along the way and have by no means come to the end of the problem areas. While the instrument is now largely complete and in the integration and test phase, the lack of an InSb array from SBRC is the critical path, since without a long-wavelength detector it is impossible to assess the internal background within the dewar. Nevertheless, first results with the ALADDIN II mux and an engineering grade PICNIC array have been encouraging.
 
 

5. ACKNOWLEDGMENTS

In addition to all the vendors listed in the text who worked closely with us to meet stringent specifications, we would like to thank especially Joe Robichaud, Brian Zellers and Rick Philippon at SSG Inc., Mike Sweeney at Speedring Systems, Bob Fischer and Larry Siegel at Optics 1, Inc., Rodney Taylor and Scott Taylor at DSP Systems Inc., the instrument-makers and machinists at UCLA and all the staff at CARA headquarters in Waimea, in particular Al Conrad. We would also like to thank our former colleagues Tim Liu, Frank Henriquez and Leah Buchholz for their contributions to this project.

6. REFERENCES

1. I. McLean, E. Becklin, D. Figer, S. Larson, T. Liu and J. Graham, "NIRSPEC: A near infrared cross-dispersed echelle spectrograph for the Keck II telescope," SPIE 2475, 1995.

2. J. Robichaud, B. Zellers, R. Philippon, I. S. McLean and D. F. Figer, "Cryogenic performance of the NIRSPEC three-mirror anastigmat", SPIE 3354, 1998.

3. D. F. Figer and I. S. McLean, "Wave front error analysis for the NIRSPEC spectrograph for the Keck Telescope", SPIE 3354, 1998. ??

4. I. S. McLean et al., "The UCLA double-beam infrared camera system", Infrared Detectors and Instrumentation, A. Fowler ed., SPIE 1946, 513-533, 1993.

5. I. S. McLean, Electronic Imaging in Astronomy; detectors and instrumentation, Wiley-Praxis Series in Astrophysics, John Wiley & Sons, Chichester, UK, 1997.

6. P. Ballester, & M. R. Rosa, A&A Suppl., 126, 563, 1997.