Testing WCSLIB subimage extraction routine (twcssub.c)
------------------------------------------------------

Initial contents of wcsprm struct:
       flag: 137
      naxis: 4
      crpix: 0x<address>
               1025.0       64.000       1.0000       1.0000    
         pc: 0x<address>
    pc[0][]:   1.1000       0.0000       0.0000       0.0000    
    pc[1][]:   0.0000       1.0000       0.0000       0.0000    
    pc[2][]:   0.0000       0.0000       1.0000       0.10000   
    pc[3][]:   0.0000       0.0000       0.20000      1.0000    
      cdelt: 0x<address>
              -9.2000e-06   10.000       1.0000      -1.0000    
      crval: 0x<address>
               0.21498     -2000.0       135.00       95.000    
      cunit: 0x<address>
             "m"
             "s"
             "deg"
             "deg"
      ctype: 0x<address>
             "WAVE-F2W"
             "TIME"
             "XLAT-TAB"
             "XLON-TAB"
    lonpole: UNDEFINED
    latpole: 90.000000
    restfrq: 0.000000
    restwav: 0.000000
        npv: 6
     npvmax: 64
         pv: 0x<address>
               3   1   1.0000    
               3   2   1.0000    
               3   3   2.0000    
               4   1   1.0000    
               4   2   1.0000    
               4   3   1.0000    
        nps: 6
     npsmax: 8
         ps: 0x<address>
               3   0  WCSTAB
               3   1  COORDS
               3   2  LATIDX
               4   0  WCSTAB
               4   1  COORDS
               4   2  LNGIDX
         cd: 0x<address>
    cd[0][]:   0.0000       0.0000       0.0000       0.0000    
    cd[1][]:   0.0000       0.0000       0.0000       0.0000    
    cd[2][]:   0.0000       0.0000       0.0000       0.0000    
    cd[3][]:   0.0000       0.0000       0.0000       0.0000    
      crota: 0x<address>
               0.0000       0.0000       0.0000       0.0000    
     altlin: 0
     velref: 0
        alt: ' '
     colnum: 0
      colax: 0x<address>
                 0      0      0      0
      cname: 0x<address>
             "Wavelength"
             "Time"
             "Latitude"
             "Longitude"
      crder: 0x<address>
               UNDEFINED    UNDEFINED    UNDEFINED    UNDEFINED
      csyer: 0x<address>
               UNDEFINED    UNDEFINED    UNDEFINED    UNDEFINED
      czphs: 0x<address>
               UNDEFINED    UNDEFINED    UNDEFINED    UNDEFINED
      cperi: 0x<address>
               UNDEFINED    UNDEFINED    UNDEFINED    UNDEFINED
    wcsname: UNDEFINED
    timesys: UNDEFINED
    trefpos: UNDEFINED
    trefdir: UNDEFINED
    plephem: UNDEFINED
   timeunit: UNDEFINED
    dateref: UNDEFINED
     mjdref:      0.000000000     0.000000000
   timeoffs: UNDEFINED
    dateobs: UNDEFINED
    datebeg: UNDEFINED
    dateavg: UNDEFINED
    dateend: UNDEFINED
     mjdobs: UNDEFINED
     mjdbeg: UNDEFINED
     mjdavg: UNDEFINED
     mjdend: UNDEFINED
     jepoch: UNDEFINED
     bepoch: UNDEFINED
     tstart: UNDEFINED
      tstop: UNDEFINED
    xposure: UNDEFINED
    telapse: UNDEFINED
    timsyer: UNDEFINED
    timrder: UNDEFINED
    timedel: UNDEFINED
   timepixr: UNDEFINED
     obsgeo:        UNDEFINED       UNDEFINED       UNDEFINED
                    UNDEFINED       UNDEFINED       UNDEFINED
   obsorbit: UNDEFINED
    radesys: UNDEFINED
    equinox: UNDEFINED
    specsys: UNDEFINED
    ssysobs: UNDEFINED
    velosys: UNDEFINED
    zsource: UNDEFINED
    ssyssrc: UNDEFINED
    velangl: UNDEFINED
        aux: 0x0
       ntab: 1
        tab: 0x<address>  (see below)
       nwtb: 0
        wtb: 0x0
     lngtyp: "XLON"
     lattyp: "XLAT"
        lng: 3
        lat: 2
       spec: 0
       time: 1
   cubeface: -1
     chksum: <CHECKSUM>
      types: 0x<address>
            3300 4000 2501 2500
        lin: (see below)
        cel: (see below)
        spc: (see below)
        err: 0x0
     m_flag: 137
    m_naxis: 4
    m_crpix: 0x<address>  (= crpix)
       m_pc: 0x<address>  (= pc)
    m_cdelt: 0x<address>  (= cdelt)
    m_crval: 0x<address>  (= crval)
    m_cunit: 0x<address>  (= cunit)
    m_ctype: 0x<address>  (= ctype)
       m_pv: 0x<address>  (= pv)
       m_ps: 0x<address>  (= ps)
       m_cd: 0x<address>  (= cd)
    m_crota: 0x<address>  (= crota)

    m_colax: 0x<address>  (= colax)
    m_cname: 0x<address>  (= cname)
    m_crder: 0x<address>  (= crder)
    m_csyer: 0x<address>  (= csyer)
    m_czphs: 0x<address>  (= czphs)
    m_cperi: 0x<address>  (= cperi)
      m_aux: 0x0  (= aux)
      m_tab: 0x0
      m_wtb: 0x0  (= wtb)

tab[0].*
       flag: 137
          M: 2
          K: 0x<address>
                 7     3
        map: 0x<address>
                 3     2
      crval: 0x<address>
               135.00       95.000    
      index: 0x<address>
   index[0]: 0x<address>
               0.0000       1.0000       2.0000       3.0000       4.0000    
               5.0000       6.0000    
   index[1]: 0x<address>
               0.0000       1.0000       2.0000    
      coord: 0x<address>
             (*,1,1)   1.0002      -1.0042    
             (*,2,1)   0.0000      -1.0000    
             (*,3,1)  -1.0002      -1.0042    
             (*,4,1)  -2.0004      -1.0170    
             (*,5,1)  -3.0008      -1.0382    
             (*,6,1)  -4.0015      -1.0679    
             (*,7,1)  -5.0024      -1.1060    
             (*,1,2)   1.0000      -0.0042798 
             (*,2,2)   0.0000       0.0000    
             (*,3,2)  -1.0000      -0.0042798 
             (*,4,2)  -2.0001      -0.017118  
             (*,5,2)  -3.0003      -0.038512  
             (*,6,2)  -4.0008      -0.068457  
             (*,7,2)  -5.0015      -0.10695   
             (*,1,3)   1.0002       0.99568   
             (*,2,3)   0.0000       1.0000    
             (*,3,3)  -1.0002       0.99568   
             (*,4,3)  -2.0004       0.98273   
             (*,5,3)  -3.0008       0.96116   
             (*,6,3)  -4.0013       0.93095   
             (*,7,3)  -5.0022       0.89213   
         nc: 21
      sense: 0x<address>
                 1     1
         p0: 0x<address>
                 0     0
      delta: 0x<address>
               0.0000       0.0000    
    extrema: 0x<address>
             (*,*,1)  -5.5029      -1.1251    ->     1.5002      -1.0000    
             (*,*,2)  -5.5019      -0.12619   ->     1.5000       0.0000    
             (*,*,3)  -5.5026       0.87272   ->     1.5002       1.0000    
        err: 0x0
     m_flag: 137
        m_M: 2
        m_N: 42
        m_K: 0x<address>  (= K)
      m_map: 0x<address>  (= map)
    m_crval: 0x<address>  (= crval)
    m_index: 0x<address>  (= index)
 m_indxs[0]: 0x<address>  (= index[0])
 m_indxs[1]: 0x<address>  (= index[1])
    m_coord: 0x<address>  (= coord)

   lin.*
       flag: 137
      naxis: 4
      crpix: 0x<address>
               1025.0       64.000       1.0000       1.0000    
         pc: 0x<address>
    pc[0][]:   1.1000       0.0000       0.0000       0.0000    
    pc[1][]:   0.0000       1.0000       0.0000       0.0000    
    pc[2][]:   0.0000       0.0000       1.0000       0.10000   
    pc[3][]:   0.0000       0.0000       0.20000      1.0000    
      cdelt: 0x<address>
              -9.2000e-06   10.000       1.0000      -1.0000    
     dispre: 0x0
     disseq: 0x0
piximg[0][]:  -1.0120e-05  -0.0000      -0.0000      -0.0000    
piximg[1][]:   0.0000       10.000       0.0000       0.0000    
piximg[2][]:   0.0000       0.0000       1.0000       0.10000   
piximg[3][]:  -0.0000      -0.0000      -0.20000     -1.0000    
imgpix[0][]:  -98814.      -0.0000      -0.0000      -0.0000    
imgpix[1][]:   0.0000       0.10000      0.0000       0.0000    
imgpix[2][]:   0.0000       0.0000       1.0204       0.10204   
imgpix[3][]:  -0.0000      -0.0000      -0.20408     -1.0204    
    i_naxis: 4
      unity: 0
     affine: 1
     simple: 0
        err: 0x0
     m_flag: 0
    m_naxis: 0
    m_crpix: 0x0
       m_pc: 0x0
    m_cdelt: 0x0
   m_dispre: 0x0
   m_disseq: 0x0

   cel.*
       flag: 0
     offset: 0
       phi0: UNDEFINED
     theta0: UNDEFINED
        ref:   0.0000       0.0000       9.8765e+107   90.000    
        prj: (see below)
      euler:   0.0000       0.0000       0.0000       0.0000       0.0000    
    latpreq: -1 (UNDEFINED)
     isolat: 0
        err: 0x0

   prj.*
       flag: 0
       code: "   "
         r0:  0.000000
         pv: (not used)
       phi0: UNDEFINED
     theta0: UNDEFINED
     bounds: 7

       name: "undefined"
   category: 0 (undefined)
    pvrange: 0
  simplezen: 0
  equiareal: 0
  conformal: 0
     global: 0
  divergent: 0
         x0: 0.000000
         y0: 0.000000
        err: 0x0
        w[]:   0.0000       0.0000       0.0000       0.0000       0.0000    
               0.0000       0.0000       0.0000       0.0000       0.0000    
          m: 0
          n: 0
     prjx2s: 0x0
     prjs2x: 0x0

   spc.*
       flag: 110
       type: "WAVE"
       code: "F2W"
      crval:  0.21498   
    restfrq: 0.000000
    restwav: 0.000000
         pv: (not used)
          w:   0.0000       1.3945e+09  -6.4866e+09  (remainder unused)
    isGrism: 0
        err: 0x0
     spxX2P: 0x<address>
     spxP2S: 0x0
     spxS2P: 0x0
     spxP2X: 0x<address>

------------------------------------------------------------------------
Extracted contents of wcsprm struct:
       flag: 137
      naxis: 4
      crpix: 0x<address>
               1.0000       1.0000       64.000       0.0000    
         pc: 0x<address>
    pc[0][]:   1.0000       0.20000      0.0000       0.0000    
    pc[1][]:   0.10000      1.0000       0.0000       0.0000    
    pc[2][]:   0.0000       0.0000       1.0000       0.0000    
    pc[3][]:   0.0000       0.0000       0.0000       1.0000    
      cdelt: 0x<address>
              -1.0000       1.0000       10.000       1.0000    
      crval: 0x<address>
               95.000       135.00      -2000.0       0.0000    
      cunit: 0x<address>
             "deg"
             "deg"
             "s"
             ""
      ctype: 0x<address>
             "XLON-TAB"
             "XLAT-TAB"
             "TIME"
             ""
    lonpole: UNDEFINED
    latpole: 90.000000
    restfrq: 0.000000
    restwav: 0.000000
        npv: 6
     npvmax: 6
         pv: 0x<address>
               2   1   1.0000    
               2   2   1.0000    
               2   3   2.0000    
               1   1   1.0000    
               1   2   1.0000    
               1   3   1.0000    
        nps: 6
     npsmax: 6
         ps: 0x<address>
               2   0  WCSTAB
               2   1  COORDS
               2   2  LATIDX
               1   0  WCSTAB
               1   1  COORDS
               1   2  LNGIDX
         cd: 0x<address>
    cd[0][]:   0.0000       0.0000       0.0000       0.0000    
    cd[1][]:   0.0000       0.0000       0.0000       0.0000    
    cd[2][]:   0.0000       0.0000       0.0000       0.0000    
    cd[3][]:   0.0000       0.0000       0.0000       0.0000    
      crota: 0x<address>
               0.0000       0.0000       0.0000       0.0000    
     altlin: 0
     velref: 0
        alt: ' '
     colnum: 0
      colax: 0x<address>
                 0      0      0      0
      cname: 0x<address>
             "Longitude"
             "Latitude"
             "Time"
             UNDEFINED
      crder: 0x<address>
               UNDEFINED    UNDEFINED    UNDEFINED    UNDEFINED
      csyer: 0x<address>
               UNDEFINED    UNDEFINED    UNDEFINED    UNDEFINED
      czphs: 0x<address>
               UNDEFINED    UNDEFINED    UNDEFINED    UNDEFINED
      cperi: 0x<address>
               UNDEFINED    UNDEFINED    UNDEFINED    UNDEFINED
    wcsname: UNDEFINED
    timesys: UNDEFINED
    trefpos: UNDEFINED
    trefdir: UNDEFINED
    plephem: UNDEFINED
   timeunit: UNDEFINED
    dateref: UNDEFINED
     mjdref:      0.000000000     0.000000000
   timeoffs: UNDEFINED
    dateobs: UNDEFINED
    datebeg: UNDEFINED
    dateavg: UNDEFINED
    dateend: UNDEFINED
     mjdobs: UNDEFINED
     mjdbeg: UNDEFINED
     mjdavg: UNDEFINED
     mjdend: UNDEFINED
     jepoch: UNDEFINED
     bepoch: UNDEFINED
     tstart: UNDEFINED
      tstop: UNDEFINED
    xposure: UNDEFINED
    telapse: UNDEFINED
    timsyer: UNDEFINED
    timrder: UNDEFINED
    timedel: UNDEFINED
   timepixr: UNDEFINED
     obsgeo:        UNDEFINED       UNDEFINED       UNDEFINED
                    UNDEFINED       UNDEFINED       UNDEFINED
   obsorbit: UNDEFINED
    radesys: UNDEFINED
    equinox: UNDEFINED
    specsys: UNDEFINED
    ssysobs: UNDEFINED
    velosys: UNDEFINED
    zsource: UNDEFINED
    ssyssrc: UNDEFINED
    velangl: UNDEFINED
        aux: 0x0
       ntab: 1
        tab: 0x<address>  (see below)
       nwtb: 0
        wtb: 0x0
     lngtyp: "XLON"
     lattyp: "XLAT"
        lng: 0
        lat: 1
       spec: -1
       time: 2
   cubeface: -1
     chksum: <CHECKSUM>
      types: 0x<address>
            2500 2501 4000    0
        lin: (see below)
        cel: (see below)
        spc: (see below)
        err: 0x0
     m_flag: 137
    m_naxis: 4
    m_crpix: 0x<address>  (= crpix)
       m_pc: 0x<address>  (= pc)
    m_cdelt: 0x<address>  (= cdelt)
    m_crval: 0x<address>  (= crval)
    m_cunit: 0x<address>  (= cunit)
    m_ctype: 0x<address>  (= ctype)
       m_pv: 0x<address>  (= pv)
       m_ps: 0x<address>  (= ps)
       m_cd: 0x<address>  (= cd)
    m_crota: 0x<address>  (= crota)

    m_colax: 0x<address>  (= colax)
    m_cname: 0x<address>  (= cname)
    m_crder: 0x<address>  (= crder)
    m_csyer: 0x<address>  (= csyer)
    m_czphs: 0x<address>  (= czphs)
    m_cperi: 0x<address>  (= cperi)
      m_aux: 0x0  (= aux)
      m_tab: 0x<address>  (= tab)
      m_wtb: 0x0  (= wtb)

tab[0].*
       flag: 137
          M: 2
          K: 0x<address>
                 7     3
        map: 0x<address>
                 0     1
      crval: 0x<address>
               135.00       95.000    
      index: 0x<address>
   index[0]: 0x<address>
               0.0000       1.0000       2.0000       3.0000       4.0000    
               5.0000       6.0000    
   index[1]: 0x<address>
               0.0000       1.0000       2.0000    
      coord: 0x<address>
             (*,1,1)   1.0002      -1.0042    
             (*,2,1)   0.0000      -1.0000    
             (*,3,1)  -1.0002      -1.0042    
             (*,4,1)  -2.0004      -1.0170    
             (*,5,1)  -3.0008      -1.0382    
             (*,6,1)  -4.0015      -1.0679    
             (*,7,1)  -5.0024      -1.1060    
             (*,1,2)   1.0000      -0.0042798 
             (*,2,2)   0.0000       0.0000    
             (*,3,2)  -1.0000      -0.0042798 
             (*,4,2)  -2.0001      -0.017118  
             (*,5,2)  -3.0003      -0.038512  
             (*,6,2)  -4.0008      -0.068457  
             (*,7,2)  -5.0015      -0.10695   
             (*,1,3)   1.0002       0.99568   
             (*,2,3)   0.0000       1.0000    
             (*,3,3)  -1.0002       0.99568   
             (*,4,3)  -2.0004       0.98273   
             (*,5,3)  -3.0008       0.96116   
             (*,6,3)  -4.0013       0.93095   
             (*,7,3)  -5.0022       0.89213   
         nc: 21
      sense: 0x<address>
                 1     1
         p0: 0x<address>
                 0     0
      delta: 0x<address>
               0.0000       0.0000    
    extrema: 0x<address>
             (*,*,1)  -5.5029      -1.1251    ->     1.5002      -1.0000    
             (*,*,2)  -5.5019      -0.12619   ->     1.5000       0.0000    
             (*,*,3)  -5.5026       0.87272   ->     1.5002       1.0000    
        err: 0x0
     m_flag: 137
        m_M: 2
        m_N: 42
        m_K: 0x<address>  (= K)
      m_map: 0x<address>  (= map)
    m_crval: 0x<address>  (= crval)
    m_index: 0x<address>  (= index)
 m_indxs[0]: 0x<address>  (= index[0])
 m_indxs[1]: 0x<address>  (= index[1])
    m_coord: 0x<address>  (= coord)

   lin.*
       flag: 137
      naxis: 4
      crpix: 0x<address>
               1.0000       1.0000       64.000       0.0000    
         pc: 0x<address>
    pc[0][]:   1.0000       0.20000      0.0000       0.0000    
    pc[1][]:   0.10000      1.0000       0.0000       0.0000    
    pc[2][]:   0.0000       0.0000       1.0000       0.0000    
    pc[3][]:   0.0000       0.0000       0.0000       1.0000    
      cdelt: 0x<address>
              -1.0000       1.0000       10.000       1.0000    
     dispre: 0x0
     disseq: 0x0
piximg[0][]:  -1.0000      -0.20000     -0.0000      -0.0000    
piximg[1][]:   0.10000      1.0000       0.0000       0.0000    
piximg[2][]:   0.0000       0.0000       10.000       0.0000    
piximg[3][]:   0.0000       0.0000       0.0000       1.0000    
imgpix[0][]:  -1.0204      -0.20408     -0.0000      -0.0000    
imgpix[1][]:   0.10204      1.0204       0.0000       0.0000    
imgpix[2][]:   0.0000       0.0000       0.10000      0.0000    
imgpix[3][]:   0.0000       0.0000       0.0000       1.0000    
    i_naxis: 4
      unity: 0
     affine: 1
     simple: 0
        err: 0x0
     m_flag: 0
    m_naxis: 0
    m_crpix: 0x0
       m_pc: 0x0
    m_cdelt: 0x0
   m_dispre: 0x0
   m_disseq: 0x0

   cel.*
       flag: 0
     offset: 0
       phi0: UNDEFINED
     theta0: UNDEFINED
        ref:   0.0000       0.0000       9.8765e+107   90.000    
        prj: (see below)
      euler:   0.0000       0.0000       0.0000       0.0000       0.0000    
    latpreq: -1 (UNDEFINED)
     isolat: 0
        err: 0x0

   prj.*
       flag: 0
       code: "   "
         r0:  0.000000
         pv: (not used)
       phi0: UNDEFINED
     theta0: UNDEFINED
     bounds: 7

       name: "undefined"
   category: 0 (undefined)
    pvrange: 0
  simplezen: 0
  equiareal: 0
  conformal: 0
     global: 0
  divergent: 0
         x0: 0.000000
         y0: 0.000000
        err: 0x0
        w[]:   0.0000       0.0000       0.0000       0.0000       0.0000    
               0.0000       0.0000       0.0000       0.0000       0.0000    
          m: 0
          n: 0
     prjx2s: 0x0
     prjs2x: 0x0

   spc.*
       flag: 0
       type: "    "
       code: "   "
      crval: UNDEFINED
    restfrq: 0.000000
    restwav: 0.000000
         pv: (not used)
          w:   0.0000       0.0000       0.0000      (remainder unused)
    isGrism: 0
        err: 0x0
     spxX2P: 0x0
     spxP2S: 0x0
     spxS2P: 0x0
     spxP2X: 0x0


Testing invalid subimaging requests; ignore status 13 messages below.

Received wcssub status 13 as expected for a non-separable subimage
coordinate system.  The error message was
  ERROR 13 in wcssub() at line 1353 of file wcs.c:
  Table with M>1 depends on axis excluded from the subimage.

Received wcssub status 13 as expected for a non-separable subimage
coordinate system.  The error message was
  ERROR 13 in wcssub() at line 969 of file wcs.c:
  Non-zero off-diagonal matrix elements excluded from the subimage.
