subroutine getPsfImagePixelCorners(psfThetaArcsec, psfPhi, psfPixelSizeMm& , psfImage, wcs, wcsType, instrumentId, timeStamp, scAttitude& , psfImagePixelCorners, psfCentrePixels) real(double), intent(in) :: psfThetaArcsec, psfPhi type(PsfBinSizeT), intent(in) :: psfPixelSizeMm real(single), intent(in) :: psfImage(:,:) type(WcsT), intent(in) :: wcs character(*), intent(in) :: wcsType integer(int32), intent(in) :: instrumentId real(double), intent(in) :: timeStamp type(SpacecraftAttitudeType), intent(in) :: scAttitude type(Point2dT), intent(out) :: psfImagePixelCorners(& size(psfImage,1)+1& ,size(psfImage,2)+1) type(Point2dT), intent(out) :: psfCentrePixels end subroutine getPsfImagePixelCorners
This subroutine takes an image of the Point Spread Function (PSF) returned by the cal call CAL_getPsfImage for a given instrument and returns an array of and coordinates, in the sky image coordinate system defined by the wcs structure , of the intersections of the pixel edge grid of this image. This grid intersections array is necessary as input to the routine regrid (see section ), the purpose of which is to rebin the PSF image to sky coordinates.
NOTE this subroutine requires the cal to have been set to the correct instrument before the call.