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


ssclib (ssclib-4.36.1) [xmmsas_20230412_1735-21.0.0]

Dumping images to FITS array

It is sometimes convenient to dump a 2-D array to a FITS dataset, without worrying about attributes or data type. The various overloadings of dumpImageToFits allow one to write an array of any numeric data type supported by the dal.

  interface dumpImageToFits
    subroutine dumpImageToFitsSingle(image, setName)
      real(single), intent(in) :: image(:,:)
      character(*), intent(in) :: setName
    end subroutine dumpImageToFitsSingle

    subroutine dumpImageToFitsDouble(image, setName)
      real(double), intent(in) :: image(:,:)
      character(*), intent(in) :: setName
    end subroutine dumpImageToFitsDouble

    subroutine dumpImageToFitsInt8(image, setName)
      integer(int8), intent(in) :: image(:,:)
      character(*), intent(in) :: setName
    end subroutine dumpImageToFitsInt8

    subroutine dumpImageToFitsInt16(image, setName)
      integer(int16), intent(in) :: image(:,:)
      character(*), intent(in) :: setName
    end subroutine dumpImageToFitsInt16

    subroutine dumpImageToFitsInt32(image, setName)
      integer(int32), intent(in) :: image(:,:)
      character(*), intent(in) :: setName
    end subroutine dumpImageToFitsInt32

The output data type for the last is actually 8-bit integer:

    subroutine dumpImageToFitsBool_temp(image, setName)
      logical(bool), intent(in) :: image(:,:)
      character(*), intent(in) :: setName
    end subroutine dumpImageToFitsBool_temp
  end interface dumpImageToFits



XMM-Newton SOC -- 2023-04-16