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


ssclib (ssclib-4.36.1) [xmmsas_20230412_1735-21.0.0]


saveDetImage(): Save DETX/DETY images

Subroutine to save a DETX/DETY image from a given 2-dimensional array.

  interface saveImage
    subroutine saveDetImageDouble(detImage, detImageSetName \&
       , detImageEdgesInfo, templateFitsSetName, wcsExtended, detWcs \&
       , strTelescop, strInstrum)
      real(double), intent(in)           :: detImage(:,:)
      character(*), intent(in)           :: detImageSetName
      type(aryEdgesInfoT), intent(in), optional :: detImageEdgesInfo
      character(*), intent(in), optional :: templateFitsSetName, strTelescop, strInstrum
      type(WcsAxesExtendedT), intent(in), optional :: wcsExtended
      type(WcsT),   intent(in), optional :: detWcs
    end subroutine saveDetImageDouble

    subroutine saveDetImageSingle()
      real(single), intent(in)           :: detImage(:,:)
    end subroutine saveDetImageSingle
    subroutine saveDetImageInt32()
    end subroutine saveDetImageInt32
    subroutine saveDetImageInt16()
    end subroutine saveDetImageInt16
    subroutine saveDetImageInt8()
    end subroutine saveDetImageInt8
  end interface

As for the input array (detImage), all the Real and Integer types are allowed, and that is the only difference in the interface.

detImageSetName is the output FITS filename. clobber is taken into account.

detImageEdgesInfo (optional) is the frame information of the input array. (The type is defined in array_utils). If not given, it is calculated via getDetImageEdgesInfo().

wcsExtended can be given instead of, or in addition to, detImageEdgesInfo in order to directly control the coordinate information in the output header attributes. In that case, make sure
wcsExtended%withPhysical == .true.
if you want to add the PHYSICAL coordinates information in the output file. If both wcsExtended and detWcs are given, the WCS information is overwritten, where possible, according to detWcs at the end. Obviously detWcs can not include any PHYSICAL coordinate information.

If templateFitsSetName is given, all the primary header attributes except for those for DSS and WCS are copied to the output file.

TELESCOP attribute can be directly specified via strTelescop; otherwise, unless templateFitsSetName is given and has the attribute, the default `XMM' is written in the output file.

INSTRUME attribute can be directly specified via strInstrum (string), such as (EMOS1|EMOS1|EPN); in default this routine does nothing about it.



Subsections
XMM-Newton SOC -- 2023-04-16