XMM-Newton SAS Home Page
XMM-Newton Science Analysis System


ssclib (ssclib-4.36.1) [xmmsas_20230412_1735-21.0.0]

getPsfImagePixelCorners

  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 $x$ and $y$ coordinates, in the sky image coordinate system defined by the wcs structure $wcs$, 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.



XMM-Newton SOC -- 2023-04-16