Memo on creating mosaics of subarray data -- 15 May 2007 This memo is based on a report by Sergio Fajardo-Acosta of the Spitzer Science Center with edits by the IRAC instrument support team. GENERAL INTRODUCTION: Data in IRAC subarray mode are not processed through the online post-BCD pipeline. The post-BCD pipeline was not designed to work with the three-dimensional data cubes that are the subarray BCDs. When the software was developed it was deemed unlikely that subarray observations would be used for anything other than photometry of single bright objects and mosaics would not be a desired product. As a result, post-BCD products (e.g., mosaics and source lists) are not available from the pipeline. In addition, pointing refinement of any type is not performed on subarray data as the number of astrometric truth sources visible in most subarray observations is too low for the refinement to work. Observers can generate their own mosaics and source lists from subarray BCDs using the MOPEX software by first preprocessing the subarray data cubes into two dimensional images. The method is straightforward: For each BCD, collapse each pixel stack to a single representative data value and adjust the header information appropriately to reflect the two-dimensional nature of the resulting images; that is, set NAXIS = 2. Corresponding uncertainty images can be generated by calculating the variance of the pixels used in collapsing each pixel stack. The IRAC IST recommends calculating a filtered mean value (3-sigma clipping is appropriate) for each pixel. The use of a filtered mean results in an radhit-rejected final BCD image, while preserving the enhanced signal-to-noise of the entire cube. A single plane dmask file can be created by OR'ing all the mask values corresponding to the pixel stack used to construct each final pixel. This step is not strictly necessary as the resulting image will be clean of most artifacts. A piece of IRAC contributed software, irac_subcube_collapse, can be used to perform the above steps. This functionality will also be incorporated into a future version of the IRAC pipeline (most likely S17). The 2D versions of the BCDs can now be mosaiced using mosaic.pl. Supply files containing the filenames of the 2D images, uncertainties and optionally, dmasks as you would for normal BCDs. As the collapsed subarray BCDs already have outlier rejection performed, that can be turned off in the mosaicing. To turn off outlier rejection, the following modules should be turned off: run_detect_radhit = 0 run_detect_outlier = 0 run_mosaic_proj = 0 run_mosaic_dual_outlier = 0 run_level = 0 run_mosaic_outlier = 0 run_mosaic_rmask = 0 run_mosaic_reinterp = 0 create_rmask_mosaic = 0 and the following parameters set to zero: USE_OUTLIER_FOR_RMASK = 0 USE_DUAL_OUTLIER_FOR_RMASK = 0 also the pointing-refined keywords will not exist (unless pointing refinement is run by hand) and USE_REFINED_POINTING = 0 At the moment, the *_pmask_flip.fits files should be used for channels 1 and 2. For channels 3 and 4, no pixels have bits set in the subarray pmasks. mosaic_subarray_basic.nl can be used as a template namelist. This namelist is linked to from the http://ssc.spitzer.caltech.edu/irac/imptnotes.html web page.