17.12.2012 Views

IRAC Instrument Handbook - IRSA - California Institute of Technology

IRAC Instrument Handbook - IRSA - California Institute of Technology

IRAC Instrument Handbook - IRSA - California Institute of Technology

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Point Source Fitting <strong>IRAC</strong> Images<br />

with a PRF<br />

166<br />

<strong>IRAC</strong> <strong>Instrument</strong> <strong>Handbook</strong><br />

algorithms to find centroids in the (C)BCDs as you do to centroid the PRF. Note also that some <strong>of</strong> the<br />

IDL centroiding functions perform poorly with the very undersampled <strong>IRAC</strong> data at 3.6 and 4.5 microns).<br />

ii) Shift the PRF array (in the example above a shift by 27, -35 resampled pixels would move the desired<br />

PRF to the center <strong>of</strong> the array).<br />

iii) Extract the point source realization by sampling the PRF at intervals corresponding to native pixel<br />

increments (every 100 oversampled pixels in this example), making sure to pick up the center <strong>of</strong> the<br />

central pixe l.<br />

In IDL the commands would be:<br />

i) Use rebin on the 128 2 , 5x oversampled PRF to produce the magnified PRF:<br />

magPRF = rebin(PRF,2560,2560).<br />

ii) Re-center the PRF. We find that calculating the first moments is usually a robust way to find the<br />

centroids. Set xmin, xmax and ymin and ymax to approximately the same values in native pixels as you<br />

use to estimate the centroids in your data:<br />

xx = float(lindgen(2560,2560) mod 2560)<br />

yy = float(lindgen(2560,2560)/2560)<br />

xcen =<br />

total(xx[xmin:xmax,ymin:ymax]*magPRF[xmin:xmax,ymin:ymax])/total(magPRF[xmin:xmax,ymin:ym<br />

ax])<br />

ycen =<br />

total(yy[xmin:xmax,ymin:ymax]*magPRF[xmin:xmax,ymin:ymax])/total(magPRF[xmin:xmax,ymin:ym<br />

ax])<br />

xcensh = nx/2 - round(xcen)<br />

ycensh = ny/2 - round(ycen)<br />

cenPRF = shift(magPRF,xcensh,ycensh)<br />

ii) Shift the re-centered PRF to the center <strong>of</strong> the central PRF pixel and trim to an integer multiple <strong>of</strong> the<br />

100x oversampling factor such that the central pixel (1280,1280) is moved to (1200,1200), the center <strong>of</strong><br />

the trimmed array:<br />

shiftedPRF = shift(cenPRF,27,-35)<br />

phasedPRF = fltarr(2500,2500)<br />

trimmedPRF = shiftedPRF[80:2559,80:2559]<br />

phasedPRF[0:2479,0:2479] = trimmedPRF<br />

iii) Sample the trimmed PRF to produce the point source realization:<br />

PSR = rebin(trimmedPRF,25,25,/SAMPLE)<br />

The center <strong>of</strong> the zero phase PSR in this example should be IDL pixel (12,12).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!