WATCH OUT! THESE NOTES WERE MADE BEFORE LRIS-B WENT ONLINE! (ed. 2001 Oct.) Reducing Spectrum for HDF 4-439.0 1. Make .fits files. File "list" contains: lris0167 (data frame 1) lris0168 (data frame 2) lris0169 (internal flat) lris0170 (internal flat) lris0171 (internal flat) lris0172 (internal flat) lris0173 (HgNeAKr lamp) 2. Bias-correct/Trim (noao.imred.bias.colbias) PACKAGE = bias TASK = colbias input = @list Input images output = @list//.b Output images (bias = [2070:2148,*]) Bias section (trim = [20:2069,70:898]) Trim section (median = no) Use median instead of average in column bias? (interac= no) Interactive? (functio= spline3) Fitting function (order = 1) Order of fitting function (low_rej= 3.) Low sigma rejection factor (high_re= 3.) High sigma rejection factor (niterat= 1) Number of rejection iterations (logfile= ) Log files (graphic= stdgraph) Graphics output device (cursor = ) Graphics cursor input (mode = ql) 3. Flatten (imcombine and response) File "flatlist" contains: lris0169 lris0170 lris0171 lris0172 a) First combine the flats with imcombine, and create flat.combined.b: PACKAGE = immatch TASK = imcombine input = @flatlist//.b List of images to combine output = flat.combined.b List of output images (plfile = ) List of output pixel list files (optional) (sigma = ) List of sigma images (optional) (logfile= STDOUT) Log file (combine= average) Type of combine operation (reject = pclip) Type of rejection (project= no) Project highest dimension of input images? (outtype= real) Output image pixel datatype (offsets= none) Input image offsets (masktyp= none) Mask type (maskval= 0.) Mask value (blank = 0.) Value if there are no pixels (scale = median) Image scaling (zero = none) Image zero point offset (weight = none) Image weights (statsec= ) Image section for computing statistics (expname= ) Image header exposure time keyword (lthresh= INDEF) Lower threshold (hthresh= INDEF) Upper threshold (nlow = 0) minmax: Number of low pixels to reject (nhigh = 2) minmax: Number of high pixels to reject (nkeep = 1) Minimum to keep (pos) or maximum to reject (neg) (mclip = yes) Use median in sigma clipping algorithms? (lsigma = 3.) Lower sigma clipping factor (hsigma = 3.) Upper sigma clipping factor (rdnoise= 0.) ccdclip: CCD readout noise (electrons) (gain = 1.) ccdclip: CCD gain (electrons/DN) (snoise = 0.) ccdclip: Sensitivity noise (fraction) (sigscal= 0.1) Tolerance for sigma clipping scaling corrections (pclip = -0.682) pclip: Percentile clipping parameter (grow = 0) Radius (pixels) for 1D neighbor rejection (mode = ql) b) Now run response (noao.twodspec.longslit): Note: Dispersion axis is along the lines (option 1). PACKAGE = longslit TASK = response calibrat= flat.combined.b Longslit calibration images normaliz= flat.combined.b Normalization spectrum images response= flat.combined.b_res Response function images (interac= yes) Fit normalization spectrum interactively? (thresho= INDEF) Response threshold (sample = *) Sample of points to use in fit (naverag= 1) Number of points in sample averaging (functio= chebyshev) Fitting function (order = 10) Order of fitting function (low_rej= 3.) Low rejection in sigma of fit (high_re= 3.) High rejection in sigma of fit (niterat= 5) Number of rejection iterations (grow = 1.) Rejection growing radius (graphic= stdgraph) Graphics output device (cursor = ) Graphics cursor input (mode = ql) c) Now divide the image frames by flat.combined.b_res with imarith. File imagelist contains: lris0167 lris0168 PACKAGE = longslit TASK = response calibrat= flat.combined.b Longslit calibration images normaliz= flat.combined.b Normalization spectrum images response= flat.combined.b_res Response function images (interac= yes) Fit normalization spectrum interactively? (thresho= INDEF) Response threshold (sample = *) Sample of points to use in fit (naverag= 1) Number of points in sample averaging (functio= chebyshev) Fitting function (order = 10) Order of fitting function (low_rej= 3.) Low rejection in sigma of fit (high_re= 3.) High rejection in sigma of fit (niterat= 5) Number of rejection iterations (grow = 1.) Rejection growing radius (graphic= stdgraph) Graphics output device (cursor = ) Graphics cursor input (mode = ql) 4. Sky-subtract (background) Use noao.twodspec.longslit. PACKAGE = longslit TASK = background input = @imagelist//f Input images to be background subtracted output = @imagelist//fs Output background subtracted images (axis = 2) Axis along which background is fit and subtracted (interac= no) Set fitting parameters interactively? (sample = *) Sample of points to use in fit (naverag= 1) Number of points in sample averaging (functio= chebyshev) Fitting function (order = 9) Order of fitting function (low_rej= 3.) Low rejection in sigma of fit (high_re= 2.) High rejection in sigma of fit (niterat= 3) Number of rejection iterations (grow = 1.) Rejection growing radius (graphic= stdgraph) Graphics output device (cursor = ) Graphics cursor input (mode = ql) 5. Deal with Cosmic Rays (szap) Notes: a) First szap the unsubracted images, then sky-subtract them. b) szap calls xzap and background, so set these first and save. PACKAGE = user TASK = xzap inlist = Image(s) for cosmic ray cleaning outlist = Output image(s) (zboxsz = 5) Box size for zapping (nsigma = 5.) Number of sky sigma for zapping threshold (nnegsig= 0.) Number of sky sigma for negative zapping (nrings = 0) Number of pixels to flag as buffer around CRs (nobjsig= 2.) Number of sky sigma for object identification (skyfilt= 15) Median filter size for local sky evaluation (skysubs= 1) Block averaging factor before median filtering (ngrowob= 0) Number of pixels to flag as buffer around objects (statsec= ) Image section to use for computing sky sigma (deletem= no) Delete CR mask after execution? (cleanpl= yes) Delete other working .pl masks after execution? (cleanim= yes) Delete working .imh images after execution? (verbose= yes) Verbose output? (checkli= yes) Check min and max pix values before filtering? (zmin = -32768.) Minimum data value for fmedian (zmax = 32767.) Minimum data value for fmedian (inimgli= ) (outimgl= ) (statlis= ) (mode = ql) PACKAGE = user TASK = szap inlist = lris0168f Input spectra for zapping outlist = lris0168fz Zapped output spectra (inter = no) Fit background interactively? (restore= yes) Restore sky to zapped spectrum? (verbose= yes) Verbose output? (inimgli= ) (outimgl= ) (mode = ql) 6. Combine Image Frames a) Find Vertical Shift (noao.twodspec.apex: apall) Run apall interactively. Use n, c, and q to read center and quit. Then, say "no" to everything (we just want the centers for the shift). b) Find Horizontal Shift (implot) Use implot on a frame with sky lines (i.e. implot lris0167fz). Implot the image, then look for some prominant line (6300 is good), then find the center with e e (to zoom) and p p (to fit with Gaussian). c) Fringe subtract (imarith) 1) a.fzs - b.fzs = a.fzss 2) b.fzs - a.fzs = b.fzss d) Combine (imcombine) Make the following combinations: 1) Still has sky (.sky) - combine fz 2) Still has cosmic rays (.cr) - combine fs 3) Still has fringe (.fringe) - combine fzs 4) Fully massaged! - combine fzss PACKAGE = immatch TASK = imcombine input = @imagelist//fzss List of images to combine output = hdf4_439 List of output images (plfile = ) List of output pixel list files (optional) (sigma = ) List of sigma images (optional) (logfile= STDOUT) Log file (combine= average) Type of combine operation (reject = none) Type of rejection (project= no) Project highest dimension of input images? (outtype= real) Output image pixel datatype (offsets= shiftlist) Input image offsets (masktyp= none) Mask type (maskval= 0.) Mask value (blank = 0.) Value if there are no pixels (scale = none) Image scaling (zero = none) Image zero point offset (weight = none) Image weights (statsec= ) Image section for computing statistics (expname= ) Image header exposure time keyword (lthresh= INDEF) Lower threshold (hthresh= INDEF) Upper threshold (nlow = 0) minmax: Number of low pixels to reject (nhigh = 2) minmax: Number of high pixels to reject (nkeep = 1) Minimum to keep (pos) or maximum to reject (neg) (mclip = yes) Use median in sigma clipping algorithms? (lsigma = 3.) Lower sigma clipping factor (hsigma = 3.) Upper sigma clipping factor (rdnoise= 0.) ccdclip: CCD readout noise (electrons) (gain = 1.) ccdclip: CCD gain (electrons/DN) (snoise = 0.) ccdclip: Sensitivity noise (fraction) (sigscal= 0.1) Tolerance for sigma clipping scaling corrections (pclip = -0.682) pclip: Percentile clipping parameter (grow = 0) Radius (pixels) for 1D neighbor rejection (mode = ql) 7. Extraction (noao.twodspec.apex.apall) Find the aperture with apall. Do the "second sky subtraction" in the region surrounding the aperture. PACKAGE = apextract TASK = apall input = hdf4_439 List of input images (output = ) List of output spectra (apertur= ) Apertures (format = multispec) Extracted spectra format (referen= ) List of aperture reference images (profile= ) List of aperture profile images (interac= yes) Run task interactively? (find = yes) Find apertures? (recente= yes) Recenter apertures? (resize = yes) Resize apertures? (edit = yes) Edit apertures? (trace = yes) Trace apertures? (fittrac= yes) Fit the traced points interactively? (extract= yes) Extract spectra? (extras = yes) Extract sky, sigma, etc.? (review = no) Review extractions? (line = 1437) Dispersion line (nsum = 100) Number of dispersion lines to sum or median # DEFAULT APERTURE PARAMETERS (lower = -3.) Lower aperture limit relative to center (upper = 3.) Upper aperture limit relative to center (apidtab= ) Aperture ID table (optional) # DEFAULT BACKGROUND PARAMETERS (b_funct= chebyshev) Background function (b_order= 3) Background function order (b_sampl= -40:-8,8:40) Background sample regions (b_naver= 1) Background average or median (b_niter= 3) Background rejection iterations (b_low_r= 3.) Background lower rejection sigma (b_high_= 3.) Background upper rejection sigma (b_grow = 1.) Background rejection growing radius # APERTURE CENTERING PARAMETERS (width = 10.) Profile centering width (radius = 10.) Profile centering radius (thresho= 0.) Detection threshold for profile centering # AUTOMATIC FINDING AND ORDERING PARAMETERS nfind = 1 Number of apertures to be found automatically (minsep = 5.) Minimum separation between spectra (maxsep = 1000.) Maximum separation between spectra (order = increasing) Order of apertures # RECENTERING PARAMETERS (aprecen= ) Apertures for recentering calculation (npeaks = INDEF) Select brightest peaks (shift = yes) Use average shift instead of recentering? # RESIZING PARAMETERS (llimit = INDEF) Lower aperture limit relative to center (ulimit = INDEF) Upper aperture limit relative to center (ylevel = 0.1) Fraction of peak or intensity for automatic width (peak = yes) Is ylevel a fraction of the peak? (bkg = yes) Subtract background in automatic width? (r_grow = 0.) Grow limits by this factor (avglimi= no) Average limits over all apertures? # TRACING PARAMETERS (t_nsum = 200) Number of dispersion lines to sum (t_step = 50) Tracing step (t_nlost= 5) Number of consecutive times profile is lost before quitting (t_funct= legendre) Trace fitting function (t_order= 3) Trace fitting function order (t_sampl= *) Trace sample regions (t_naver= 1) Trace average or median (t_niter= 2) Trace rejection iterations (t_low_r= 3.) Trace lower rejection sigma (t_high_= 3.) Trace upper rejection sigma (t_grow = 1.) Trace rejection growing radius # EXTRACTION PARAMETERS (backgro= fit) Background to subtract (skybox = 1) Box car smoothing length for sky (weights= none) Extraction weights (none|variance) (pfit = fit1d) Profile fitting type (fit1d|fit2d) (clean = no) Detect and replace bad pixels? (saturat= 64000.) Saturation level (readnoi= 6.5) Read out noise sigma (photons) (gain = 1) Photon gain (photons/data number) (lsigma = 4.) Lower rejection threshold (usigma = 4.) Upper rejection threshold (nsubaps= 1) Number of subapertures per aperture (mode = ql) 8. Wavelength Calibration a) Sky extraction: apall hdf4_439.sky refer=hdf4_439 int- rec- tra- fit- b) Lamp extraction: apall lamp refer=hdf4_439 int- rec- tra- fit- back- c) Epar identify (noao.twodspec.long.identify). Compare to lamp plots, mark and fit until rms is down to, say, 0.13 (?). PACKAGE = longslit TASK = identify images = lamp.ms Images containing features to be identified (section= middle line) Section to apply to two dimensional images (databas= database) Database in which to record feature data (coordli= /latke/dan/iraf/linelist2.dat) User coordinate list (units = ) Coordinate units (nsum = 10) Number of lines/columns/bands to sum in 2D images (match = -3.) Coordinate list matching limit (maxfeat= 50) Maximum number of features for automatic identification (zwidth = 100.) Zoom graph width in user units (ftype = emission) Feature type (fwidth = 4.) Feature width in pixels (cradius= 5.) Centering radius in pixels (thresho= 0.) Feature threshold for centering (minsep = 2.) Minimum pixel separation (functio= chebyshev) Coordinate function (order = 2) Order of coordinate function (sample = *) Coordinate sample regions (niterat= 0) Rejection iterations (low_rej= 3.) Lower rejection sigma (high_re= 3.) Upper rejection sigma (grow = 0.) Rejection growing radius (autowri= no) Automatically write to database (graphic= stdgraph) Graphics output device (cursor = ) Graphics cursor input crval = q Approximate coordinate (at reference pixel) cdelt = q Approximate dispersion (aidpars= ) Automatic identification algorithm parameters (mode = ql) d) Apply to image and sky with: (in noao.onedspec) refspec hdf4_439.ms reference=lamp.ms dispcor hdf4_439.ms hdf4_439.w refspec hdf4_439.sky.ms reference=lamp.ms dispcor hdf4_439.sky.ms hdf4_439.sky.w e) Correct for offset evident hdf4_439.sky.w with lamoffset.f. Splot hdf4_439.sky.w and get centers for the first three lines, then for the second narrow line in the next five groups. lamoffset will return the average shift, which should be consistent from line to line, and (for Keck data), should be good to a few angstroms. f) Apply shift with specshift. (Do both image frame and sky frame.) PACKAGE = longslit TASK = specshift spectra = hdf4_439.w List of spectra shift = 0.38 Shift to add to dispersion coordinates (apertur= ) List of apertures to shift (verbose= yes) Print verbose information? (mode = ql) 9. Flux Calibration (noao.twodspec.longslit.calibrate) PACKAGE = longslit TASK = calibrate input = hdf4_439.w Input spectra to calibrate output = hdf4_439.f Output calibrated spectra (extinct= yes) Apply extinction correction? (flux = yes) Apply flux calibration? (extinct= onedstds$kpnoextinct.dat) Extinction file (observa= keck) Observatory of observation (ignorea= yes) Ignore aperture numbers in flux calibration? (sensiti= sens_98mar_300) Image root name for sensitivity spectra (fnu = yes) Create spectra having units of FNU? (mode = ql)