Preparations

Before you can begin the reduction of your MOSAIC images you need to bring your raw data to the necessary computing and software resources. This means gathering enough computing power, the proper software, your raw images with complete and accurate image header, and the proper data calibration files. The topics below should help you gather together the necessary components that will enable you to perform your reductions.

  1. Computing Power
  2. Software
    1. IRAF
    2. xdwred, mscred
    3. setinstrument
  3. Load Raw Data with Complete Headers
    1. msrfits
    2. mscsetwcs
    3. msccmd and hedit
  4. Examining Your Images
    1. ccdlist
    2. mscdisplay, ximtool-alt
    3. mscexamine
  5. Calibration Data
    1. Calibrations You Should Have Obtained During Your Run.
    2. Getting NOAO Provided Calibration Files

Computing Power:
To reduce MOSAIC images you need a fast computer (we usually use a Sun Sparc Ultra-2, and find that not fast enough, or an Ultra-60, which is ok, but we would like even more speed) with plenty of memory (the more the better) and a significant amount of available hard-disk space to store the raw and intermediate images while working toward your final data products. We find that approximately 100 GB is enough ``working-space'' to allow us to process a couple of night's of data -- but how much space is required will depend on your specific program (you could easily end up needing more!). We are in the process of upgrading to three Ultra-60s to improve the speed of our reductions.

NDWFS Computers

Software:
We currently process the NDWFS MOSAIC images with IRAF tasks and scripts. After starting IRAF, verify that you are using the same version of mscred used during the construction of these notes. This can be done by loading the mscred package and/or the command at the command line prompt of "epar mscred".

NDWFS: IRAF on our Computers

IMPORTANT: As of August 29, 2000 we are using IRAF 2.11.3. We are currently using the version of mscred contained in the package xdwred. While as of September 6, 2000 this was identical to mscred version 4.1, it is not guaranteed to match whatever your default version might be, although we will be trying to keep mscred releases up-to-date. Some tasks might work differently from the normal release, although once new versions in xdwred been used successfully tested they will be made available as part of the general release.

Initialize the Software

After starting IRAF and loading the xdwred and mscred packages (in that order, or just mscred V4.1 if you are someone using the general release of mscred), you should generally use the setinstrument task to populate various parameters of several IRAF tasks with the correct values for the version of MOSAIC camera that produced the data you are reducing. An example of a set of instrument specific (and time dependent) input parameters are the ``electronic cross-talk'' coefficients used to remove the electronic cross-talk between paired CCDs (CCDs sharing ARCON electronics) in both MOSAIC-I and MOSAIC-II. Currently data from three versions of the NOAO MOSAIC cameras exhist. MOSAIC-I has so far had two incarnations. Initially MOSAIC-I was deployed with engineering grade CCDs and used at the Kitt Peak (KP) 4m and 0.9m telescopes from 1997 through the first semester of 1998. Starting with the second semester of 1998, MOSAIC-I has benefited from thinned SITE CCDs and this version of the instrument is indicated by CCDMosaThin1 as the value for instrument in the setinstrument task below. An upgrade of MOSAIC-I that might result in changes to some of the instrument parameters is in progress at this time (August 2000) and might lead to a third set of possible parameters for MOSAIC-I. The second MOSAIC camera (MOSAIC-II), used at the CTIO Blanco 4m telescope (CT4m), was commissioned with science grade detectors in 1999 and first used by visiting observers in semester 99B. An example of the proper parameters for setinstrument when reducing KP4m MOSAIC data follows.

Parameters for setinstrument:

PACKAGE = mscred
TASK = setinstrument

  site    =                 kpno  Site (? for menu)
  telescop=               4meter  Telescope (? for menu)
  instrume=         CCDMosaThin1  Instrument (? for a list)
  (directo=          mscdb$noao/) Instrument directory
  (review =                  yes) Review instrument parameters?
  query_si=                 kpno  Site (? for menu or q to quit)
  query_te=                       Telescope (? for menu or q to quit)
  query_in=         CCDMosaThin1  Instrument (? for menu or q to quit)
  (mode   =                   ql)

Currently available combination of choices for site/telescope/instrument are

site = kpno
telescope = 36inch or 4meter [Mayall 4m] or wiyn
instrument = mosaic1 [for Engineering CCD version of instrument]
instrument =CCDMosaThin1 [for Science grade CCD version, until August 2000]

OR

site = ctio
telescope = 4meter [Blanco 4m]

When you run setinstrument you will also be prompted to edit the parameters for mscred and ccdproc. At this time (or if at some other time you want to make a change, you can do so by (epar mscred)), set the path to the "back-up" directory. The default is /Raw. This is where ccdproc will copy your raw data after it has started to generate a reduced version. You can also adjust whether the data is backed up once, on every change, or not at all. Remember that if you do save a backed up version this will take up more diskspace.

Here is what mscred parameters will look like for reducing CCD MOSAIC data from the KPNO 4m telescope.
Note that with the parameters below the raw images will be backed-up to a subdirectory named "Raw".

	

TASK = mscred

(pixelty=            real real) Output and calculation pixel datatypes
(verbose=                  yes) Print log information to the standard output?
(logfile=              logfile) Text log file
(plotfil=                     ) Log metacode plot file
(backup =                 once) Backup data (none|once|all)?
(bkuproo=                 Raw/) Backup root (directory or prefix)
(instrum= mscdb$noao/kpno/4meter/CCDMosaThin1.dat) CCD instrument file
(ampfile=                 amps) Amplifier translation file
(ssfile =              subsets) Subset translation file
(im_bufs=                   4.) Image I/O buffer size (in Mbytes)
(graphic=             stdgraph) Interactive graphics output device
(cursor =                     ) Graphics cursor input
(version= V4.1: September 6, 2000)
(mode   =                   ql)
($nargs =                    0)

Load Raw Data with Complete Headers:

NOAO currently recommends that mscwfits be used to write raw data to tape. If this is how you stored your data at the telescope you should restore it to your computer using the task mscrfits in the mscred package. The raw data files will be multiextension fits files (MEF) and roughly 135MB's in size. For NOAO MOSAIC data the MEF files will include nine extensions numbered 0-8. The "0" extension contains header information common to all of the eight individual CCD images that comprise a single exposure. The 1-8 extensions are the fits images of respectively CCD1 through CCD8. Each of these extensions contains both CCD specific header information (e.g., gain and read noise values) as well as the data themselves.

Example of parameter file set-up to read MOSAIC images back from a tape written with mscwfits. Remember that prior to running mscrfits you need to allocate the tape drive via the command cl> allocate mtm , where you substitute your correct device name for mtm. After reading in your data you should deallocate mtm.
PACKAGE = mscred
   TASK = mscrfits

input   =                  mtm  Input tape
output  =                 image Output file(s)
(tapefil=                 1-84) Tape file list
(listonl=                   no) List only?
(shortli=                  yes) Short listing?
(longlis=                   no) Long listing?
(offset =                    0) Offset for numbering of output disk filenames
(origina=                  yes) Restore original file name?
(mode   =                   ql)

If you used the unix tar command to write your tape, you will be restoring the data with a command like tar -xvf /dev/rmt/??? , where ??? will be the device name. To restore only selected files from a tar file,


setenv TAPE /dev/rmt/???
tar -xv -I file.list

Where file.list is the name of an asci file listing the names of the files you would like to extract from the tar file.

NDWFS: Tape Drive names.

Occasionally a data set may have incomplete/incorrect image headers due to either problems with the TCS (telescope control system) while the observations were made or incomplete databases being accessed at the time the headers were populated (for example, incomplete information on the world coordinate system for each of the CCDs). Possible problems include missing "gain'' and "rdnoise'' keywords and/or missing WCS information. I will explain how to attempt to fix such problems as part of my discussion of the general data reduction procedures, but the IRAF tasks msccmd and hedit can be used to update header parameters, and mscsetwcs can be used to update/correct the WCS information in the headers.

Examining Your Images:

Once your data has been loaded on to your computer's harddisk it is a good idea to verify that the files are intact/complete. Tasks that can help you examine your data include ccdlist, mscdisplay, and mscexamine. The task ccdlist provides you with a listing of some basic header information for your images as well as a coded summary of the current reduction status of your images. Typing at the cl> prompt help ccdlist will provide you more information about this task. Here is an example of the parameter file. Note you must specify im1 (or some other extension) or it will generate a status report for all eight CCDs in each image, which is often more information than you really want.


PACKAGE = mscred
TASK = ccdlist

images  =        @object.list   CCD images to listed
(ccdtype=                     ) CCD image type to be listed
(extname=                  im1) Extension name pattern
(names  =                   no) List image names only?
(long   =                   no) Long format listing?
(mode   =                   ql)

The task mscdisplay allows you to display a MEF file to your image display window. Mscexamine works in a manner very similar to the older task imexamine, but is able to handle the MEF format files.

You will be using an image display window a LOT. I use ximtool-alt, and start it with the command:

csh% ximtool-alt -unix_only &
The -unix_only tag ensures that other tasks/users do not send their images to my display.

Calibration Data:

This section of the guide will be completed as soon as I can, but for now here is a brief list of the kinds of calibration files you will need. Obtained during your run: bias frames (zero???.fits files), dark frames (dark???.fits, for most applications not needed with current instruments), dome flats (dflat???.fits) for each filter used, and twilight flats (sflat???.fits; there is not a consensus view on whether twilight flats, dome-flats, dark-sky flats, or a combination of the above work best; it is most certainly a function of the science you are trying to do as well as the wavelength(s) at which you are observing and I will try to address this topic at greater length in the near future). You might also obtain observations of an astrometric standard field as well as photometric standards. While you can determine the following information from your own data, NOAO does provide some basic information about the MOSAIC camera CCD's via header keywords and reference files. A new webpage is in preparation to list all of this information and a link will be added here when it is ready. Included will be information on the cross-talk correction files and default bad-pixel masks.

Now that the computer, software, raw data, and basic calibration files are all ready, lets review the steps that we will go through to generate calibrated images. Please move on to section III. Reducing Your Data.