Cookbook for Lick/KAST Reductions


BACK

This page describes the types of calibrations recommended (or required) to use the Low-Redux pipeline to reduce data acquired with the longslit Kast spectrometer.

Calibrations:

AFTERNOON: The following table summarizes the recommended calibration exposures for the grisms+gratings supported within the Low-Redux pipeline.

Blue Side Calibrations
Type Lamps Slit Exp NExp Notes
Arc All 46000 20s 2 IMPORTANT: One should wait ~5min for Cd lamps to warm up.
DomeFlat Blue 46000 50s 5 Avoid saturation


Red Side Calibrations
Type Lamps Slit Exp NExp Notes
Arc Ne,He,Hg 46000 30s 2 The Red chip QE fluctuates A LOT. Modify your exposure times accordingly.
DomeFlat Red 46000 5s 5 The Red chip QE fluctuates A LOT. Modify your exposure times accordingly.


TWILIGHT+NIGHTTIME: In addition to these calibrations, if one wishes to flux the spectra it is necessary to observe a spectrophotometric standard with the same instrument configuration. Furthremore, it is best if one chooses from the CALSPEC list of standards which can be found here: $XIDL_DIR/Spec/Longslit/calib/standards/calspec
Organizing the Data

The first steps are to organize your data, create a plan file, and edit it as necessary.
Reduce!

All of the reduction steps are run by the code long_reduce :: This routine
    Example: IDL> long_reduce, 'plan.par'

  1. Stacks and process the flats
  2. Identifies the edges of the longslit
  3. Calibrates the various arc images
  4. Processes the science frame (flattens)
  5. Finds/traces objcets within the slit
  6. Extracts using a non-parameteric optimal extraction algorithm
The pipeline outputs the following calibration files:

Reduction Products
Name Description
pixflat-xxx FITS file generated from the domeflats which corrects for pixel-to-pixel variations in the CCD.
profile-xxx Binary FITS table containing the object profile used for optimal extraction. In particular, the tag .profile contains an image of the profile.
slits-xxx Binary FITS table containing the parameters which describe the slit edges.
wave-xxx.fits FITS image of the wavelength array created by the code.
wave-xxx.ps Postscript file showing the results from the 1D arc solution.



Primary Science Product

The primary science products are written a multi-extension FITS file in the Science/ directory. One file is written per exposure. This table describes the various extensions:

Science Products
Extension Description
0 Processed 2D image of the data.
1 Inverse variance
2 Sky model
3 Model of the object flux
4 Mask of good/bad pixels
5 Structure array (one per object identified in the slit). The key tags are: wave_opt, flux_opt, ivar_opt, wave_box, flux_box, ivar_box.


One can examine the 1 and 2D spectra extracted from each data frame using the following steps:
  • cd Science
  • UNIX> idl
  • IDL> .run long_look
    This will launch a GUI list of all the sci-*.fits.gz files in the current directory.
  • Choose the sci-* file that you want from the GUI list
    This will launch a view of the 2D image (using the IDL task atv). After completing the step described below, you can use this Image display GUI to examine the 2D spectrum. A postscript file summarizing the S/N of the various extracted spectra is shown and also a GUI list of the objects in the frame indexed slit-object (e.g. 1-2 for slit 1 and object #2 in the slit).
  • Choose an object from the GUI list
    This will launch an x_specplot GUI that the user can use to examine the 1D spectrum. At this point the xatv window will now be active.
  • Play with the two GUI's.

Coadd

As you will note, the multi-extension FITS file that contains the spectra are not especially easy to handle. Furthermore, it is common that a user will wish to coadd multiple exposures of a given object. This is accomplished with the task long_coadd :: This routine takes as input a list of sci- files, chooses a wavelength array for registration, and coadds weighting by the square of the median S/N ratio (or exposure time).

    Call: IDL> long_coadd, files, objid, OUTFIL=name
    Example: IDL> long_coadd, ['sci-b263.ccd.gz', 'sci-b265.ccd.gz'], 1, OUTFIL='FSpec/J0905+1014_b.fits'

In the above example, we have set objid=1 to indicate that we wish to coadd the first object identified in the slit. The output file (e.g. FSpec/J0905+1014_b.fits) is a multi-extension FITS array containing three extension: 0=flux array; 1=sigma array; 2=wavelength array.

One can inspect the data using the XIDL routine x_specplot.
    Example: IDL> x_specplot, filename, inflg=2
Flux

Fluxing is relatively straightforward. One includes a calibration standard in the plan.par file and the code will reduce the data in a similar fashion as the science exposures. One does NOT apply the COADD algorithm, but skips to this task long_sensfunc :: This algorithm requires that one use one of the standards included in the Longslit package (contact JH or JXP to add a new file). These files are found here: $XIDL_DIR/Spec/Longslit/calib/standards/calspec.

    Call: IDL> sens = long_sensfunc( sci_file, calib_name, sens_file)
    Example: IDL> bsens = long_sensfunc('Science/sci-b257.ccd.fits', 'feige34_005', 'Flux/feige34_bsens.fits')

With a sensitivity function in hand, the final step is to apply it to the science spectra. This is accomplished with long_fluxcal :: This code simply notes the exposure time and applies the sensitivity function. It also corrects for differences in the airmass of the two exposures assuming an extinction function appropriate for KPNO.

    Call: IDL> long_fluxcal, data_file, sens_file, OUTFIL=fluxed_data
    Example: IDL> long_fluxcal, 'FSpec/J0905+1014_xb.fits', 'Flux/feige34_bsens.fits', OUTFIL='FSpec/J0905+1014b_XF.fits'

One can inspect the data using the XIDL routine x_specplot.
    Example: IDL> x_specplot, filename, inflg=2



Last modified 2007-5-11