|
Cookbook: Making an IRAC mosaic using SINGS Legacy observations of the nearby galaxy NGC1097 |
|||||||||||||||||||||||
|
This example demonstrates how to use MOPEX to create mosaics of a
large field of view around the SINGS galaxy NGC 1097 in IRAC channels
1 through 4. We pay special attention to choosing the appropriate
parameters in the MOPEX namelist files, and discuss the effect of
various choices of several of these parameters. For channels 3 and 4,
we show how to run the overlap correction script before
mosaicking. The final products include the mosaic image, the mosaic
uncertainty image, and the mosaic coverage map.Requirements:You must have both LEOPARD and MOPEX installed in order to follow along with this cookbook.LEOPARD can be downloaded here. MOPEX can be downloaded here You will need to use these namelists:
Outline:I. Downloading the example data set:[forward to "II. Perform Overlap Corrections"][forward to "III. Make the Mosaic"] Download all the relevant data (see example). You should be sure to download two AORs, reqkeys 5515776 and 5516032. You should download the BCD data and the calibration data for channels 1 through 4. Put all the data into directories of your choice -- you can choose to rearrange the directories that LEOPARD sets up for you, for example, by combining all of the BCD data from two AORs into one directory. You need the input BCD files, listed in a file (here called "image_stack_all.txt", one file per line). Only files with odd expids, (e.g., only the 30 sec frames in the HDR observations), should be included. Here is a nifty unix trick to just get the odd- or even-numbered files in a file, one file per line (assuming you are currently in the directory with all the BCDs):
You also need a similar list of the corresponding uncertainty files (*bunc.fits files) and imask files (*bimsk.fits files). You can also simply do "ls *bcd.fits > filelist.fits" and edit out the short exposures, (e.g., keep SPITZER_i1_5515776_0001_0000_1_bcd.fits but delete SPITZER_I1_5515776_0000_0000_4_bcd.fits, keep SPITZER_I1_5515776_0003_0000_4_bcd.fits but delete SPITZER_I1_5515776_0002_0000_4_bcd.fits etc.) Same for the uncertainty and imask files. Don't forget to also download the IRAC Pmask files.
II. Perform Overlap Correction:[back to "I. Downloading the example data set"][forward to "III. Make the Mosaic"] Specifically for channels 3 and 4, it is strongly recommended that you run the frames through an overlap correction module before proceeding with mosaicking.
The links to namelists to be used (remember to change the paths to input and output files to correspond to your directories) are given above in the "Requirements" section. Make sure that you have specified the input BCDs in the file pointed to by the IMAGE_STACK_FILE_NAME parameter in the namelist file (including their path on your disk), and similarly the SIGMALIST_FILE_NAME and DCE_STATUS_MASK_LIST should point to files that give the full path and filenames to your uncertainty and imask images, respectively (one path/filename per line). For overlap.pl, you also need to give the OVERLAP_CORR_DIR name in the namelist file. This is the name of the directory, under your specified OUTPUT_DIR, where the final, overlap-corrected BCDs will be written to. Pay attention to specifying the parameters for the overlap correction: &COMPUTEOVRLAPCORRIN TOP_THRESHOLD = 3, BOTTOM_THRESHOLD = 3, MIN_IMG_NUM = 4, &END These parameters are used in the outlier rejection to set the upper and lower limits (multiples of sigmas), and the minimum number of images needed to perform the overlap correction. Also remember to set COMPUTE_OVERLAP_CORRECTION = 1 and APPLY_OVERLAP_CORRECTION = 1 in the namelist file. Finally there is a parameter MASK_BRIGHT. You can set this to 1 to use masks created by the ``detect'' module. In this example, the central parts of the galaxy are very bright, and adjusting the parameters to detect less bright objects only did not help to avoid the masking of the brightest galaxy parts, and therefore the MASK_BRIGHT parameter is set to 0. You can experiment by running the overlap correction module with MASK_BRIGHT set to 1. In addition, the first frame of an AOR often has a bias offset which is very different from the rest of the frames in the AOR. In this example, we leave the first frames (EXPID=1) in channel 3 out from both AORs in generating our overlap-corrected frames and mosaics. Most of the rest of the parameters specified in the namelist of the overlap correction module are discussed below in the context of generating the mosaics. Remember that your IMAGE_STACK_FILE_NAME when making the mosaics for channels 3 & 4 below must point to a file that specifies the overlap-corrected filenames (and their path on your disk; filenames starting with ``correct_spitzer''), not the BCDs (for channels 1 & 2 it is ok to use the BCDs as input files). Also note that the option MOSAIC_CORRECCTED_IMAGES will only give a quick and dirty mosaic to see whether the overlap correction worked ok. A thorough mosaicking with the mosaic.pl script, as described below, is necessary to produce a high quality mosaic. III. Make the mosaic:[back to "I. Downloading the example data set"][back to "II. Perform Overlap Correcctions"] In general, it is a good idea to run your data through the IRAC artifact mitigation software before mosaicking. Your input would then be the overlap and artifact corrected BCDs (over_cor_sfx*bcd.fits), updated uncertainty images (cor_sfx*bunc.fits), and the original imask files. However, in this example we will mosaic the pipeline-produced BCDs, which in this case are relatively artifact-free. Generate the fiducial frame. Subtract the background in the input images. Interpolate the output pixels based on input pixel values. Outlier rejection Create rmask file Add the following to your namelist file:Reinterpolation and coaddingrun_mosaic_covg = 1 run_mosaic_rmask = 1 &MOSAICRMASKIN BOTTOM_THRESHOLD = 3, TOP_THRESHOLD = 3, MIN_COVERAGE = 4, MAX_COVERAGE = 100, RM_THRESH = 0.5, REFINE_OUTLIER = 1, REFINE_OUTLIER_THRESH = 10 &ENDBoth dual and multiframe outlier are run between MIN_COVERAGE to MAX_COVERAGE. Below MIN_COVERAGE only dual outlier detection is run. RM_THRESH needs to be changed if mosaic has a different pixel size from the BCDs. BOTTOM and TOP thresholds allow the projection of outlier pixels only if they are a certain number of sigmas above or below mean. The refinement allows pixels inside real point sources not to be marked as outliers unless their deviation is very high. Add the following to your namelist file:run_mosaic_reinterp = 1 run_mosaic_coadder = 1 run_mosaic_combiner = 1Note that for most accurate photometry you should not use the uncertainty images as weights when performing the coaddition (otherwise the point sources in the resulting mosaic are likely to have flux values that are too low, due to the weigthing by the inverse squared of the sigma values which themselves are essentially the square root of the pixel flux in most cases, following Poisson statistics). So setsigma_weighted_coadd = 0 |
help@spitzer.caltech.edu