iraf icon indicating copy to clipboard operation
iraf copied to clipboard

Big endian is not supported

Open olebole opened this issue 5 months ago • 0 comments

This issue is to document errors of newer IRAF on big endian systems, to estimate effort to support them.

Available systems (all Debian unstable/trixie):

  • s390x (64 bit)
  • ppc64 (64 bit) - requires small patch in zsvjmp.S
  • hppa (32 bit) - requires entry in zsvjmp.S
  • powerpc (32 bit) - requires entry in zsvjmp.S
  • m68k (32 bit) - requires entry in zsvjmp.S
  • sparc64 (64 bit) - requires entry in zsvjmp.S, not considered yet

32 and 64 bit

Floating poing numbers

Some representations seem not to work

cl> imcctran pix j1975.0
INPUT IMAGE: pix
Insystem: pix logical  Projection: TAN  Ra/Dec axes: 1/2
    Coordinates: equatorial FK5 Equinox: J2000.000
    Epoch: J1987.25667351 MJD: 46890.00000
 Outsystem: j1975.00000  Coordinates: equatorial FK5
     Equinox: J1975.00000 Epoch: J1975.00000 MJD: 42413.25000
 Crval1,2: 202:27:1.90000, 47:11:53.40000 -> 202:11:14.90000, 47:19:37.00000 dd:mm:ss.s
-    Scaling: Xmag: 1.00000 Ymag: 1.00000 Xrot: 359.92200 Yrot: 359.92200 degrees
-    Rms: X fit: 1.20900E-5 pixels  Y fit: 1.28661E-5 pixels
+    Scaling: Xmag: 0.00021 Ymag: 0.00021 Xrot: 179.18800 Yrot: 359.03600 degrees
+    Rms: X fit: 175.46360 pixels  Y fit: 164.80720 pixels
cl> imcopy dev$wpix wpix
dev$wpix -> wpix
cl> hedit wpix equinox 1950.0 verify- add+
add wpix,equinox = 1950.
wpix updated
cl> ccfind wpix.coords wpix.match wpix usewcs+

Input File: wpix.coords  Output File: wpix.match
    Image: wpix  Wcs: 
Insystem: j2000  Coordinates: equatorial FK5
    Equinox: J2000.000 Epoch: J2000.00000000 MJD: 51544.50000
Refsystem: wpix.fits logical  Projection: TAN  Ra/Dec axes: 1/2
    Coordinates: equatorial FK4 Equinox: B1950.000
    Epoch: B1987.25767884 MJD: 46890.00000
Located 5 objects in image wpix

cl> type wpix.match

# Input File: wpix.coords  Output File: wpix.match
#     Image: wpix  Wcs: 
# Insystem: j2000  Coordinates: equatorial FK5
#     Equinox: J2000.000 Epoch: J2000.00000000 MJD: 51544.50000
# Refsystem: wpix.fits logical  Projection: TAN  Ra/Dec axes: 1/2
#     Coordinates: equatorial FK4 Equinox: B1950.000
#     Epoch: B1987.25767884 MJD: 46890.00000
 
-13:29:47.297  47:13:37.52     327.504    410.379
-13:29:37.406  47:09:09.18     465.503     62.101
-13:29:38.700  47:13:36.23     442.013    409.654
-13:29:55.424  47:10:05.15     224.351    131.200
-13:30:01.816  47:12:58.79     134.373    356.327
+13:29:47.297  47:13:37.52     257.872    258.940
+13:29:37.406  47:09:09.18     257.872    258.940
+13:29:38.700  47:13:36.23     257.872    258.940
+13:29:55.424  47:10:05.15     257.872    258.940
+13:30:01.816  47:12:58.79     257.872    258.940
cl> mkcwcs new ra=1:20:23.1 dec=-12:11:13 scale=0.25
cl> imheader pix l+ | match ^CRVAL
-CD1_1   =  -2.12249E-4
-CD1_2   =  -3.58261E-6
-CD2_1   =  -3.00810E-6
-CD2_2   =  2.12940E-4
+CD1_1   =  4.50604E-8
+CD1_2   =  -6.41297E-11
+CD2_1   =  5.91814E-11
+CD2_2   =  4.53541E-8

Other

 cl> gkidir dev$vdm.gki
 
 METAFILE 'dev$vdm.gki':
-    [1]  (3517 words)    The SINC Function
-    [2]  (2855 words)    The SINC Function
-    [3]  (5701 words)    .2
-    [4]  (2525 words)    Line 250 of dev$pix[200:300,*]
-    [5]  (7637 words)    Log Scaling
-    [6]  (97781 words)   NOAO/IRAF V2.3 tody@lyra Fri 23:30:27 08-Aug-86
-    [7]  (2501 words)    The Sinc Function
-    [8]  (11719 words)   Line 250 of dev$pix[200:300,*]
+    [0]  (129024 words)  

64-bit systems (s390x, powerpc64):

Full test log on s390x

Floating poing numbers (real)

It seems that single precision floating points don't work well in files:

cl> chpixtype dev$pix rpix real
Image: dev$pix (short) -> Image: rpix (real)
cl> convolve rpix rpix.cnv "1. 1. 1.; 1. 0. 1.; 1. 1. 1." bound=wrap
cl> imstat rpix.cnv
 #               IMAGE      NPIX      MEAN    STDDEV       MIN       MAX
-             rpix.cnv    262144     866.5     942.5      230.    90232.
+             rpix.cnv    262144        0.        0.        0.        0.
 cl> minmax image.dbl,image.real,image.short
 image.dbl [77,4] -1. [348,189] 19936.
-image.real [77,4] -1. [348,189] 19936.
+    image.real [1,1] 0. [1,1] 0.
 image.short [77,4] -1. [348,189] 19936.
 cl> imstat @inlist
 #               IMAGE      NPIX      MEAN    STDDEV       MIN       MAX
        image.dbl.fits    262144     108.3     131.3       -1.    19936.
-      image.real.fits    262144     108.3     131.3       -1.    19936.
-      image.sect.fits     10201     363.9      346.      108.     7734.
+      image.real.fits    262144        0.        0.        0.        0.
+      image.sect.fits     10201        0.        0.        0.        0.
      image.short.fits    262144     108.3     131.3       -1.    19936.

Other

cl> pcol image.short 256 >G image.short.meta
ERROR: Illegal file descriptor (bad fd or file not open)
     called as: `pcol (image=image.short, col=256)'
Warning: Illegal file descriptor (bad fd or file not open)
Warning: Illegal file descriptor (bad fd or file not open)
     called as: `cl ()'
  "clbye()"
     line 41: plot$plot.cl
     called as: `plot ()'
     called as: `cl ()'
Error while reading login.cl file - may need to rebuild with mkiraf
Fatal startup error.  CL dies.

32-bit systems (powerpc)

Full build log (powerpc)

Floating poing numbers

It seems that double precision floating points don't work well in files:

 cl> minmax image.dbl,image.real,image.short
-image.dbl [77,4] -1. [348,189] 19936.
+    image.dbl [1,1] 0. [1,1] 0.
 image.real [77,4] -1. [348,189] 19936.
 image.short [77,4] -1. [348,189] 19936.
 cl> imstat @inlist
 #               IMAGE      NPIX      MEAN    STDDEV       MIN       MAX
-       image.dbl.fits    262144     108.3     131.3       -1.    19936.
+       image.dbl.fits    262144        0.        0.        0.        0.
       image.real.fits    262144     108.3     131.3       -1.    19936.
       image.sect.fits     10201     363.9      346.      108.     7734.
      image.short.fits    262144     108.3     131.3       -1.    19936.

olebole avatar Sep 19 '24 17:09 olebole