=============================================================================== Mike Schuster mschuster@cfa.harvard.edu 22 May 2007 Updated: 8 April 2008 processing with IRACproc v4.2 software package =============================================================================== BKGFIX_NOTES2 Large IRAC Mosaics (and most ch3 mosaics of any size) Most, and possibly all, large IRAC mosaics suffer from significant, artificial background gradients, affecting the measured fluxes and colors for extended emission in all bands. This effect most likely arises from small zodiacal background gradients over the IRAC array, imperfect flat-fields, and geometrical distortion corrections. Although automated background matching is performed as part of the IRACproc processing, it only corrects for constant pedestal offsets for each frame. As a result, small gradients build up over large mosaics manifesting as a position dependent zero-point. To remove the background gradients a surface can be subtracted for each mosaic. The surfaces can be constructed by trend-fitting the pedestal offsets for each frame, as output by the MOPEX overlap correction module, or from direct measurement of the IRACproc mosaic. The background surface should not add or subtract any net flux from the mosaic. These notes describe one method for finding and removing the gradients. =============================================================================== GLIMPSE data Mosaic is 252x2 total frames (2 AORs) Final IRACproc mosiac pixel scale: 1.22/sqrt(2) "/pix, ~362x362 pix per frame chs 1 + 3 overlap, chs 2 + 4 overlap 63 frames in y direction, with 192 pixel overlap between sucessive frames and ~22 pixel overlap between any 3 consecutive frames 4 frames/AOR in x direction, with ~22 pixel overlap Overlap is ~24 pixels between AORs The 1st AOR is the left side of the mosaic, the 2nd AOR is the right Each AOR strip begins at the upper left of its side of the mosaic progresses downward, and at the end of each column shifts left to begin the next column in the opposite direction =============================================================================== Gradients are measured from trends in MOPEX overlap correction offsets (MJy/sr) See overlap_I/Overlap_Corr/offsets.tbl for offsets See IRACproc/docs/I2_overlap_<>.pdf for ch2 example plots = offsets vs. frame no. = col. median of the row median subtracted row offsets vs. row no. = row median subtracted row offsets vs. row no. = row fit subtracted col. offsets vs. col. no. Solid = AOR 1 Dashed = AOR 2 Color = actual offsets Black = fit to offset trend Horizontal: fit residuals In this example the offsets for each channel (band) summed to zero, adding no net flux to the mosaic. Likewise, the fits applied also add no net flux. In addition, a linear fit was sufficient to remove the artificial gradient. Bkg fit is measured from array centers Expand fit to mosaic edges y gradient is measured as Y MJy/sr over 63 points (one point per frame) Each strip is 63 points long, covering 62 units (1 unit ~ 1 frame) Tiled frames cover ~64.13 units per strip (62+2+(22/170)), or pixels Full mosaic covers pixels Total y gradient is Y*(64.13/62)*(/) = Yt MJy/sr/mosaic x gradient is measured as X MJy/sr over 4 points (one point per frame) Each strip is 4 points wide, covering 3 units (1 unit ~ 1 frame) 3 units covers ~1020 pixels ((362-22)*3) Tiled frames cover ~1382 pixels per strip (4*362 - 3*22) Full mosaic covers ~2740 pixels (2*1382 - 24) Total x gradient is X*(/) = X*(2740/1020) = Xt MJy/sr/mosaic =============================================================================== #### ch1 bkg gradient y gradient is 3.9 MJy/sr over 63 points, 62 units Tiled frames cover 10887 pixels, full mosaic covers 11645 pixels Total y gradient is 3.9*(64.13/62)*(11645/10887) = 4.3148 MJy/sr/mosaic x gradient is 0.0 MJy/sr over 4 points, 3 units 3 units covers 1020 pixels ((362-22)*3) Full mosaic covers 2740 pixels Total y gradient is 0.0*(2740/1020) = 0.0 MJy/sr/mosaic perldl> $x = xvals(float,2740,11645)/2739 perldl> $y = yvals(float,2740,11645)/11644 perldl> $bkgima = zeroes(float,3240,11683) perldl> $bkgima(12:2751,25:11669) .= 0.0*$x(:,:) + 4.3148*$y(:,:) - 2.1574 # clear up memory perldl> $x = 0; $y = 0 perldl> $bkgima->wfits('I1_IRACproc_MFIF_bkgplane.fits',-32) perldl> $ima = rfits('I1_IRACproc_MFIF_mosaic.fits') perldl> $hdr = $ima->gethdr() perldl> $newima = $ima - $bkgima # clear up memory perldl> $ima = 0 perldl> $bkgima = 0 # write new image perldl> $newima->sethdr($hdr) perldl> $newima->wfits('I1_IRACproc_MFIF_pedfix_mosaic.fits',-32) # clear up memory perldl> $newima = 0 perldl> $hdr = 0 #### ch2 bkg gradient y gradient is 4.8 MJy/sr over 63 points, 62 units Tiled frames cover 10885 pixels, full mosaic covers 11644 pixels Total y gradient is 4.8*(64.13/62)*(11644/10885) = 5.3111 MJy/sr/mosaic x gradient is 0.11 MJy/sr over 4 points, 3 units 3 units covers 1020 pixels ((362-22)*3) Full mosaic covers 2739 pixels Total x gradient is 0.11*(2739/1020) = 0.2954 MJy/sr/mosaic perldl> $x = xvals(float,2739,11644)/2738 perldl> $y = yvals(float,2739,11644)/11643 perldl> $bkgima = zeroes(float,3240,11683) perldl> $bkgima(485:3223,14:11657) .= 0.2954*$x(:,:) + 5.3111*$y(:,:) - 2.80325 # clear up memory perldl> $x = 0; $y = 0 perldl> $bkgima->wfits('I2_IRACproc_MFIF_bkgplane.fits',-32) perldl> $ima = rfits('I2_IRACproc_MFIF_mosaic.fits') perldl> $hdr = $ima->gethdr() perldl> $newima = $ima - $bkgima # clear up memory perldl> $ima = 0 perldl> $bkgima = 0 # write new image perldl> $newima->sethdr($hdr) perldl> $newima->wfits('I2_IRACproc_MFIF_pedfix_mosaic.fits',-32) # clear up memory perldl> $newima = 0 perldl> $hdr = 0 #### ch3 bkg gradient y gradient is 0.0 MJy/sr over 63 points, 62 units Tiled frames cover 10887 pixels, full mosaic covers 11646 pixels Total y gradient is 0.0*(64.13/62)*(11646/10887) = 0.0 MJy/sr/mosaic x gradient is -2.4 MJy/sr over 4 points, 3 units 3 units covers 1020 pixels ((362-22)*3) Full mosaic covers 2743 pixels Bkg is cusped in middle (~25 pixels on average, from coverage map) Negative slope for left side (1359 pixels) Postive slope for right side (1359 pixels) Total x gradient is -/+2.4*(1359/1020) = -/+3.1976 MJy/sr/side perldl> $x = xvals(float,1359,11646)/1358 perldl> $y = yvals(float,1359,11646)/11645 perldl> $bkgima = zeroes(float,3240,11683) perldl> $bkgima(20:1378,24:11669) .= -3.1976*$x(:,:) + 0.0*$y(:,:) + 1.5988 perldl> $bkgima(1379:1403,24:11669) .= -1.5988 perldl> $bkgima(1404:2762,24:11669) .= 3.1976*$x(:,:) + 0.0*$y(:,:) - 1.5988 # clear up memory perldl> $x = 0; $y = 0 perldl> $bkgima->wfits('I3_IRACproc_MFIF_bkgplane.fits',-32) perldl> $ima = rfits('I3_IRACproc_MFIF_bkgfix_mosaic.fits') perldl> $hdr = $ima->gethdr() perldl> $newima = $ima - $bkgima # clear up memory perldl> $ima = 0 perldl> $bkgima = 0 # write new image perldl> $newima->sethdr($hdr) perldl> $newima->wfits('I3_IRACproc_MFIF_pedfix_mosaic.fits',-32) # clear up memory perldl> $newima = 0 perldl> $hdr = 0 # note: see BKGFIX_NOTES for description on I3_IRACproc_MFIF_bkgfix_mosaic.fits # note: the negative valued center strip has caused the fitted surface to have a net negative flux, and adds a very small pedestal to the final mosaic after subtracting the background surface. #### ch4 bkg gradient y gradient is 5.9 MJy/sr over 63 points, 62 units Tiled frames cover 10886 pixels, full mosaic covers 11644 pixels Total y gradient is 5.9*(64.13/62)*(11644/10886) = 6.5276 MJy/sr/mosaic x gradient is 5.7 MJy/sr over 4 points, 3 units 3 units covers 1020 pixels ((362-22)*3) Full mosaic covers 2743 pixels Total x gradient is 5.7*(2743/1020) = 15.3285 MJy/sr/mosaic perldl> $x = xvals(float,2743,11644)/2742 perldl> $y = yvals(float,2743,11644)/11643 perldl> $bkgima = zeroes(float,3240,11683) perldl> $bkgima(487:3229,16:11659) .= 15.3285*$x(:,:) + 6.5276*$y(:,:) - 10.92805 # clear up memory perldl> $x = 0; $y = 0 perldl> $bkgima->wfits('I4_IRACproc_MFIF_bkgplane.fits',-32) perldl> $ima = rfits('I4_IRACproc_MFIF_mosaic.fits') perldl> $hdr = $ima->gethdr() perldl> $newima = $ima - $bkgima # clear up memory perldl> $ima = 0 perldl> $bkgima = 0 # write new image perldl> $newima->sethdr($hdr) perldl> $newima->wfits('I4_IRACproc_MFIF_pedfix_mosaic.fits',-32) # clear up memory perldl> $newima = 0 perldl> $hdr = 0