Use of dome flats

Flat fielding of data can be used to (a) remove pixel-to-pixel variation of the detector sensitivity, and (b) remove global illumination patterns such as vignetting. Often there are three sources of flat fields to consider: internal flats, which are often created by shining light off a hatch cover; dome flats, where the dome in front of the telescope aperture is illuminated by projector lamps; and twilight flats, which require observations of the sky during twilight. A fourth source of flat fields is a median-filtered set of images taken during the night. Often called "superflats" or "sky flats," dithering the telescope for the image set and using the median filter can eliminate any stars or other objects in the field of view and create a flat field image that way.

In general internal flats are easier to take, since they do not require telescope control. They often suffice to determine the pixel-to-pixel variation of the detector, and may even reliably reproduce the global illumination pattern of small pieces of the field. They are often used for spectroscopy.

Dome flats attempt to reproduce the illumination of the telescope aperture without requiring an open dome shutter. They also reproduce the pixel-to-pixel variation well, but also can reproduce the global illumination pattern fairly well.

Twilight flats (or night-time "superflats") assure that the telescope is illuminated the same way as it is during science observations, and are considered superior to dome flats for some uses. However, they require on-sky time that could be profitably used for, e.g., bright standard stars or focusing the telescope, and it is often relatively difficult to predict the required exposure time as the twilit sky changes brightness rapidly after sunset or before sunrise.

Flat fields can generally be taken in spectroscopic modes and in imaging modes. Spectroscopic flats require many more photons than imaging flats, since the light is dispersed in wavelength. Hence there are actually two separate sets of flat field lamps illuminating the dome: one for spectroscopy and one for imaging. In some cases, such as NIRC-2 with AO, the imaging scale is so fine that one actually uses the brighter spectroscopic lamps for imaging flats. For NIRC-2 the dome flat lamps do not provide enough light to efficiently create spectroscopic flat field images.

Dome lamp control

To take dome flats use either of the dome lamp control guis available from the desktop background menu:

Unattended flats

In the morning hours the OAs may set the telescope up for flats and then leave the summit. It is the observer's responsibility to make sure that the flat lamps are turned off when they are done with calibrations. Note, too, that the day crew often arrives at the summit as early as 7:00 a.m., and there is no guarantee that the other dome lights, such as the bright fluorescents, will not be turned on shortly thereafter. After 7:00 a.m. the dome and telescope are considered the day crew's. Under exceptional circumstances more time might be made available for dome calibrations.

While the observers should feel free to stay at the computer until all calibrations are complete, the scriptability of many Keck instruments makes it relatively easy to write scripts that can run unattended. There are several ways to incorporate the dome flats lamps. The easiest way is to add the command "domelamps off" at the end of the script. Another technique is to use the UNIX "at" command, which can trigger a series of commands at some specific time.

Use of the "at" command

As an example, let's say that you want to turn the dome lamps off at 7:00 a.m. The "at" command requires a time (see the man page for "at" for more details), so type "at 7:00". You then will receive an "at>" prompt.allowing you to type in commands. In this case we simply type "domelamps off," hit <Return>, and then type a Ctrl-D at the second "at>" prompt. This will end the command sequence and schedule the command to be run at 7:00 a.m. The results of the command will be e-mailed to your account, similar to the way a cron job works.

AO flats

When using NIRC2 or OSIRIS, there are some housekeeping tasks that need to be done at the end of the night. Normally the Observing Assistant will run the "Halt AO" script, which among other things closes the hatch into the AO bench. When doing unattended flats, the OA should still run this script, and tell the observer when it is complete. The observer should then run the "configAOforFlats" script, which will, e.g., reopen the AO hatch.

IMPORTANT! When you are done with your calibrations, remember to close the AO hatch using the command "aohatch closed". Otherwise the AO bench is left open to dust from the dome. And, of course remember to turn the dome flat lamps off.