DOCUMENTATION FOR MIRSI COAD (Version 1-12/03) PURPOSE Procedure in IRTF MIRSI reduction pipeline for reading MIRSI FITS images, coadding them, and saving the results as a FITS file. Some noise artifacts particular to MIRSI are removed. The mean of four observation times is saved in output header as 'MEANTIME'. CALLING SEQUENCE mirsi_coad, infile, outfile, path, ext=ext, help=help INPUTS infile - Name of MIRSI FITS file with four 320x240 images from chop/nod mode saved as extensions 0-3. outfile - Filename where results are saved. path - 2-element string vector with input and output paths OPTIONAL KEYWORD INPUTS: ext - Set for extended objects help - Set to print syntax OUTPUT 320x240x2 image cube is saved to FITS file PDU. First image in cube is (ext0-ext1)-(ext2-ext3). Second image in cube is (ext1-ext0)-(ext3-ext2). Mean of observation times is saved in header under MEANTIME keyword. REDUCTION PROCEDURE 1. Create batch file with following information: infiles = ['file1.fits', 'file2.fits', ...] outfiles = ['output1.fits', 'output2.fits', ...] paths = ['/input_dir/', '/output_dir/'] 2. If reducing extended objects, set ext=1 in batch file, otherwise set ext=0 3. Put calling sequence in batch file: n = # of infiles (should be the same as the # of outfiles) for i = 0, (n-1) do $ mirsi_coad, infiles[i], paths, outfiles[i], ext=ext 4. Execute batch file in IDL REQUIRED SUBROUTINES 1. Astro Users Library 2. CGMEDF.PRO 3. FILEX.PRO 4. GETIM.PRO 5. SDEV.PRO