PRF "How-To" How to make the PRF from the PSF For APEX we use the the language common in the optics field, that the PSF is the point-spread function before sampling by the detector array, and the PRF is the point-response function that lists relative pixel values coming out of the array. Programs such as TinyTim produce PSFs, optionally oversampled. The PRF is essentially the convolution of a box the size of the image pixel with the PSF. Simulations are typically made with an oversampled PSF--this should be used to make the oversampled PRF for APEX. (For Spitzer operations, the SSC will provide PRFs.) An important APEX requirement is that the dimensions of the PRF image (e.g. NAXIS1, NAXIS2) must be odd, centered in the middle of the central pixel. TinyTim typically produces even-dimensioned PSFs. For example, IRAF tasks can be used to make an oversampled PRF from the PSF. These steps will make a PRF from a PSF that is a factor of 8 oversampled: 1. boxcar mypsf8.fits t1prf8.fits 8 8 # does convolution 2. imarith t1prf8.fits * 64 t1prf8.fits 3. # Make sure dimensions are odd # use "imhead" to list dimensions of image; if even # then "imcopy t1prf8.fits[2:,2:] t2prf8.fits" 4. imexamine t2prf8.fits # to find the centroid, # or use your favorite centroiding program 5. # Calculate = (NAXIS1+1)/2 - , # = (NAXIS2+1)/2 - 6. imshift t2prf8.fits myprf8.fits (Steps 4-6 are often necessary because e.g. TinyTim doesn't always produce a centered PSF; also sometimes the boxcar convolution shifts the center a bit). The size of the convolving box should correspond to the image that the fitting should be done on. For APEX in multi-frame mode, the size should be the ratio of BCD pixel to PSF pixel. For APEX on an oversampled mosaic, one can use the ratio of mosaic pixel to PSF pixel (though it can be argued this doesn't perfectly reproduce the interpolation and coaddition process of making the mosaic). How to interpret the oversampled PRF For a PRF oversampled by a factor of N, subsampling every Nth pixel gives the relative intensity for a point source centered at a particular point on the array. For example, assume myprf8.fits is a 65x65 pixel image, with the PRF centered at pixel coordinate (33.0, 33.0). The value of pixel (33,33) is the fraction of light in the central pixel for a point source centered on the middle of a pixel. Value (25,33) is the fraction of light in the detector pixel just to the left of the peak pixel, when the point source is centered on the peak pixel. Likewise, the PRF values at locations (29,29), (37,37), (29,37), and (37,29) will give the fractions of light in the center four detector pixels, when the point source is centered on the corner of the four pixels. Put differently, doing e.g. in IRAF imcopy myprf8.fits[1:65:8,1:65:8] centerprf.fits imcopy myprf8.fits[5:61:8,5:61:8] cornerprf.fits makes PRF images sampled at the detector scale for the "middle of pixel" and "on the corner" cases. For further reading Jay Anderson and Ivan R. King have recently "rediscovered" these concepts -- see their paper (2000 PASP 112, 1360), http://www.journals.uchicago.edu/PASP/journal/issues/v112n776/200156/200156.html They use the term "effective PSF" or "ePSF" for PRF. 2002 July 19 David Shupe updated slightly 2005 Mar 2