Welcome to the MIPS 70 Scan Map Data Reduction Recipe.

The information included here is intended to help you reduce MIPS 70 micron scan maps with uniform background and point sources. The discussion is aimed at providing some guidelines on how to extract photometry of unsaturated point sources from the filtered and mosaiced MIPS 70um images. The photometry is measured using the APEX software provided by the Spitzer Science Center. APEX can be used in either a GUI version or in a command line version. The guidelines presented here can be applied to both versions of APEX. We STRONGLY recommend that users always check the intermediate outputs, either images or tables, from APEX to make sure that their input parameters to APEX are appropriate for their specific dataset.


Requirements:


Outline:

  1. PSF versus Aperture Photometry
  2. Determine Background
  3. Determine Noise
  4. Running APEX
  5. APEX Parameters for COSMOS Data


I. PSF versus Aperture Photometry

APEX can provide PSF-fitted photometry as well as aperture photometry (circular apertures). For MIPS 70 micron scan map data, we use APEX in a single frame mode, which measures photometry from a single, mosaiced image. We start with a mosaiced image, mosaic.fits, which has a corresponding coverage map called mosaic_cov.fits and an uncertainty image called mosaic_unc.fits. Because MIPS 70 micron data has a PSF of roughly 16 arcsec (FWHM), PRF fitting does a better job in separating blended sources, and also deals better with noise than aperture photometry when sources are faint. For these reasons, we recommend obtaining PRF fitted photometry if your targeted science data are point sources with moderate to low signal-to-noise.

II. Determine Background

In order to run APEX for PRF fitting of point sources, it is important to use a PRF that is self-consistent with the data on which source extraction will be carried out. In addition to matching pixel scales, the background in the PRF image must match that in the mosaic image. The delivered 70 micron PRF image included in the APEX package was made to be large enough to go to zero (past the first Airy ring) and the background level of the PRF image was tuned to the zero level. Users who wish to use the PRF included in the APEX package must run APEX on a background-subtracted image. There are two ways to make background subtracted images from which PRF fitting photometry can be measured:
  1. Manually subtract background before starting APEX. One can derive the background level by finding the median of the data distribution for source-free pixels within the mosaic and/or by fitting a Gaussian to the central core of the data distribution after clipping off the wings. After background subtraction of the image, APEX aperture results match SExtractor aperture results to within a few percent. For faint sources (<50mJy) at lower S/N (<15), PRF fluxes give much better results (the scatter in repeated measurements is much lower for PRF measurements than for aperture measurments). For very bright sources (>500mJy), aperture results may yield better results since the PRF included in the APEX package (derived from the data in xFLS) was derived for sources with intermediate flux densities. Note for extremely bright sources (>few Jy), flux non-linearites can affect the central core and can corrupt measurements.

  2. Use the APEX module Extract MedFilter. It is possible to use this module to produce reasonable background subtracted image for PRF fitted photometry. The trick is to make sure that the box size is big enough. For MIPS 70 micron mosaic images featuring a pixel size of 4 arcsecond per pixel, one should use a box of 100 pixel by 100 pixel with number of outliers set to 500. This rejects about 5% of bright pixels. This parameter is tuned for the moderate to deep MIPS 70 micron images taken by the COSMOS survey. The total integration time is about 1500 seconds. Boxes smaller than this will produce a background image with bright patches in regions with clusters of sources. This causes over-subtraction of the background for bright sources. This will affect the flux densities of bright sources at a level of a few percent. Obviously for shallower data with a lower surface number density of sources, the median box size could be smaller than was used for the COSMOS data. Users need to experiment with their data to find the right parameters.

III. Determine Noise

The mosaic_unc.fits noise is based on SSC pipeline error propagation using bunc.fits images from the BCD products. The pipeline uncertainties were tuned to be slightly lower than the real noise in low backgrounds for the filtered products. This was done to be used as a lower limit on the noise for outlier rejection. If the input pipeline fbcd/bcd uncertainties are too large then outlier rejection will not be done properly. The pipeline uncertainties may be vastly different from the real noise for bright regions.

The mosaic_std.fits is made when the BCD images are mosaiced together using MOPEX, and is based on the empirical noise in the stacked signals in each sky pixel.

APEX can also estimate noise image from the mosaiced data itself. This is done by using the module called GAUSSNOISE. The noise is estimated from a pixel distribution measured from a sliding box with a user-defined number of pixels rejected as outliers. This noise image represents spatial pixel-to-pixel noise. For shallow data without any bright sources, these noise estimates should be roughly similar. For the COSMOS MIPS 70 micron data, we found that the noise map estimated from GAUSSNOISE slightly over estimates the noise.

APEX needs noise images for determining the detection threshhold, as well as for computing the signal-to-noise ratio for the PRF-fitted photometry. By default, APEX uses the noise estimated from the GAUSSNOISE module to determine sources above the specified detection threshold as well as for computing the SNR of the resulting photometry. The latest version of APEX also offers another option which allows users to choose a different noise image for SNR computation. This parameter is in the APEX single frame setting --- a switch allows one to use SIGMA_FILE (i.e. mosaic_std.fits) to estimate the SNR for the output APEX tables.

For the COSMOS data, we found some small differences between the noise image made by GAUSSNOISE and mosaic_std.fits. We found that mosaic_std.fits gives better estimates of SNR values. In the end, we used the noise image made by GAUSSNOISE for detection, and mosiac_std.fits for extraction.

IV. Running APEX

After sorting out background and noise issues, the next step is to determine the rest of the parameters needed for running APEX in single frame mode. First of all, one needs to choose how to do source detection. In the APEX single frame setting, APEX offers four options for source detection:

  1. use input image without background subtraction;
  2. filtered image;
  3. PSP image;
  4. input image after the background subtraction.
As we described in Step II, if we want to manually subtract the background and use this image for source detection and photometry extraction, then we should choose option (1), and NOT run module Extract Medfilter and Detect Medfilter. This is what has been done for the COSMOS 70 micron data.

For the shallow xFLS data, the filtered image gives good results in detection, particularly for not producing false detections near bright sources. The PSP image smooths data too much. For the COSMOS data where source blending is an issue, we use the input image without background subtraction since the filtered image can smooth out faint sources near a bright source. The down-side of this choice is that some false detections near most bright sources can not be avoided. These false detections can be cleaned up manually.

DETECT

Detection_Max_Area=25 (~number of pixels within the FWHM of the beam, here we assume that the pixel size is 4 arcsec); make small to avoid breaking up individual sources.

Extended_Object_Area=10000; make very large to avoid missing bright nearby sources by mistaking classifying the entire cluster region as an extended object.

Detection_Min_Area = 6 (don't use one to avoid spurious single pixel sources).

Detection_Threshold = 2.5. This threshold depends on the input image type and use_psp parameter. For the filtered and PSP images, one needs a larger threshold parameter than used for the raw image to reach similar source SNRs. We do not recommend digging too deep with APEX; we recommend only going deep enough to reach the desired depth in source SNRs such that number of sources in the raw extraction table is about 1.5--2 times that in the selected extraction table. If you set the threshold too low (APEX will take a long time) and can assign real source flux to nearby spurious noise peaks. If you set the threshold too high, then you can be incomplete at your selected SNR cutoff (e.g., when the raw table has a similar number of sources as your selected table).

Input_Type = "image_input" (have not tested snr_type). We use Threshold_Type = 'peak'. This requires a pixel to be larger than the 8 adjacent pixels before declaring a detection (for Peaks_Radius=1). For close blends, the peaks of the fainter source(s) in the blend(s) may not be found. Also, APEX factors in the coverage map in determining whether a pixel is a peak (in rare cases the peak image pixel is not identified due to local variation of coverage).

POINTSOURCEPROB
PRF_Xsize, PRF_Ysize=11 (~2*FWHM in pixels of the beam); make large enough to yield smooth filter image from central peak inside the first airy ring. If this parameter is too small then sources may have flat-top probability distributions and no peaks may be found and/or the solutions may jump around within the source cores, i.e., need a fairly broad filtering kernel to produce a smooth PSP image.
SOURCEESTIMATE
Fitting_area_x/y~FWHM (5) This is set to perform the fiting over a significant fraction of the area around the peak. If this parameter is set too low, there will not be enough pixels and APEX may derive a position off the real peak.

Max_Number_PS = 1 to fit only one source to each peak.
APEX returns source fluxes in micro-Jy. The conversion between PRF point source flux in micro-Jy (PS[uJy]) and the input surface brightness value in MJy/sr SB[MJy/sr] is PS[uJy] = "Conversion Factor" * "NoisePixels" * SB[MJy/sr], where the conversion factor and noise pixels are given in the APEX table headers. The conversion factor is simply the unit conversion factor from MJy/sr to uJy/pixel. The NoisePixels [NP] is from the normalization of the PRF; the central peak pixel contains 1/NP fraction of the total point-source flux (so fitted peak pixel value * NP number of pixels gives total point-source flux). If your PRF is not made well, your NP value can be in error which can yield bad PRF results.

V. APEX parameters for COSMOS Data

Here we provide the exact parameters that were used for the COSMOS MIPS 70um mosaiced image. This set of parameters has produced a reasonable photometry catalog.
compute_uncertainties_internally = 0
have_uncertainties = 1
run_detect_medfilter = 1
run_gaussnoise = 1
run_pointsourceprob = 0
run_bright_detect = 0
run_detect = 1
run_select_detect = 0
run_extract_medfilter = 0
run_fit_radius = 0
run_sourcestimate = 1
run_aperture = 1
run_select = 1


OUTPUT_DIR = outputdir
INPUT_FILE_NAME = mosaic.fits
SIGMA_FILE_NAME = mosaic_std.fits
COVERAGE_MAP = mosaic_cov.fits
PRF_file_name = mips70_prf_mosaic_4.0_4x.fits

use_refined_pointing = 0
use_data_unc_for_fitted_SNR = 1
use_background_subtracted_image_for_fitting = 0
PMask_Fatal_BitPattern = 0
use_background_subtracted_image_for_aperture = 0

use_psp_to_detect = -1
use_extract_table_for_aperture = 1
RMask_Fatal_BitPattern = 0
DCE_Status_Mask_Fatal_BitPattern = 0

select_conditions = "SNR > 4.0 and deblend ! NO and deblend ! PO and deblend !
AO and deblend ! PAO"
select_columns =
"srcid,detid,RA,delta_RA,Dec,delta_Dec,delta_RAD,x,delta_x,y,delta_y,delta_xy,fl
ux,delta_flux,chi2/dof,ps_chi2/dof,status,SNR,deblend,aperture1,aperture2,apertu
re3,bad_pix1,bad_pix2,bad_pix3,ap_unc1,ap_unc2,ap_unc3"

use_bright_object_mask = 0
PROBABILITY_THRESHOLD = 0.0


&SNESTIMATORIN (THIS MODULE IS TURNED OFF)
&END

&DETECT_MEDFILTER
Window_Y = 100,
N_Outliers_Per_Window = 500,
Window_X = 100,
Max_Bad_Pixels_OutputImage = 1.0,
Min_GoodNeighbors_Number = 4,
Min_Good_Pixels_In_Window = 9,
&END

&GAUSSNOISE
Window_Y = 61,
Max_BadPixels_OutputImage = 1.0,
N_Outliers_Per_Window = 300,
Window_X = 61,
Min_GoodNeighbors_Number = 4,
Min_Good_Pixels_In_Window = 9,
&END

&POINTSOURCEPROB
PRF_ResampleY_Factor = 4,
Apriori_Probability = 0.1,
PRF_Xsize = 11,
PRF_Ysize = 11,
PRF_ResampleX_Factor = 4,
&END

&BRIGHT_DETECT (THIS MODULE IS TURNED OFF)
&END

&DETECT
Detection_Threshold = 2.5,
Input_Type = 'image_input',
Detection_Max_Area = 25,
Min_Coverage = 4.0,
Detection_Min_Area = 6,
Threshold_Type = 'peak',
Extended_Object_Area = 10000,
&END

&EXTRACT_MEDFILTER (THIS MODULE IS TURNED OFF)
&END

&FIT_RADIUS
&END

&SOURCESTIMATE
MinimizeFtolSuccess = 1.0E-4,
PRF_ResampleX_Factor = 4,
Max_Number_PS = 1,
Chi_Threshold = 3.0,
Background_Fit = 0,
Max_N_Iteration = 50000,
Fitting_Area_Y = 5,
InputType = 'image_list',
PRF_ResampleY_Factor = 4,
DitherPixelFraction = 0.1,
Max_N_Success_Iteration = 1000,
Chi2_Improvement = 1.0,
DitherFluxFraction = 0.8,
MinimizeFtol = 1.0E-4,
Fitting_Area_X = 5,
DeblendDitherPixelFraction = 1.0,
N_Edge = 4,
Random_Fit = 0,
&END

&APERTURE
Annulus_Compute_Type = 'median',
N_Apertures = 3,
Use_Annulus = 1,
Aperture_Radius_1 = 8.0,
Aperture_Radius_2 = 10.0,
Aperture_Radius_3 = 12.0,
Min_Number_Pixels = 10,
Inner_Radius = 15.0,
Outer_Radius = 30.0,
&END

&SELECT
&END

#END


Return to the Data Analysis Cookbooks Page



SPITZER HOME || SPITZER SCIENCE || INSTRUMENTS || SCIENCE USER SUPPORT || SEARCH

help@spitzer.caltech.edu

This file was last modified on Fri Aug 29 14:15:34 PDT 2008.

California Institute of Technology Jet Propulsion Laboratory NASA