interp_epsf
- acstools.focus_diverse_epsfs.interp_epsf(ePSFs, x, y, chip, pixel_space=False, subpixel_x=0, subpixel_y=0)
Function to perform further spatial interpolations given the input ePSF array. It uses bi-linear interpolation for the integer pixel shifts, and bi-cubic interpolation for any specified subpixel phase shifts.
This function allows users to interpolate the provided ePSF arrays to any arbitrary
(x, y)pixel coordinates. It can be called withpixel_space=Trueto downsample the ePSF into detector space.Subpixel phase shifts can be applied by setting
subpixel_xandsubpixel_ybetween 0 and 0.99. Note that a 1 pixel border is removed from the subpixel phase shifted ePSF, such that the final dimensions are 23x23. Results from this subpixel phase shift routine may differ from other algorithmic implementations, typically at the level of <0.5% in the core of the ePSF.Note
This function requires an optional
scipydependency to be installed forpixel_space=True.Note
This function requires users to specify the WFC chip (WFC1 or WFC2).
- Parameters:
- ePSFsnumpy.ndarray
Array with the ePSFs.
- xint
X-coordinate (1-indexed) of the desired output ePSF. Please note that the range here is between 1 and 4096, inclusive. The ePSF grid begins off the detector, at (0,0).
- yint
Y-coordinate (1-indexed) of the desired output ePSF. Please note that the range here is between 1 and 2048, inclusive. The ePSF grid begins off the detector, at (0,0).
- chipstr
String corresponding to which ACS/WFC detector the user is specifying the coordinates on, either “WFC1” or “WFC2”.
- pixel_spacebool
If
True, downsample the ePSF into detector space.- subpixel_x, subpixel_yfloat
The desired subpixel coordinate, between 0 and 0.99.
pixel_spacemust be set toTrueto use this option. The defaults for both x and y are 0, and are relative to the central pixel of the ePSF. By default, ePSFs are centered on the central pixel.
- Returns:
- Pnumpy.ndarray or
None An ePSF array with the specified interpolation parameters, if successful.
- Pnumpy.ndarray or
See also